4

When I used gdb7.6 to analyse the corefile,gdb print the following error:

"./core: no core file handler recognizes format"

My Environment:

  • HP-UX hp12161 B.11.31 U ia64 0546304299.
  • Compiler:gcc4.7.2.
  • gdb7.6 Configure=./configure --enable-64-bit-bfd.

I noticed that in ia64-hpux platform gdb not call set_gdbarch_regset_from_core_section、 deprecated_add_core_fns Interface.

How should I do to solve this problem?

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240

1 Answers1

0

You should use the HPE Wildebeest Debugger. This is HPE's fork of GNU gdb that works on hp-ux. The GNU gdb does not work on hp-ux, neither on executables built with hp-ux aCC nor with those built with gcc.

For example, with whatever version of gdb is available on this system:

[ hp-ux_ia64 ~ ] $ gcc --version
gcc (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I make a program dump core:

[ hp-ux_ia64 ~ ] $ cat > 1.c
main () { ((int*)0)[0]=1; }
[ hp-ux_ia64 ~ ] $ gcc 1.c
[ hp-ux_ia64 ~ ] $ ./a.out
Segmentation fault (core dumped)

Running GNU gdb on it, I can reproduce the problem you face.

[ hp-ux_ia64 ~ ] $ /usr/local/bin/gdb -c core
GNU gdb (GDB) 7.6.2
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ia64-hp-hpux11.23".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
"/user/ranga/core": no core file handler recognizes format
(gdb) quit

HPE gdb gives me a proper stack trace.

[ hp-ux_ia64 ~ ] $ /opt/langtools/bin/gdb -c core
HP gdb 6.7 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2011 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.7 (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.

Reading symbols from a.out...(no debugging symbols found)...done.
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
SEGV_ACCERR - Invalid Permissions for object
#0  0x4000870:0 in main+0x10 ()
(gdb) bt
#0  0x4000870:0 in main+0x10 ()
(gdb)
ranga
  • 372
  • 1
  • 4