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

Table Of Contents
the variable at a source code location either before or after the reported source code
location.(If the printed value is not current with respect to the current source line, the
printed value will be the immediately previous or immediately later value for the variable.)
Backtrace commands (backtrace) can be used to display the current nest of function
calls, including calls that are inlined. When stopped within the code for an inlined call,
the parameters and the local variables of the inlined routine are not reported or available.
The disassem command does not work for functions that have no code (because all
calls to these functions are inlined or these functions are not called at all). HP WDB 5.7
and later versions provide support to prevent the debugged program from stopping at
instructions that are predicated false. The program execution can be stopped by a
software breakpoint, a hardware breakpoint, or an asynchronous signal. In the case of
optimizations such as if-conversion, the predicated false instructions indicate that an
alternate source path is executed. Hence, stopping the program at a predicated false
instruction results in the misleading conclusion that the path corresponding to the
predicated false instruction is executed. To prevent this ambiguity, HP WDB does not
stop at predicated false instructions.
The predicated false instructions are equated to NOPs (No OPeration), because these
instructions do not modify the processor state. The exception to this rule is the use of
certain instructions, such as wtop, wexit, and frcpa, which modify the processor state
even when predicated false. In such cases, the debugger stops at the instructions
irrespective of the predicate value of the instructions. Assembly and low-level programmers,
who require the old behavior of the debugger to stop at the instructions irrespective of
the predicate value of these instructions, can explicitly turn o this feature. To explicitly
turn o this feature, enter the following command at the gdb prompt:
(gdb) set no-predication-handling
The following limitations apply when debugging optimized code:
Support for high-level loop transformations such as modulo-scheduled loops, or
LNO-optimized loop nests is limited. (This limited support includes all loop
optimizations that are enabled at +O3 and above, and some loop optimizations at
+O2 or -O.)
Debug support for local aggregates and arrays is limited.
Complete debug support for inlined subroutines is not available.
Values that are not at the current code location will be reported as being unavailable,
even if these values can be computed from some other values that are available.
Step operations may include occasional "backwards" steps, because of the re-
ordered code during optimization.
The program stops at asynchronous signal stops even if the reported instruction is
predicated false.
14.30 Debugging optimized code 231