On 14/04/2010 14:00, Shawn Mayer wrote:
On
14/04/2010 01:59, Shawn Mayer wrote:
Do I have to use something other than printf
to print from Wireshark? I
have the console set to always open, but still am not seeing anything.
Thanks.
Run it under the debugger, much easier than printf.
Is the debugger only for linux?
(Replying to the list for the benefit of others.)
Nope, works fine on Windows as well. I can't speak for the Express
versions of Visual Studio, but certainly for Pro version upwards I
regularly use the debugger with Wireshark. The way I do it is shown
below and is using VS2005 Professional. Menu names etc. might be
different in other versions:
- Assuming you have built Wireshark somewhere {wiresharkPath}, cd
into the resultant directory with the executable and all the required
DLL's {wiresharkPath\wireshark-gtk2}.
- Start Wireshark from this directory with any required command
line options (wireshark.exe ...).
- In Visual Studio, from the Tools menu select "Attach to
Process...".
- From the resultant dialog locate the wireshark.exe process and
click the "Attach" button.
- To set a breakpoint, open the appropriate source file using "File
| Open | File..." (from wherever in {wiresharkPath}) and place a BP in
the normal VS manner.
- Do whatever you need in WS to cause your BP to be hit.
Occasionally VS will ask where to find a source file if you step into
another module, just point it at the appropriate directory under
{wiresharkPath}
--
Regards,
Graham Bloice
|