gpt4 book ai didi

c - GDB 中不显示函数名称

转载 作者:行者123 更新时间:2023-11-30 15:32:33 26 4
gpt4 key购买 nike

我有核心转储文件。我将 C 二进制应用程序(使用“调试打开”选项构建)保留在 GDB 路径中,这导致了核心转储以及核心文件。

但是当我执行GDB时,我得到的堆栈信息如下:

sura@hyde:/abc/def/ghi/appln [css_absmin] gdb application_name core_1206
HP gdb 3.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.0 (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.
..

warning: exec file is newer than core file.
Core was generated by 'application_name'.
Program terminated with signal 11, Segmentation fault.
#0 0xc0199640 in ?? ()
(gdb) where
#0 0xc0199640 in ?? ()
(gdb) bt
#0 0xc0199640 in ?? ()
(gdb)

C 二进制文件在 PA-RISC (unix) 中编译。

如何获取有问题的函数名称?

最佳答案

桑达尔,

您发布了有关 gdb 的问题,但 HP-UX gdb 不是 GNU gdb,而是由 HP 定制的 gdb。所以它被称为Hewlett-Packard Wildebeest(基于GDB) - wdb。您的问题是您的 wdb 版本非常旧。现在,HP 为运行 HP-UX 11i v1、11i v2 或 11i v3 的 HP 9000 系统提供 gdb 6.5 ( http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=29080f1bace021100f1bace02110275d6e10RCRD ),而您的版本是 3.0!

您似乎使用的是 HP-UX 11.00,因此您可以在 HP-UX 论坛上询问 HP 11.00 的最新 wdb 是什么。在这里提问:http://h30499.www3.hp.com/t5/Languages-and-Scripting/bd-p/itrc-150# 。另外,在为 PA-RISC 安装最新的 wdb 后,尝试再次使用它进行回溯。我希望您能使用最新的 wdb 获得正确的回溯。

关于c - GDB 中不显示函数名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24199249/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com