I’m a little frustrated with finding “gdb examples” online that show the commands but not their output. gdb is the GNU Debugger, the standard debugger on Linux. I was reminded of the lack of example output when watching the Give me 15 minutes and I’ll change your view of GDB talk by Greg Law at CppCon 2015, which, thankfully, includes output! It’s well worth the 15 minutes.
It also inspired me to share a full gdb debugging example, with output and every step involved, including dead ends. This isn’t a particularly interesting or exotic issue, it’s just a routine gdb debugging session. But it covers the basics and could serve as a tutorial of sorts, bearing in mind there’s a lot more to gdb than I used here.