Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

Signals..................................................................................................................................47
Stopping and starting multi-thread programs..............................................................................48
6 Examining the Stack.................................................................................50
Stack frames..........................................................................................................................50
Stacks Without frames.............................................................................................................50
Commands for Examining the Stack..........................................................................................50
Backtraces.............................................................................................................................51
Selecting a frame...................................................................................................................51
Information about a frame.......................................................................................................52
7 Examining Source Files.............................................................................54
Printing source lines................................................................................................................54
Searching source files.............................................................................................................55
Specifying source directories....................................................................................................55
Source and machine code.......................................................................................................56
8 Examining Data.......................................................................................58
Expressions............................................................................................................................58
Program variables...................................................................................................................58
Artificial arrays.......................................................................................................................60
Output formats.......................................................................................................................60
Examining memory.................................................................................................................61
Automatic display...................................................................................................................62
Print settings...........................................................................................................................63
Value history..........................................................................................................................67
Convenience variables............................................................................................................68
Registers................................................................................................................................69
Printing Floating Point Values....................................................................................................70
Floating point hardware..........................................................................................................70
Functions...............................................................................................................................70
9 Using GDB with Different Languages...........................................................71
Switching between source languages........................................................................................71
List of filename extensions and languages.............................................................................71
Setting the working language..............................................................................................71
Having GDB infer the source language.................................................................................72
Displaying the language..........................................................................................................72
Type and range checking........................................................................................................72
An overview of type checking..............................................................................................73
An overview of range checking............................................................................................73
Supported languages..............................................................................................................74
C and C++.......................................................................................................................74
C and C++ operators....................................................................................................75
C and C++ constants....................................................................................................76
C++ expressions...........................................................................................................77
C and C++ defaults.......................................................................................................78
C and C++ type and range checks.................................................................................78
GDB and C..................................................................................................................78
GDB features for C++....................................................................................................78
Fortran.............................................................................................................................79
Fortran types................................................................................................................79
Fortran operators..........................................................................................................80
Fortran special issues.....................................................................................................80
4 Contents