Image link

How Linux C++ Debuggers Really Work

In this Tutorial

Debugging is central to programming. You cannot be a good programmer without being good at debugging and vice-versa. And I would also say you cannot be good at debugging without taking advantage of the tools at your disposal. We don’t need to use all the tools, but there are certain times when specific tools come in really useful.

Knowing your tools makes you a better programmer, but becoming (too) reliant on them for your debugging can lead you down a garden path and actually take you away from the correct answer.

When coding, we’ve got a model of what the program should be doing and the boundaries where expected behaviors diverge. The tools give us a model too. For example, when I’m stepping through my code in GDB, I have this kind of conceptual model of what’s going on underneath. 90% of the time, I don’t need to worry about what happens. I just accept the model that GDB gives me. But sometimes, things do happen (or do not happen) that can leave you astray if you don’t understand what’s really going on with the tools you’re using.

This is why I think my talk with Dewang Li from Synopsys is fundamental. We explored some of the Linux C++ debugging tools available to us today and what’s really going on underneath these tools.

Dewang and I looked at two categories of debugging tools – debuggers and checkers.


1. Debuggers


2. Checkers


Do watch the full talk here, and don’t forget to subscribe, like, and share!

Good luck debugging!

Don’t miss my next C++ debugging tutorial: sign up to my WatchPoint mailing list below.
Get tutorials straight to your inbox

Become a GDB Power User. Get Greg’s debugging tips directly in your inbox every 2 weeks.

Want GDB pro tips directly in your inbox?

Share this tutorial