Skip to Main Content
The Art of Debugging with GDB, DDD, and Eclipse
book

The Art of Debugging with GDB, DDD, and Eclipse

by Norman Matloff, Peter Jay Salzman
September 2008
Intermediate to advanced content levelIntermediate to advanced
280 pages
6h 31m
English
No Starch Press
Content preview from The Art of Debugging with GDB, DDD, and Eclipse

Overview of Breakpoints

A breakpoint is like a tripwire within a program: You set a breakpoint at a particular "place" within your program, and when execution reaches that point, the debugger will pause the program's execution (and will, in the case of a text-based debugger such as GDB, give you a command prompt).

GDB is very flexible about the meaning of "place"; it could mean things as varied as a line of source code, an address of code, a line number within a source file, or the entry into a function.

A snippet of a debug session is shown below to illustrate what happens when GDB breaks at a line of code. In the snippet, we list part of the source code, put a breakpoint at line 35 of the program, and then run the program. GDB hits the ...

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.
Start your free trial

You might also like

Beginning x64 Assembly Programming: From Novice to AVX Professional

Beginning x64 Assembly Programming: From Novice to AVX Professional

Jo Van Hoey
Command-Line Rust

Command-Line Rust

Ken Youens-Clark
Modern CMake for C++

Modern CMake for C++

Rafał Świdziński

Publisher Resources

ISBN: 9781593271749Errata Page