Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

GDB will be able to access the globals or locals defined in other unstripped shared libraries loaded
into the stripped executable when you are in the right scope.
Backtrace on stripped frames
GDB should be able to backtrace properly stripped frames. Arguments will not be displayed (as
in the case of non -g binary). If it is a fully archived stripped binary, function names will not be
displayed (but PCs will be).
Command line calls to non-stripped library
Command line calls to the functions (exported symbols) in the stripped binary work fine. Command
line calls to the non-stripped library work normally regardless where the process is stopped.
Setting breakpoints in unstripped shared library
GDB will not be able to put breakpoints using symbolic names(of the symbols not in export list) or
line numbers in the stripped modules.
GDB will be able to place breakpoints using symbol names in the unstripped shared libraries
loaded into the stripped executable.
Displaying the current block scope information
The which command takes a symbol as an argument and prints the information on a given symbol.
It prints the following information:
current block scope addresses
line information of the definition of the symbol
filename in which the definition of the symbol occurs
The which command does not work for global and type symbols since they do not contain line
information.
Syntax:
which <symbol>
For example :
(gdb) which i Line 4 of "example.c" block starts at address 0x29a8 <main> and ends at 0x29e4 <main+0x3c>
Linux support
Linux Runtime Environment (LRE) on HP-UX Itanium enables users to execute Intel Itanium Linux
applications on HP-UX. HP WDB provides a prototype for LRE debugging, which allows you to
debug applications ported from Linux that run under LRE. This provides a minimal debugging
capability for LRE.
Source level debugging
GDB provides support for source level debugging with the help of the following command.
set src-no-g options Sets the source level debugging feature when the program is
compiled without the -g option. When the program is compiled
without the -g option, the debugger uses the minimal line table
information that is available, to provide limited source level
debugging. This option is available only on Integrity systems. By
default, the debugger provides source level debugging without
Displaying the current block scope information 183