Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)

14.11.5.2 Limitations in Batch mode of thread debugging
The feature does not obtain the thread-error information in batch mode for forked process in a
multiprocessing application. However, if the librtc.sl library is preloaded, the debugger
obtains the thread-error information in the batch mode for exec-ed application.
You cannot specify an alternate output directory for the thread-error log. The thread- error log file
is output into the current working directory only.
HP WDB cannot execute both batch mode thread check and batch mode heap check together. If
the rtcconfig file has both entries, then batch heap check overrides the batch thread check.
14.11.6 Thread Debugging in +check Mode
A new compiler option +check=thread enables batch mode thread debugging features of HP
WDB.
NOTE: This feature is available only for compiler versions A.06.20 and later.
It is a convenient way of launching the batch mode advanced thread checking features without
setting any other environment variables at runtime. In other words, batch mode thread checking
has two modes of invocation. The first method is to use the run- time environment variables
LD_LIBRARY_PATH, LD_PRELOAD, and BATCH_RTC on existing precompiled applications. The
second method is to use the +check=thread option at the compile time.
+check=thread must only be used with multithreaded programs. It is not enabled by
+check=all. This functionality requires HP WDB 5.9 or later.
The default configuration used by +check=thread option is as follows:
thread-check=1;recursive-relock=1;unlock-not-own=1;
mix-sched-policy=1;cv-multiple-mxs=1;cv-wait-no-mx=1;
thread-exit-own-mutex=1;thread-exit-no-join-detach=1;stack-util=80;
num-waiters=0;frame_count=4;output_dir=.;
Behavior of the +check=thread option can be changed by users by providing their own
rtcconfig file. The user specified rtcconfig file can be in the current directory or in a directory
specified by the GDBRTC_CONFIG environment variable.
If any thread error condition is detected during the application run, the error log will be output to
a file in the current working directory. The output file will have the following naming convention:
<executable name>.<pid>.threads,
where <pid> is the process identifier.
14.11.7 Known issues with Thread Debugging for Interactive and Batch mode
Issue 1:
During the execution of advanced thread checking for applications that fork, in the interactive
mode, the following message appears if the GDB follows the child:
Pthread analysis file missing!
This error message appears because the thread-error information for the forked process is not
available.
However, if the forked process exec()s another binary, the thread-error information is available
for the exec -ed binary.
Issue 2
In both interactive and batch modes, if the applications exceed their thread stack utilization, the
following error message appears:
Error accessing memory address
14.11 Thread Debugging Support 149