Debugging Dynamic Memory Usage Errors Using HP WDB (5900-1474; WDB 6.2; January 2011)

$ gdb high
HP gdb 5.6 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.6 (based on GDB) is covered
by the GNU General Public License.
Type "show copying" to see the conditions to change it and/or
distribute copies. Type "show warranty" for warranty/support.
..
(gdb) b 40 /*set a breakpoint at the end of your application to view
the highest break value for the current run*/
Breakpoint 1 at 0x4000b90:2: file high.c, line 40 from high.
(gdb) set heap-check on
(gdb) r
Starting program: high
Breakpoint 1, main () at high.c:40
40 };
(gdb) info heap high-mem
Analyzing heap ...
High memory mark stat
High water mark updated count: 2
No. Total bytes Blocks Address Function
0 100 1 0x4044ff20 func2()
(gdb)
Case 2: The set heap-check high-mem-count <X_number> command stops
execution when the break value has moved <X_number> of times.
44