Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)

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 inline generate_core_dump () at a.c:11
11 printf ("Generated coredump\n");
(gdb) bt
#0 inline generate_core_dump () at a.c:11
#1 0x4000a00:0 in inline foo () at a.c:30
#2 0x40009b0:1 in main () at a.c:37
(gdb) up
#1 0x4000a00:0 in inline foo () at a.c:30
30 generate_core_dump();
(gdb) p local_j
No symbol "local_j" in current context.
The debugger cannot display information about the arguments and local variables
because the program is compiled with the -O option (level 2 optimization). However,
the debugger can display the inlined functions in the backtrace and provide the line
number information. The line numbers may not be displayed accurately because the
code is moved during optimization.
If you encounter issues while debugging inlined functions, you can use the +d compiler
option to disable inlining, as follows:
$ aCC -g -O +d a.c
Examples on Integrity systems built without -g display significantly greater inlining and
source line information than the same examples that are built on HP 9000 systems.
Sample Debugging Session 2
Debugging a Core File Created by Code Compiled Without the
-g
Option
22