Debugging with GDB (September 2007)

vii
14.23.5 Support for steplast command for C and C++
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
14.24 Getting information from a non-debug executable . . . . . 179
14.25 Debugging optimized code . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
14.25.1 Debugging Optimized Code at Various
Optimization Levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
14.25.1.1 +O0 and +O1 . . . . . . . . . . . . . . . . . . . . . . . 182
14.25.1.2 +O2/+O3/+O4/-ipo. . . . . . . . . . . . . . . . . 182
14.26 Visual Interface for WDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
14.26.1 Starting and stopping Visual Interface for WDB
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
14.26.2 Navigating the Visual Interface for WDB display
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
14.26.3 Specifying foreground and background colors. . 186
14.26.4 Using the X-window graphical interface . . . . . . 187
14.26.5 Using the TUI mode . . . . . . . . . . . . . . . . . . . . . . . . 187
14.26.6 Changing the size of the source or debugger pane
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
14.26.7 Using commands to browse through source files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
14.26.8 Loading source files . . . . . . . . . . . . . . . . . . . . . . . . . 189
14.26.9 Editing source files . . . . . . . . . . . . . . . . . . . . . . . . . 189
14.26.10 Editing the command line and command-line
history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
14.26.11 Saving the contents of a debugging session to a
file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
14.27 Support for ddd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
14.28 Support for XDB commands . . . . . . . . . . . . . . . . . . . . . . . . . 190
14.28.1 stop in/at dbx commands . . . . . . . . . . . . . . . . . . . 190
14.29 GNU GDB Logging Commands . . . . . . . . . . . . . . . . . . . . . . 190
14.30 Support for command line calls in a strippe d exec utable
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
14.30.1 Support for command line calls in a strippe d
executable on PA-RISC systems . . . . . . . . . . . . . . . . . 190
14.30.2 Additional support for command line calls in a
stripped executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
14.30.2.1 For 32-bit applications: . . . . . . . . . . . . . 191
14.30.2.2 For 64-bit applications . . . . . . . . . . . . . 191
14.30.3 Support for debugging stripped binaries . . . . . . 191
14.30.3.1 Printing of loc als and globals in a
stripped module . . . . . . . . . . . . . . . . . . . . . . . . . 192
14.30.3.2 Backtrace on stripped frames . . . . . . . 192
14.30.3.3 Command line calls to non-stripped
library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
14.30.3.4 Setting breakpoints in unstripped shared
library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
14.31 Displaying the current block scope information . . . . . . . . 192
14.32 Linux supp ort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192