HP-UX Reference (11i v3 07/02) - 5 Miscellaneous Topics (vol 9)
a
Aries(5)
Itanium(R)-based Systems Only
Aries(5)
4. Run gdb as:
$ gdb PA-RISC_binary
5. Note: Make sure that user has write permission on
/tmp directory and that there is space to create a
temporary file of one page size as obtained by
sysconf(_SC_PAGE_SIZE)
system call.
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.
Attaching PA-RISC GDB to PA-RISC process under Aries
An already running PA-RISC process can be debugged on Itanium-based systems by attaching PA-RISC
debugger gdb. After attaching PA-RISC gdb to a PA-RISC process under Aries all debugging operations
remain same as that on a native PA-RISC system.
Attach
gdb to already running PA-RISC process under Aries using the following steps :
1. Perform the preparatory steps as described above for debugging PA-RISC application under Aries using
PA-RISC gdb.
2. $ gdb PA-RISC_binary PA-RISC_processID
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 appli-
cation on an Itanium-based systems.
2. 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 (and newer) PA-RISC gdb is supported.
3. PA-RISC
gdb behaves differently for child processes created using
fork() and vfork() system
calls. Since in Aries
vfork() calls made by PA-RISC 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.
4. If the debugged process is blocking in a 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.
5. Aries does not provide true emulation of MxN threads and thus does not support debugging of PA-RISC
applications that are linked with MxN pthreads library.
Note that the PA-RISC applications linked with MxN pthreads library are emulated by Aries as tradi-
tional 1x1 threads and thus can only be debugged under Aries as any other non-MxN multithreaded
application. See the section Emulating 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 appli-
cation 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-
RISC_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:
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 65