Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
Support for Memory debugging from Core File....................................................................126
Memory debugging without prior preparation.....................................................................126
Open-files reporting.........................................................................................................126
Configuring memory debugging settings.............................................................................127
Specifying the stack depth............................................................................................127
Specifying minimum leak size.......................................................................................127
Specifying minimum block size......................................................................................127
Scenarios in memory debugging.......................................................................................128
Stop when freeing unallocated or deallocated blocks.......................................................128
Stop when freeing a block if bad writes occurred outside block boundary..........................128
Stop when a specified block address is allocated or deallocated.......................................128
Scramble previous memory contents at malloc/free calls..................................................128
Detect dangling pointers and dangling blocks................................................................129
Detect in-block corruption of freed blocks.......................................................................129
Specify the amount of guard bytes for every block of allocated memory.............................129
Comparison of Memory Debugging Commands in Interactive Mode and Batch Mode..............129
Heap Profiling.................................................................................................................131
Commands for heap profiling.......................................................................................131
info heap arena..........................................................................................................131
info heap arena [0 |1|2|..] blocks stacks.....................................................................131
info heap process........................................................................................................131
Example for heap profiling...........................................................................................131
Memory Checking Analysis for User Defined Memory Management Routines..........................132
Commands to track the change in data segment value..........................................................132
Support for Memory Debugging Feature on Applications Using libmallocng Library for Heap
Allocation Management...................................................................................................133
Thread Debugging Support....................................................................................................133
Support for Enabling and Disabling Specific Threads............................................................133
Backtrace Support for Thread Debugging............................................................................134
Advanced Thread Debugging Support................................................................................134
Pre-requisites for Advanced Thread Debugging...............................................................135
Enabling and Disabling Advanced Thread Debugging Features........................................135
Commands to view information on pthread primitives.......................................................137
Debugging Threads Interactively After Attaching to a Process.................................................138
Thread Debugging in Batch Mode.....................................................................................139
Pre-requisites for Batch mode of Thread Debugging.........................................................140
Limitations in Batch mode of thread debugging...............................................................142
Thread Debugging in +check Mode...................................................................................142
Known issues with Thread Debugging for Interactive and Batch mode.....................................142
Debugging MPI Programs......................................................................................................143
Debugging multiple processes (programs with fork and vfork calls)..............................................143
Ask mode for set follow-fork-mode......................................................................................143
Serial mode for set follow-fork-mode...................................................................................143
Support for showing unwind info........................................................................................143
Command to Search for a Pattern in the Memory Address Space................................................144
Debugging Core Files...........................................................................................................146
Generating core files with packcore /unpackcore/getcore....................................................146
Support for the info target Command..................................................................................147
Support for the dumpcore command...................................................................................148
Enhancements to the dumpcore command......................................................................148
Support for display of run time type information...................................................................148
Support for Core File Debugging of MITR Applications ........................................................149
Configuring HP WDB for Mixed Mode Debugging..........................................................149
Command to Support Core File Debugging in Mixed More Applications............................149
Change in the Behavior of Existing Commands...............................................................150
6 Contents