HP WDB GUI 5.7 Reference Manual (September 2007)
Debugging with WDB GUI
Debugging Memory Problems
Chapter 376
Viewing Memory Leaks and Heap Usage
To view the leak report and heap report using HP WDB GUI, complete the following steps:
1. Load the application to the debugger by selecting File->Load Program.
In the Load Program dialog-box, enter the executable name to load the executable or use
the PID to attach the process for debugging.
2. After you load the application, you can set the memory checking preferences by setting
the preferences in the Memory Checking window. Select Tools ->Memory Checking
to activate the Memory Checking window.
3. Set breakpoints by clicking the rectangular selection strip adjacent to the specific
program line-number in the source window. When the breakpoint is set, a red circular
button appears at the specified probe-point.
4. To view the heap report and leak reports while debugging the application, select the
Memory Usage tab in the command window. On selecting the Memory Usage tab, the
Memory Leaks and Memory Usage options are displayed.
• To view the leak report, select the Memory Leaks option. The stack-unwind
information for each leak can be obtained by expanding the enhanced array browser
for each leak.
• To see a heap report, select the Memory Usage option. The stack-unwind
information can be obtained by expanding the enhanced array browser for each block
of the heap.
Viewing the Incremental Heap Profile
HP WDB GUI 5.7 and later versions provide support to view the incremental heap profile for
a program.
To view the incremental heap profile for a program, complete the following steps:
• Load the program to WDB GUI.
• Select the Incremental Heap Check Settings option while setting the memory
debugging preferences in the Memory Check window.
• Select Tools->Memory Check.