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

Table Of Contents
pthread_cond_wait() routine. It is an
additional check provided by HP WDB.
thread-exit-own-mutex
[on|off]
The set thread-check
thread-exit-own-mutex [on|off]
command checks if any thread has terminated
execution without unlocking the mutexes or
read-write locks that are associated with the
thread. The debugger transfers the execution
control to the user and prints a warning message
when this condition is detected. This situation can
result in deadlocks if other threads are waiting to
acquire the locked mutexes or read-write locks.
thread-exit-no-join-detach
[on|off]
The set thread-check
thread-exit-no-join-detach [on|off]
command checks if a thread has terminated
execution (either successfully or because of an
exception or a cancel) without joining or
detaching the thread. The debugger transfers the
execution control to the user and prints a warning
message when this condition is detected. The
resources associated with a terminated thread
continue to exist in the application if the thread is
not joined or detached. The thread must be
explicitly joined or detached, or it must be created
with the detach attribute. When an application
repeatedly creates threads without a join or detach
operation, the application leaks resources. This
may result in application failure.
stack-util [num] The set thread-check stack-util [num]
command checks if any thread has used more
than the specified percentage [num] of the stack
allocation. The debugger transfers the execution
control to the user and prints a warning message
when this condition is detected. You can use this
option to verify if there is a margin of safety in
stack utilization by the threads. The application
must ensure that the thread stack size is sufficient
for all the operations of the thread. Each thread
is assigned a stack allocation when it is created.
If the stack allocation is not specified for a thread,
the default value is used. The stack allocation
cannot be modified after a thread is created. If a
thread attempts to use more stack space than the
14.11 Thread Debugging Support 181