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

Starting program: null
Breakpoint 1, main () at null-check.c:25
25 test_null_check();
(gdb) catch nomem
Catchpoint 3 (nomem)
(gdb) c
Continuing.
warning: Malloc is returning simulated 0x00000000 value
0x70e78e8c in __rtc_nomem_event+0x4 ()
from /opt/langtools/lib/librtc.sl
(gdb) c
Continuing.
Breakpoint 2, test_null_check () at null-check.c:19
19 printf("Out of memory scenario simulated\n");
(gdb) bt
#0 test_null_check () at null-check.c:19
#1 0x2c70 in main () at null-check.c:25
#2 0x70ee3478 in _start+0xc0 () from /usr/lib/libc.2
(gdb) c
Continuing.
Out of memory scenario simulated
Program exited normally.
Memory-Debugging Features of WDB 31