Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
10 Examining the Symbol Table....................................................................81
11 Altering Execution...................................................................................84
Assignment to variables...........................................................................................................84
Continuing at a different address..............................................................................................85
Giving your program a signal..................................................................................................85
Returning from a function.........................................................................................................86
Calling program functions........................................................................................................86
Patching programs..................................................................................................................86
12 GDB Files..............................................................................................88
Commands to specify files.......................................................................................................88
Specifying shared library locations...........................................................................................91
Errors reading symbol files.......................................................................................................92
13 Specifying a Debugging Target................................................................94
Active targets.........................................................................................................................94
Commands for managing targets..............................................................................................94
Choosing target byte order......................................................................................................96
14 HP-UX Configuration-Specific Information....................................................97
Summary of HP Enhancements to GDB......................................................................................97
HP-UX dependencies...............................................................................................................99
Linker Dependencies...........................................................................................................99
Dependent Standard Library Routines for Run Time Checking...................................................99
Supported Platforms and Modes.............................................................................................100
HP-UX targets.......................................................................................................................101
Support for Alternate root......................................................................................................101
Specifying object file directories.............................................................................................102
Fix and continue debugging..................................................................................................103
Fix and Continue compiler dependencies............................................................................104
Fix and Continue restrictions..............................................................................................104
Using Fix and Continue....................................................................................................104
Example Fix and Continue session......................................................................................105
Inline Support......................................................................................................................106
Inline Debugging in HP 9000 Systems................................................................................107
Inline Debugging in Integrity Systems..................................................................................107
Debugging Inline Functions in Integrity Systems...............................................................108
Debugging Macros...............................................................................................................109
Viewing and Evaluating Macro Definitions..........................................................................109
Compiler Options to Enable Macro Debugging...............................................................110
Examples for Macro Debugging........................................................................................110
Debugging Memory Problems................................................................................................112
When to suspect a memory leak........................................................................................112
Memory debugging restrictions..........................................................................................113
Memory Debugging Methodologies...................................................................................113
Debugging Memory in Interactive Mode.............................................................................113
Commands for interactive memory debugging................................................................113
Example for interactive debugging session......................................................................116
Debugging Memory in Batch Mode...................................................................................117
Setting Configuration Options for Batch Mode................................................................117
Environment variable setting for Batch mode debugging...................................................120
Example for Batch Mode RTC.......................................................................................121
Debugging Memory Interactively After Attaching to a Running Process....................................123
Debugging Memory using RTC APIs...................................................................................125
Calling RTC APIs from user application...........................................................................125
Calling RTC APIs from wdb...........................................................................................125
Contents 5