Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
This command automatically enables dynamic library path look-up. No additional
environmental variables are required to be set.
14.11.3.2 Enabling and Disabling Advanced Thread Debugging Features
HP WDB 5.6 and later versions of the debugger provide advanced thread debugging
features for debugging multi-threaded applications running on 11i v2, or 11i v3. These
features are available as options to the set thread-check command. The syntax for
the set thread-check command is as follows:
set thread check { [on|off]| [option] [on|off] |[option] [num]}
The set thread-check [on|off] command enables or disables advanced thread
debugging. This feature is off by default. The set thread-check [on|off] command
must be enabled prior to running the application under the debugger, to force the
underlying runtime system to collect information on pthread primitives.
The advanced thread debugging features can be enabled only if the set thread-check
[on] command is enabled. The following advanced thread debugging options are
available for the set thread-check command:
recursive-relock [on|off] This set thread-check recursive-relock
[on|off] command checks if a thread has
attempted to acquire a non-recursive mutex that
it currently holds. Re-locking a non-recursive mutex
results in a deadlock. At run-time, the debugger
keeps track of each mutex in the application and
the thread that currently holds each mutex. When
a thread attempts to acquire a lock on a
non-recursive mutex, the debugger checks if the
thread currently holds the lock object for the
mutex. The debugger transfers the execution
control to the user and prints a warning message
when this condition is detected.
unlock-not-own [on|off] The set thread-check unlock-not-own
[on|off] command checks if a thread has
attempted to unlock a mutex or a read-write lock
that it has not acquired. The debugger transfers
the execution control to the user and prints a
warning message when this condition is detected.
mixed-sched-policy [on|off] The set thread-check
mixed-sched-policy [on|off] command
checks if a thread is waiting (blocked) on a mutex
or a read-write lock that is held by a thread with
a different scheduling policy. This is not an
application error and does not always result in
14.11 Thread Debugging Support 179