Wireshark-dev: Re: [Wireshark-dev] GDB / Fuzz test ?
From: Dario Lombardo <lomato@xxxxxxxxx>
Date: Mon, 12 Nov 2018 10:27:32 +0100


On Mon, Nov 12, 2018 at 9:40 AM Antoine d'Otreppe <a.dotreppe@xxxxxxxxxx> wrote:
Hi folks!

I'm progressing in the syncthing dissector. Wireshark compiled without hassle on Manjaro (Arch derivative). I love the wireshark codebase, it's refreshing to see a large project that just works...

Thanks :).
 


Anyway I have two questions:
1. I'm not familiar with GDB and could not set a breakpoint in my functions. Is there a trick to it? How do you run it?

What's exactly your issue? When I run 

gdb --args run/wireshark
break filename.c:xxx

I'm asked if I want to set a breakpoint for dynamically loaded library (that's the case for dissectors, that live in libwireshark.so).

Then I run the code and I am stopped at the desired point. Are you running something different?
 

And a small note:
The documentation indicates that you should run `./wireshark` to run the compiled version, whereas it really should be `./run/wireshark`. Same goes for the fuzz-test.sh.
Not a big deal, but that was the only non-smooth part of the compilation process :)

Ok, I'll take them from here.