8Debugging With GDB
What Is a Debugger?
A debugger is a program that runs your program and has the power to suspend its execution and poke around in memory, examining and changing memory values. It can catch your program after it runs into trouble so you can investigate the problem. Debuggers know about the data structures you are using and can display those structures in an intelligent way. You can experiment with your program, and you can also step through someone else’s code to figure out how it works.
Mac OS X comes with gdb, the GNU project’s debugger, which has a long heritage dating back to 1988. It is fundamentally a command-line oriented tool, but it has been extended over the years to make integration into IDEs, like Xcode and emacs ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access