2.6. Debugger

Well, using a good debugger can save you a lot of development time. However some people still think it's use is optional.

The debugger you use must match the C compiler Ethereal was compiled with, otherwise the debugger will simply fail or you will only see a lot of garbage.

2.6.1. UNIX: GDB (GNU project debugger)

GDB is the debugger for the GCC compiler. It is available for many (if not all) UNIX-like platforms and as the gdb package from the Cygwin setup

If you don't like debugging using the command line, there are some GUI frontends for it available, most notably GNU DDD.

If gdb isn't already installed and also not available as a package for your platform, you can get it at: http://www.gnu.org/software/gdb/gdb.html.

After correct installation, typing inside the bash:

$ gdb --version

should result in something like:

GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
	

However, the version string may vary.

2.6.2. UNIX: DDD (GNU Data Display Debugger)

The GNU Data Display Debugger is a good GUI frontend for GDB (and a lot of other command line debuggers), so you have to install GDB first. It is available for many UNIX-like platforms and as the ddd package from the Cygwin setup.

If GNU DDD isn't already installed and also not available as a package for your platform, you can get it at: http://www.gnu.org/software/ddd/.

2.6.3. Win32 native: Microsoft Visual Studio debugger

You can use the integrated debugger of Visual Studio.

However, setting up the environment is a bit tricky, as the Win32 build process is using makefiles instead of the .dsp/.dsw files usually used. XXX - add instructions how to do it.

2.6.4. Win32 native: Microsoft Debugging Tools for Windows

You could also use the Microsoft debugging tools, which is a GUI debugger. As it's not that comfortable compared to debugging in Visual Studio, it can be helpful if you have to debug on a different machine.

You can get it free of charge at: http://www.microsoft.com/whdc/devtools/debugging/default.mspx (as links to microsoft pages changes from time to time, search for "Debugging Tools" at their page if this link should be outdated).