Ethereal-dev: Re: [Ethereal-dev] Follow TCP Stream module (MS VC++ & Windows specific)
rex plantado wrote:
yeah, ive looked into the codes but its quiet overwhelming :)
how i wish if theres a prj file for win32 ethereal where i can debug
the codes...
or
atleast a good reference in reassembling the tcp packets...rfc doest
give me clear idea how to get it done.
You do not really require a project file to be able to debug ethereal on
Windows.
Just compile and link the binary (as I believe you have already done),
then start ethereal (or ethereal-gtk2 or whichever binary you may want
to debug).
Start MS VC++.
From the Build menu in MS VC++, choose Start Debug -> Attach to
process, choose the process you started before (which you want to
debug). This attaches the debugger to the running process.
Load whatever source code the binary was built from and set breakpoints
as you would normally do in MS VC++, as soon as the program hits the
breakpoint you are able to debug the application in your own fashion
from now on (somewhere in packet-tcp.c I guess related to your initial
question).
If you now choose to terminate ethereal (via the File menu, option Quit
for instance) without exiting MSDev, you are able to start debugging the
same binary again with for instance F5 (run) etc, that is without having
to do the Attach to process sequence again (this however fails sometimes
in GTK+ somewhere, then just restart from the top again).
/ Peter