Linux gdb奇怪的回溯,没有函数名,只有?

Linux gdb奇怪的回溯,没有函数名,只有?,linux,crash,gdb,core,Linux,Crash,Gdb,Core,我们的程序只由C编写,使用标志编译-g-O2-Wall 程序有时会崩溃,我们得到了一些崩溃信息,但是没有 函数名,只有一些“?”标记,我们不知道 错误发生了 我们看到了“程序以signalSIGSEGV终止”,但它是 无法告诉我们错误发生在哪里 我们的系统是ubuntu16.04.3lts(GNU/Linux 4.4.0-98-generic x86\u 64) 下面是崩溃信息: sudo gdb test core.31137 [sudo] password for dbsj:

我们的程序只由C编写,使用标志编译
-g-O2-Wall

程序有时会崩溃,我们得到了一些崩溃信息,但是没有 函数名,只有一些“?”标记,我们不知道 错误发生了

我们看到了“程序以signal
SIGSEGV
终止”,但它是 无法告诉我们错误发生在哪里

我们的系统是
ubuntu16.04.3lts(GNU/Linux 4.4.0-98-generic x86\u 64)

下面是崩溃信息:

 sudo gdb test core.31137   
[sudo] password for dbsj:   
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1  
Copyright (C) 2016 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 "x86_64-linux-gnu". 
Type "show configuration" for configuration details. 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
Find the GDB manual and other documentation resources online at: 
<http://www.gnu.org/software/gdb/documentation/>. 
For help, type "help". 
Type "apropos word" to search for commands related to "word"... 
Reading symbols from test...(no debugging symbols found)...done. 

 warning: core file may not match specified executable file. 
