Wireshark mailing list archives

Re: Quickly determine where your duplicate ett_definition is ...


From: Peter Wu <peter () lekensteyn nl>
Date: Tue, 5 Nov 2019 10:43:28 +0000

On Thu, Oct 17, 2019 at 12:00:07PM -0700, Richard Sharpe wrote:
Hi folks,

I just had a nasty issue with duplicate ett_* entries (well, one, actually).

The issue was in dissector A but I was working on dissector B and had
not run Wireshark after building with the changes in A, so it looked
like the issue was in B.

I notice that proto_register_subtree_array does not take any
parameters indicating which dissector it is called from.

Could we make that call a macro that passes the code line and function
name as the last two parameters so the g_error printed out can tell us
where the problem lies?

These issues are so rare, I would rather not complicate this routine.
It would also have some overhead since every group of etts would have to
be registered with the affected dissector.

In the end I used gdb to figure it out, but life would have been
easier if the error message told me.

Use of a debugger seems an appropriate approach since you can easily
obtain a backtrace from it, and print the address of the ett item to
learn which dissector registered the ett.
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: