Debugging with GDB (September 2007)
Chapter 14: HP-UX Configuration-Specific Information 159
[num]. The debugger transfers the execution control to the use r and prints a
warning message when this condition is detected.
14.11.3.3 Commands to view information on pthread
primitives
WDB 5.5 and later versions of the debugger display extended information on pthread
primitives for multi-threaded applications running on HP-UX 11i v2, or 11i v3. This
feature is available only if the set thread-check [on|off] command is enabled. The
following commands enable you to view extended information on threads, mutexes,
read-write locks and conditional variables in multi-threaded applications:
• info thread [thread-id]
The info thread [thread-id] com mand displays a list of known threads. If a
thread-id is provided, the command displays extended information on the spe ci-
fied thread.
• info mutex [mutex-id]
The info mutex [mutex-id] command displays a list of known mutexes. If a
mutex-id is provided, the command displays extended information on the specified
mutex.
• info condvar [condvar-id]
The info condvar [condvar-id] command displays a list of known condition
variables. If condvar-id is provided, the command displays extended information
on the specified condition variable.
• info rwlock [rwlock-id]
The info rwlock [rwlock-id] command displays a list of known read-write locks.
If rwlock-id is provided, the command displays extended information on the
specified read-write lock.
14.11.4 Debugging Threads Interactively After Attaching to a
Process
HP WDB provides support to attach a running process to the debugger. To use thread
debugging commands after attaching GDB to a running process, complete the following
steps:
1. Set LD_LIBRARY_PATH to include the appropriate directory, by entering one of the
following commands:
- For 32 bit IPF applications,
LD_LIBRARY_PATH=/opt/langtools/wdb/lib/hpux32
- For 64 bit IPF applications,
LD_LIBRARY_PATH=/opt/langtools/wdb/lib/hpux64
- For 32 bit PA applications,
LD_LIBRARY_PATH=/opt/langtools/wdb/lib