[New LWP 31147] 
[New LWP 31149] 
[New LWP 31142] 
[New LWP 31137] 
[New LWP 31141] 
[New LWP 31148] 
[New LWP 31143] 
[New LWP 31139] 
[New LWP 31145] 
[New LWP 31144] 
[New LWP 31146] 
[New LWP 31140] 
Core was generated by `./skynet dreamgame/config_publish/dataserver_patched'. 
Program terminated with signal SIGSEGV, Segmentation fault. 
#0  0x000000000044a0f3 in ?? () 
[Current thread is 1 (LWP 31147)] 
(gdb) where 
#0  0x000000000044a0f3 in ?? () 
#1  0x0000000000001000 in ?? () 
#2  0x00007f4dcdd0f300 in ?? () 
#3  0x000000000044df5f in ?? () 
#4  0x00007f4dfbad8001 in ?? () 
#5  0x00007f4dd63d5140 in ?? () 
#6  0x00007f4dd63d50c0 in ?? () 
#7  0x00007f4dbc34f180 in ?? () 
#8  0x0000000000000001 in ?? () 
#9  0x00007f4dcdd12058 in ?? () 
#10 0x00007f4dd63d65d0 in ?? () 
#11 0x0000000000002000 in ?? () 
#12 0x0000000000000001 in ?? () 
#13 0x000000000044e026 in ?? () 
#14 0x0000000000001000 in ?? () 
#15 0x0000000000001000 in ?? () 
#16 0x00007f4dd63d50c0 in ?? () 
#17 0x00007f4dbbf0db40 in ?? () 
#18 0x0000000100000001 in ?? () 
#19 0x00007f4dcdd12058 in ?? () 
#20 0x00007f4dd63d65d0 in ?? () 
#21 0x00007f4dcdd0f310 in ?? () 
#22 0x00007f4dcdd0f300 in ?? () 
#23 0x00007f4dd63d6580 in ?? () 
#24 0x00007f4dd63d50c0 in ?? () 
#25 0x00007f4dbc1b0300 in ?? () 
#26 0x0000000000000040 in ?? () 
#27 0x000000000044e963 in ?? () 
#28 0x0000000000004000 in ?? () 
#29 0x0000000000000000 in ?? () 
sudo gdb测试核心31137
[sudo]dbsj的密码:
GNU gdb(Ubuntu 7.11.1-0ubuntu1~16.5)7.11.1
版权所有(C)2016免费软件基金会。
许可证GPLv3+:GNU GPL版本3或更高版本
这是自由软件:您可以自由更改和重新发布它。
在法律允许的范围内,不存在任何担保。键入“显示复制”
和“显示保修”了解详细信息。
此GDB配置为“x86_64-linux-gnu”。
键入“显示配置”以获取配置详细信息。
有关错误报告说明,请参阅:
. 
在线查找GDB手册和其他文档资源,网址为:
. 
要获得帮助,请键入“帮助”。
键入“apropos word”以搜索与“word”相关的命令。。。
正在从测试中读取符号…(未找到调试符号)…已完成。
警告:核心文件可能与指定的可执行文件不匹配。
[新LWP 31147]
[新LWP 31149]
[新LWP 31142]
[新LWP 31137]
[新LWP 31141]
[新LWP 31148]
[新LWP 31143]
[新LWP 31139]
[新LWP 31145]
[新LWP 31144]
[新LWP 31146]
[新LWP 31140]
Core由“./skynet dreamgame/config\u publish/dataserver\u patched”生成。
程序以信号SIGSEGV终止,分段故障。
#0 0x000000000044a0f3英寸??() 
[当前线程为1(LWP 31147)]
(gdb)在哪里
#0 0x000000000044a0f3英寸??() 
#1 0x0000000000001000英寸??() 
#2 0x00007f4dcdd0f300英寸??() 
#3 0x000000000044df5f英寸??() 
#4 0x00007f4dfbad8001英寸??() 
#5 0x00007f4dd63d5140英寸??() 
#6 0x00007f4dd63d50c0英寸??() 
#7 0x00007f4dbc34f180英寸??() 
#8 0x0000000000000001英寸??() 
#9 0x00007f4dcdd12058英寸??() 
#10 0x00007f4dd63d65d0英寸??() 
#11 0x0000000000002000英寸??() 
#12 0x0000000000000001英寸??() 
#13 0x000000000044e026英寸??() 
#14 0x0000000000001000英寸??() 
#15 0x0000000000001000英寸??() 
#16 0x00007f4dd63d50c0英寸??() 
#17 0x00007f4dbbf0db40英寸??() 
#18 0x0000000100000001英寸??() 
#19 0x00007f4dcdd12058英寸??() 
#20 0x00007f4dd63d65d0英寸??() 
#21 0x00007f4dcdd0f310英寸??() 
#22 0x00007f4dcdd0f300英寸??() 
#23 0x00007f4dd63d6580英寸??() 
#24 0x00007f4dd63d50c0英寸??() 
#25 0x00007f4dbc1b0300英寸??() 
#26 0x0000000000000040英寸??() 
#27 0x000000000044e963英寸??() 
#28 0x0000000000004000英寸??() 
#29 0x0000000000000000英寸??() 

您可能试图从错误的二进制文件调试内核转储。
请注意输出中的这些行:

Reading symbols from test...(no debugging symbols found)...done. 

 warning: core file may not match specified executable file. 
[New LWP 31147] 
[New LWP 31149] 
[New LWP 31142] 
[New LWP 31137] 
[New LWP 31141] 
[New LWP 31148] 
[New LWP 31143] 
[New LWP 31139] 
[New LWP 31145] 
[New LWP 31144] 
[New LWP 31146] 
[New LWP 31140] 
Core was generated by `./skynet dreamgame/config_publish/dataserver_patched'. 
尝试
/skynet dreamgame/config\u publish/dataserver\u patched
而不是
test

sudo gdb ./skynet dreamgame/config_publish/dataserver_patched core.31137   

警告:核心文件可能与指定的可执行文件不匹配
,我认为这是bt.@ks1322中出现
的原因,还有
从测试中读取符号…(未找到调试符号)…已完成
,因此首先没有任何调试符号。
sudo gdb ./skynet dreamgame/config_publish/dataserver_patched core.31137