Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)
Debugging Core Files Created by Stripped Binaries (When the Symbol Table is Available)
You can debug a core file that is created by a stripped binary effectively, if the symbol
table for the unstripped version of the program (before the program is stripped) is
available.
Alternately, you can also debug the core file that is created by a stripped program if the
symbol table is available from another program, which functionally uses the same symbols,
but has a different link order.
Example 10 (page 50) illustrates the core file debugging for a stripped binary when the
symbol table of the unstripped program is available.
Example 11 (page 52) illustrates the core file debugging for a stripped binary when the
symbol table is available from another program, which uses the same symbols, but in a
different link order.
Debugging Core Files Created by Optimized or Stripped Binaries
All core file debugging features are available for unstripped binaries and shared libraries
that are built using the -g option.
However, the following limitations apply for core files that are created by binaries that
are compiled without the -g option, and for core files created by optimized (optimization
level 2 or above) and stripped binaries.
Limitations for Debugging Core Files Created by Optimized Binaries
The following limitations apply for core files that are created by optimized binaries
(optimization level 2 or above) that are compiled with the -g option:
• Local variables and arguments in an optimized module are not displayed.
• The backtrace information displays the inlined functions. However, the line numbers
are not displayed accurately at +O2 and higher levels of optimization.
For an illustration of these limitations, see “Sample Debugging Session 1” in Example 5
(page 21)
18