HP (Hewlett-Packard) 5992-4701 Computer Hardware User Manual


 
14.35.1 Support for command line calls in a stripped executable on PA-RISC systems
In WDB, to perform command line calls in a shared library without the help of dynamic
linker (using end.o), you must execute the following command:
chatr -B immediate <executable>
In addition, modify all the calls to shl_load() to specify BIND_IMMEDIATE.
To perform command line calls after attaching a running process to GDB, you must
execute one of the following commands:
/opt/langtools/bin/pxdb -s on <executable>
chatr +dbg enable <executable>
14.35.2 Additional support for command line calls in a stripped executable
HP WDB enables you to perform command line calls in a stripped executable. The
various scenarios in which you can make command line calls in a stripped executable
are as follows:
14.35.2.1 For 32-bit applications:
To perform command line calls in a shared library, without the help of dynamic linker
(using end.o), you must perform the following operations:
Execute the chatr -B immediate <executable> command.
Modify all the calls to shl_load() to specify BIND_IMMEDIATE, if any.
To perform command line calls after attaching GDB to a running process, without the
help of dynamic linker (using end.o), you must do the following for the program:
Execute the chatr -B immediate <executable> command
Modify all the calls to shl_load() to specify BIND_IMMEDIATE, if any.
Execute the /opt/langtools/bin/pxdb -s on <executable> or chatr
+dbg enable <executable> command.
On HP-UX 11i v3 Integrity systems, WDB enables automatic debugging of shared
libraries without them being mapped private while attaching to a running program.
For enabling automatic debugging of shared libraries, you must install the kernel
patches PHKL_38651 and PHKL_38778.
To avoid changing of the run-time binding behavior of a program to BIND_IMMEDIATE,
to perform command line call, do the following:
Use the linker option, +ea, to export symbols from an object file.
Install the linker patch, PHSS 28870 (for 11.0) or PHSS 28871 (for 11i).
Execute the following commands:
cc -c file.c cc file.o -Wl,+ea,/opt/langtools/lib/end.o -s
14.35 Support for command line calls in a stripped executable 239