Debugging Dynamic Memory Usage Errors Using HP WDB v6.3 (5900-2181, August 2012)
[/opt/langtools/lib/hpux32/librtc.sl]
(3) 0x60000000cac17200 __rtc_free + 0x160 at
../../../Src/gnu/gdb/infrtc.c:2977
[/opt/langtools/lib/hpux32/librtc.sl]
(4) 0x0000000004000bc0 main + 0x230 at memtest.c:25[memtest]
(5) 0x60000000c0029000 main_opd_entry + 0x50[/usr/lib/hpux32/dld.so]
$ cat .//memtest.8494.leaks
40 bytes leaked in 10 blocks
No. Total bytes Blocks Address Function
0 40 10 0x4006e7d0 main()
------------------------------------------------------------
Detailed Report
------------------------------------------------------------
40 bytes leaked in 10 blocks (100.00% of all bytes leaked)
These range in size from 4 to 4 bytes and are allocated
#0 main() at memtest.c:19
#1 main_opd_entry() from /usr/lib/hpux32/dld.so
------------------------------------------------------------
$ cat memtest.8494.heap
40 bytes allocated in 10 blocks
No. Total bytes Blocks Address Function
0 40 10 0x4006e8f0 main()
------------------------------------------------------------
Detailed Report
------------------------------------------------------------
40 bytes in 10 blocks (100.00% of all bytes allocated)
These range in size from 4 to 4 bytes and are allocated
#0 main() at memtest.c:19
#1 main_opd_entry() from /usr/lib/hpux32/dld.so
------------------------------------------------------------
Debugging Multiple Applications in Batch Mode
To debug multiple applications in the batch mode, complete the following steps:
1. Compile the source files.
2. Set the required variables in the rtcconfig configuration file, as follows:
$ cat rtcconfig
"rtcconfig" 5 lines, 83 characters
set heap-check on
set heap-check free on
files=exec1:exec2:exec3
output_dir= ./
3. Set the required environment variables as follows:
export BATCH_RTC=on
Supported Modes of Memory-debugging in WDB 57