Debugging with GDB (September 2007)
184 Debugging with GDB
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 c ode
(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 instruc-
tions 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 off this
feature. To explicitly turn off 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 opti-
mizations 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 un-
available, 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.
Complete support is available for debugging at the assembly language level. Stepping
by instructions (stepi/nexti) steps as expec ted and reports the associated source line
numb e rs for each instruction.
Note: The -ipo compilation implies the +noobjdebug option because the
-ipo object files do not store executable code or debug info.