Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)
$ aCC a.c
$ /opt/langtools/bin/gdb ./a.out core
HP gdb for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
SEGV_ACCERR - Invalid Permissions for object
#0 0x40009b0:1 in generate_core_dump () at a.c:10
10 *(int*)i = 10;
(gdb) bt
#0 0x40009b0:1 in generate_core_dump () at a.c:10
#1 0x4000b40:0 in foo () at a.c:30
#2 0x4000bd0:0 in main () at a.c:37
(gdb) p local_j
No symbol "local_j" in current context.
(gdb)
In the case of core files created by PA-RISC - based binaries, the source line information
is not available if the binary has not been compiled with the -g option. The information
about the arguments and the local variables is not displayed.
In the case of core files created by Itanium-based binaries, the source line information
is available, irrespective of whether the binary is compiled with the -g option, or not.
Sample Debugging Session 3
Debugging a Core File Created by a Stripped Binary When the Symbol Table is Not
Available
Debugging Core Files Created by Optimized or Stripped Binaries 23