Debugging with GDB (September 2007)
Chapter 14: HP-UX Configuration-Specific Information 173
private, regardless of whether the chatr command is run for a particular shlib with
+dbg or not.
The -mapshared option is used to save virtual memory for debugging applications
with large amounts of code in shared libraries on machines with simultaneous debug
sessions. The chatr +dbg option, and the _HP_DLDOPTS environment variable are used
to identify shared libraries for debugging. The -mapshared option ensures that the text
segments of all other shared libraries is shared across the system. The s hared libraries
are not mapped private and cannot have breakpoints set in them.
The set mapshared on command can be used to change modes from the (gdb) prompt.
(gdb) set mapshared on
The set mapshared off command can be used to load shared libraries after the current
point is mapped private.
(gdb) set mapshared off
The -mapshared option is implemented on b oth PA-RISC and Itanium platforms in
HP WDB 5.2. This option is provided in the WDB GUI and HP WDB. The default
behavior does not change if the -mapshared option for all shared libraries in processes
started under the debugger, or dynamically loaded after an attach, are mapped private.
14.20.6 Setting breakpoi nts in shared library
Breakpoints can be set on functions in a shared library, by specifying the library name
with the function name.
(gdb) b libutil.sl:fun Breakpoint 1 at 0x79a86228: file simple.c,
line 13 from /CLO/Components/WDB/build/hppa1.1-hp-hpux11.00/gdb/
simple_shared/lib.sl
14.21 Language support
14.21.1 Enhanced Java Debugging Support
The following commands have bee n added to enhance Java debugging support:
backtrace
Prints backtrace of mixed Java and native frames. Standard backtrace
command of GDB has been enhanced to work with mixed Java and native
stack frames.
info frame
Prints Java frame specific information for a Java frame. Standard frame
command of GDB has been enhanced to interpret a Java stack frame.
info threads
Prints state information for Java threads.
thread Prints detailed state information for the current Java thread.