Debugging with GDB (September 2007)
vi Debugging with GDB
14.15 Printing the Execution Path Entries for the Current Frame
or Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
14.15.1 Compiler Dependencies for Printing the Execution
Path Entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
14.15.2 Example Illustrating Execution Path Recovery
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
14.16 Invoking GDB Before a Program Aborts . . . . . . . . . . . . . . 166
14.17 Aborting a Command Line Call . . . . . . . . . . . . . . . . . . . . . . 166
14.18 Instruction Level Stepping . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
14.19 Enhanced support for watchpoints and breakpoints . . . . 168
14.19.1 Deferred watchpoints . . . . . . . . . . . . . . . . . . . . . . . 168
14.19.2 Hardware watchpoints . . . . . . . . . . . . . . . . . . . . . . 168
14.19.3 Hardware breakpoints . . . . . . . . . . . . . . . . . . . . . . 168
14.19.3.1 Setting breakpoints in unstripped shared
library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
14.19.4 Support for procedural breakpoints . . . . . . . . . . 168
14.19.5 Support for template breakpoints . . . . . . . . . . . . 169
14.20 Debugging support for shared libraries . . . . . . . . . . . . . . . . 169
14.20.1 Using shared library as main program . . . . . . . . 170
14.20.2 Setting Deferred Breakpoints in Shared Library
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
14.20.3 Using catch load . . . . . . . . . . . . . . . . . . . . . . . . . . 171
14.20.4 Privately mapping shared libraries . . . . . . . . . . . 171
14.20.5 Selectively Mapping Shared Libraries As Private
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
14.20.6 Setting breakpoints in shared library . . . . . . . . . 172
14.21 Language support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
14.21.1 Enhanced Java Debugging Support . . . . . . . . . . 172
14.21.2 Commands for Examining Java Virtual
Machine(JVM) internals. . . . . . . . . . . . . . . . . . . . . . . . . 172
14.21.2.1 Java subcommands . . . . . . . . . . . . . . . . 173
14.21.3 Support for stack traces in Java, C, and C++
programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
14.21.4 Support for 64-bit Java, C, aC++ stack unwinding
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
14.21.5 Enhanced support for C++ templates. . . . . . . . . 174
14.21.6 Support for __fpreg data type on IPF . . . . . . . 175
14.21.7 Support for Complex variables in HP C . . . . . 175
14.21.8 Support for debugging namespaces . . . . . . . . . . . 176
14.21.9 Command for evaluating the address of an
expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
14.22 Viewing Wide Character Strings . . . . . . . . . . . . . . . . . . . . . 176
14.23 Support for output logging. . . . . . . . . . . . . . . . . . . . . . . . . . . 177
14.23.1 Support for dumping array in an ASCII file . . 177
14.23.2 Support for Fortran array slices. . . . . . . . . . . . . . 178
14.23.3 Displaying enumerators . . . . . . . . . . . . . . . . . . . . . 178
14.23.4 Support for debugging typedefs . . . . . . . . . . . . . . 178