Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] When I use gdb to debug wireshark,error occurs

From: Christopher Maynard <Chris.Maynard@xxxxxxxxx>
Date: Sat, 23 Oct 2010 02:11:34 +0000 (UTC)
刘昆 <liukunmeister@...> writes:

> What should I do to debug packet-http.c:dissect_http by using gdb ?

dissect_http is in libwireshark.so, not wireshark.  After the message indicating
"No source file named packet-http.c", you should have also seen a message asking
you:
    Make breakpoint pending on future shared library load? (y or [n]) 

If you choose 'y', then your breakpoint will be pending until the library is
loaded and the function resolved.  When you type "run", you should then see
messages along the lines of:
    Breakpoint 1 at 0x<some address>: file packet-http.c, line 2194.
    Pending breakpoint "packet-http.c:dissect_http" resolved

The breakpoint is now set and execution should stop at dissect_http() whenever
that function is called.