Debugging C code with GDB: The GNU Project Debugger
GDB (The GNU Project Debugger) is a debugging tool that I admittedly have a love/hate relationship with. On the one hand it is extremely good at what it does, while on the other hand it has a terribly frustrating learning curve. After getting through the initial 'none of this is making sense' barrier, however, using GDB is a fantastic way to learn about C, assembly, and debugging. GDB is started from the terminal with the following syntax: gdb (options) (filename) To 'quietly' open a C file named 'Talisman' would require the following syntax: gdb -q Talisman The location of the file matters and will need to be specified if it isn't in the current working directory. Note: if the original source code was compiled without debugging options specified, a 'no symbols' error will be presented. This means the source code is not available for viewing inside GDB, however, we can still view the assembly code. When working with GDB th...