Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
Pre-requisites for Batch mode of Thread Debugging
The various prerequisites for Batch mode of Thread Debugging are as follows:
• The thread-debugging feature in HP WDB is dependent on the availability of the dynamic
linker version B.11.19.
• Advanced thread-debugging feature requires the pthread tracer library which is available by
default on systems running HP-UX 11i v2 or later.
Steps to debug threads in batch mode
1. Compile the source files.
Set the LD_LIBRARY_PATH environment variable, based on the platform as follows:
• For 32 bit IPF applications, set
LD_LIBRARY_PATH=/opt/langtools/wdb/lib/hpux32
• For 64 bit IPF applications, set
LD_LIBRARY_PATH=/opt/langtools/wdb/lib/hpux64
• For 64-bit PA applications, set
LD_LIBRARY_PATH=/opt/langtools/wdb/lib/pa20_64
2. Map the share libraries as private for HP 9000 systems using the following command:
$ chatr +dbg enable ./<executable>
NOTE: This step is not applicable for Integrity systems.
3. Create a configuration file, rtcconfig to specify the various thread conditions that you want
the debugger to detect.
NOTE: The configuration file contains lines of the following form:
set thread-check [on|off] | [option] [on|off] | [option] [num]
And/Or
set frame-count [num]
And/Or
files=<name of the executable on which the thread checking is to be
done>
For more information, see “Enabling and Disabling Advanced Thread Debugging Features”
(page 135).
4. Set the environment variable BATCH_RTC to on as:
Set BATCH_RTC=on
140 HP-UX Configuration-Specific Information