HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
a
Aries(5) Aries(5)
(Itanium(R)-based System Only)
4. Run gdb as:
$ gdb PA_binary
The rest of the debugging process is the same as that followed on the PA-RISC HP-UX platform. All com-
mands of the
gdb debugger are supported subject to limitations listed under Limitations of PA-RISC
GDB Support .
After debugging is finished, perform the following steps.
1. Unset the environment variable
PA_DEBUG.
2. Restore the original value of the
SHELL environment variable.
Limitations of PA-RISC GDB Support
The following are current limitations of PA-RISC
gdb support.
1. No support for debuggers other than PA-RISC HP-UX
gdb for debugging an emulated PA-RISC
application on an Itanium-based systems.
2. No support for attaching the debugger to a running emulated PA-RISC application on Itanium-based
system.
3. No support for conditional reporting of system call entry and exit events.
4. No support for old
gdb versions (of HP-UX 10.20 and earlier). However, debugging HP-UX 10.20
applications using a HP-UX 11.0 PA-RISC gdb is supported.
5. PA-RISC
gdb behaves differently for child processes created using
fork() and vfork() system
calls. Since in Aries
vfork() calls made by application are replaced by fork() calls, the exact
behavior shown by PA-RISC gdb on a PA-RISC HP-UX platform is not shown by the PA-RISC
gdb
running under Aries on Itanium-based HP-UX platform in this case.
6. If the debugged process is hanging in a blocking system call, any attempt to get to the
gdb command
prompt by pressing
ˆC does not work. The process has to be killed from outside.
7. Aries does not support debugging of PA-RISC applications which are linked with MxN pthreads
library. See the section Emulation of MxN Threads for more information.
Generation of PA-RISC HP-UX Compatible Core File
Aries supports creation of PA-RISC core files on Itanium-based system, when the emulated PA-RISC
application dumps core.
The size of the core file is limited by
ulimit() and/or
setrlimit() values. See ulimit(2) and
setrlimit (2).
The PA-RISC application core file generated by Aries will have the name as
core.PA_application_name.
The PA-RISC HP-UX debugger is required to analyze core files generated by Aries for PA-RISC applica-
tions. For instance, the PA-RISC application core file generated by Aries can be debugged using
/usr/ccs/bin/gdbpa on Itanium-based system. Alternately, the application’s core file can be taken
to a PA-RISC machine and debugged using a PA-RISC debugger, though it is a very tedious process and
likely to be error-prone. See section Debugging Aries-Generated PA-RISC Core File on a Different
Machine for more information.
After Aries has successfully written core file for PA-RISC application, it will print the following message
on
stderr:
ARIES32/64: Core file for PA32/64 application saved to
path/core.PA_application_name
If the emulated PA-RISC application results in a core file named just core or core.pid, it will be an
Aries core dump and not that of the emulated PA-RISC application.
An Aries-Generated PA-RISC HP-UX compatible
core file is recognized by the file command on PA-
RISC and Itanium-based HP-UX machines. See file(1) for more information.
Debugging Aries-Generated PA-RISC Core File on a Different Machine
Debugging Aries-generated PA-RISC core file on different machine (PA-RISC or Itanium-based system)
can be done only with PA-RISC wdb-3.0.01 or later.
Use the following steps to debug an Aries-generated PA-RISC core file on a machine other than the one on
which the core file was generated.
HP-UX 11i Version 2: September 2004 − 2 − Hewlett-Packard Company Section 5−−41