HP WDB 5.9 Release Notes
pid is the process id.
Simplified steps for Run Time Checking in the Attach Mode
This section describes the simplified steps for Run Time checking in the Attach mode
using the +rtc option for the chatr command.
For debugging memory after attaching GDB to a running process, complete the
following steps:
1. Enter the following command at the HP-UX prompt to set the target application
to preload the librtc.[sl|so] runtime library.
$ chatr +rtc enable <executable>
2. Run the program.
3. Start the debugging session, as follows:
gdb -leaks <executable-name> <process-id>
For debugging threads after attaching GDB to a running process, complete the following
steps:
1. Set the LD_LIBRARY_PATH environment variable to appropriate directory based
on the platform.
2. Enter the following command at the HP-UX prompt to set the target application
to preload the librtc.[sl|so] runtime library:
$ chatr +rtc enable <executable>
3. Run the program.
4. Start the debugging session, as follows:
• Attach the debugger to the required process and enable thread debugging,
as follows:
gdb -thread -p <process-id>
Or
gdb -thread <executable> <process-id>
• Alternately, you can attach the process to the debugger and consequently
invoke thread debugging, as follows:
$ gdb <executable> <pid>
(gdb)set thread-check on
What Is New in This Version 11