HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)

a
Aries(5) Aries(5)
(Itanium(R)-based System Only)
NAME
Aries - emulate PA-RISC HP-UX applications on Itanium-based processor family running HP-UX
DESCRIPTION
Aries is a dynamic binary emulator which transparently emulates 32-bit and 64-bit PA-RISC HP-UX
applications on Itanium-based HP-UX machines. The name
ARIES expands to Automatic Recompilation
and
Integrated Environment Simulation. Aries is transparent in the sense that:
The PA-RISC HP-UX application is not re-compiled.
The user does not explicitly invoke Aries.
The Itanium-based HP-UX operating system kernel recognizes a PA-RISC HP-UX executable and invokes
Aries to emulate the application.
Aries consists of 4 shared libraries :
/usr/lib/hpux32/pa_boot32.so
/usr/lib/hpux32/aries32.so
/usr/lib/hpux64/pa_boot64.so
/usr/lib/hpux64/aries64.so
aries32.so is the shared library that contains the Aries emulator for 32-bit applications.
pa_boot32.so contains code to load aries32.so. Likewise, aries64.so is the emulator for 64-bit
applications. pa_boot64.so loads aries64.so
. Upon detecting a 32-bit PA-RISC HP-UX execut-
able, the Itanium-based HP-UX kernel invokes
pa_boot32.so, which loads aries32.so into memory
and sets it up to emulate the PA-RISC HP-UX executable. Likewise,
aries64.so is loaded for a 64-bit
PA-RISC HP-UX executable.
Aries consists of two major components:
Instruction set architecture (ISA) emulation engine
Environment emulation engine
The ISA emulation engine is comprised of a fast interpreter and a dynamic translator. The interpreter
emulates one instruction at a time, and when a PA-RISC basic block has been executed a sufficient
number of times, the dynamic translator is called to emulate the basic block. The dynamic translator
generates Itanium native code functionally equivalent to the PA-RISC basic block. Translated code is
stored in translation code buffer. Any further reference to the translated basic block does not need to be
interpreted or translated.
The environment emulation engine is responsible for the PA-RISC application’s system calls, signal
delivery, threads management, and so forth. Interactions among various Aries subsystems are controlled
and facilitated by the control system, which also keeps mapping between the PA-RISC application’s basic
block addresses and the translated code basic blocks in the translated code buffer.
PA-RISC HP-UX GDB DEBUGGING SUPPORT
Aries supports debugging of PA-RISC HP-UX applications on Itanium-based HP-UX systems, using PA-
RISC HP-UX
gdb.
On Itanium-based HP-UX systems,
/usr/ccs/bin contains the PA-RISC gdb32 and gdb64 binaries.
A symbolic link named /usr/ccs/bin/gdbpa points to /usr/ccs/bin/gdb32
. The Itanium-based
HP-UX system´s
gdb debugger recognizes the binary being debugged as a PA-RISC binary and launches
/usr/ccs/bin/gdbpa under Aries.
Debugging PA-RISC Applications on Itanium-based Systems
Use the following steps to debug PA-RISC applications on Itanium-based HP-UX systems using PA-RISC
gdb.
1. Set the environment variable
PA_DEBUG to 1.
2. Set the environment variable
SHELL to point to a PA-RISC shell, which should be present on the
Itanium-based machine on which debugging is being carried out. You can obtain a PA-RISC shell
from a PA-RISC HP-UX machine from /usr/bin.
3. Add
/usr/ccs/bin to the PATH environment variable.
Section 540 Hewlett-Packard Company 1 HP-UX 11i Version 2: September 2004