Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
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.
Complete support is available for debugging at the assembly language level. Stepping by instructions
(stepi/nexti) steps as expected and reports the associated source line numbers for each instruction.
NOTE: The -ipo compilation implies the +noobjdebug option because the -ipo object files
do not store executable code or debug info.
Debugging with ARIES
The ARIES fast interpreter emulates a complete set of non-privileged PA-RISC instructions with no
user intervention. During interpretation, it monitors the applications execution pattern and translates
only the frequently executed code into native Itanium (R)code at runtime.
Debugging the application using GDB under ARIES
ARIES supports debugging of HP 9000 HP-UX applications on HP-UX 11i Integrity servers using
the HP 9000 HP-UX GDB.
• Both the GDB and the application run under ARIES.
• No change in GDB user interface (including HP WDB GUI).
• Negligible loss of performance in interactive mode.
• The HP 9000 GDB is included by default as part of the Integrity HP-UX WDB/GDB package.
• All GDB commands work just like they would on an HP 9000 server.
Use the following steps to debug HP 9000 HP-UX applications on HP-UX 11i Integrity servers using
GDB:
1. Set the environment variable PA_DEBUG to 1.
2. Set the environment variable SHELL to point to an HP 9000 shell, copied from an HP 9000
HP-UX system from /usr/bin path.
3. Add /usr/ccs/bin to the PATH environment variable.
4. Invoke GDB as:
gdb PA-RISC_executable
After the debugging is finished, perform the following steps:
1. Unset the environment variable PA_DEBUG.
2. Restore the original value of the SHELL environment variable.
3. The rest of the debugging operations are the same as that on the HP 9000 HP-UX platform.
NOTE: Make sure that the user has write permission on /tmp directory and that there is
enough space to create a temporary file of one page size as obtained by
sysconf(_SC_PAGE_SIZE) system call.
Debugging with ARIES 175