【问题标题】:gdb7.6 have no core file handler recognized formatgdb7.6 没有核心文件处理程序识别格式
【发布时间】:2013-05-14 13:37:54
【问题描述】:

当我使用gdb7.6分析corefile时,gdb打印如下错误:

"./core: 没有核心文件处理程序识别格式"

我的环境:

  • HP-UX hp12161 B.11.31 U ia64 0546304299。
  • 编译器:gcc4.7.2.
  • gdb7.6 配置=./configure --enable-64-bit-bfd.

我注意到在ia64-hpux平台gdb没有调用set_gdbarch_regset_from_core_section、deprecated_add_core_fns接口。

我应该如何解决这个问题?

【问题讨论】:

    标签: gdb hp-ux


    【解决方案1】:

    您应该使用HPE Wildebeest Debugger。这是适用于 hp-ux 的 HPE 的 GNU gdb 分支。 GNU gdb 不适用于 hp-ux,既不适用于使用 hp-ux aCC 构建的可执行文件,也不适用于使用 gcc 构建的可执行文件。

    例如,无论在这个系统上使用什么版本的 gdb:

    [ 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.
    

    我做了一个程序转储核心:

    [ 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)
    

    在其上运行 GNU gdb,我可以重现您面临的问题。

    [ 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 为我提供了正确的堆栈跟踪。

    [ 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)
    

    【讨论】:

      猜你喜欢
      • 2013-07-20
      • 1970-01-01
      • 2011-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-17
      相关资源
      最近更新 更多