Debugging Core Files Using HP WDB
Example 8 (page 40) illustrates the core file debugging for a stripped binary when the symbol
table of the unstripped program is available.
Example 9 (page 41) 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 23)
Limitations for Debugging Core Files Created by Binaries Compiled Without the -g
Option
The following limitations apply for core files that are created by binaries compiled without the
-g option:
• Argument information in the stack traces is not displayed.
• Local variables and type information are not displayed.
• Inline frame information is not displayed. The source line information is not displayed for
core files that are created by PA-RISC binaries.
In the case of Integrity systems (Itanium-based binaries), the source line information is
displayed for core files.
NOTE: In the case of core files that are created by Itanium-based binaries, the source line
information is available, irrespective of whether the binary is compiled with the -g option,
or not. To strip the line number information for Itanium-based binaries, you must use the
strip -l command orr the +nosrcpos linker option.
For an illustration of these limitations, see “Sample Debugging Session 2” in Example 5 (page 23).
Limitations for Debugging Core Files Created by Stripped Binaries
The following limitations apply for core files that are created by a stripped executable:
• Local variables and static variables in a stripped module are not displayed.
• Global variables and type information in a stripped module are not displayed. However,
the debugger can access the global or local variables (within the scope of the variables) that
are defined in other unstripped shared libraries, which are loaded in to the stripped
executable.
• Argument information in the stack traces is not displayed.
Debugging Core Files Created by Optimized or Stripped Binaries 21