Using GDB from the Command Line
Let’s start by learning to drive gdb from the command line. Why waste time with gdb’s command-line mode? Historically, gdb has been a command-line program. GUIs layered on top of gdb never export all of its features: to wield its full power, you must learn to use its command-line interface. From the command line, you can leverage all of gdb’s features, both common and esoteric. Luckily, Xcode gives you a console pane to interact with gdb’s command line, so you have the best of both worlds there.
Being comfortable at the gdb command line also makes gdb more useful when you want to do remote debugging, that is, running your program and the debugger on another machine over an ssh connection. Xcode has some remote ...
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