Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
14.10.8.3 Specifying minimum block size.......................................................168
14.10.9 Scenarios in memory debugging............................................................168
14.10.9.1 Stop when freeing unallocated or deallocated blocks.........................168
14.10.9.2 Stop when freeing a block if bad writes occurred outside block
boundary...................................................................................................169
14.10.9.3 Stop when a specified block address is allocated or deallocated........169
14.10.9.4 Scramble previous memory contents at malloc/free calls....................169
14.10.9.5 Detect dangling pointers and dangling blocks..................................170
14.10.9.6 Detect in-block corruption of freed blocks.........................................170
14.10.9.7 Specify the amount of guard bytes for every block of allocated
memory.....................................................................................................171
14.10.10 Comparison of Memory Debugging Commands in Interactive Mode and
Batch Mode....................................................................................................171
14.10.11 Heap Profiling.....................................................................................173
14.10.11.1 Commands for heap profiling.........................................................173
14.10.11.2 info heap arena...........................................................................173
14.10.11.3 info heap arena [0 |1|2|..] blocks stacks.......................................173
14.10.11.4 info heap process.........................................................................174
14.10.11.5 Example for heap profiling............................................................174
14.10.12 Memory Checking Analysis for User Defined Memory Management
Routines.........................................................................................................175
14.10.13 Commands to track the change in data segment value.............................175
14.10.14 Support for Memory Debugging Feature on Applications Using libmallocng
Library for Heap Allocation Management...........................................................175
14.11 Thread Debugging Support...........................................................................176
14.11.1 Support for Enabling and Disabling Specific Threads..................................176
14.11.2 Backtrace Support for Thread Debugging.................................................177
14.11.3 Advanced Thread Debugging Support.....................................................177
14.11.3.1 Pre-requisites for Advanced Thread Debugging..................................178
14.11.3.2 Enabling and Disabling Advanced Thread Debugging Features...........179
14.11.3.3 Commands to view information on pthread primitives.........................182
14.11.4 Debugging Threads Interactively After Attaching to a Process......................182
14.11.5 Thread Debugging in Batch Mode...........................................................184
14.11.5.1 Pre-requisites for Batch mode of Thread Debugging............................185
14.11.5.2 Limitations in Batch mode of thread debugging.................................188
14.11.6 Thread Debugging in +check Mode........................................................188
14.11.7 Known issues with Thread Debugging for Interactive and Batch mode..........189
14.12 Debugging MPI Programs.............................................................................189
14.13 Debugging multiple processes (programs with fork and vfork calls).....................190
14.13.1 Ask mode for set follow-fork-mode...........................................................190
14.13.2 Serial mode for set follow-fork-mode........................................................190
14.13.3 Support for showing unwind info............................................................190
14.14 Command to Search for a Pattern in the Memory Address Space.......................191
14.15 Debugging Core Files...................................................................................194
Contents 7