我在使用GDB進行調試時面臨特定的挑戰。我的二進制文件生成核心。當我調試它的GDB。我沒有得到相關的調試信息。沒有相關信息的GDB調試跟蹤(??()中的#0 0x2e6e6f69)
GDB stack trace (bt):-
[[email protected] bin]# gdb pull core.11328
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5)
Copyright (C) 2009 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 "i386-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/abc/xyz/bin/pull...done.
[New Thread 11379]
[New Thread 11378]
[New Thread 11377]
[New Thread 11376]
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /opt/septel/lib32/libgctlib.so.1...(no debugging symbols found)...done.
Loaded symbols for /opt/septel/lib32/libgctlib.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `./pull -c /home/abc/xyz/conf/Common.cfg -g /home/abc/xyz/'.
Program terminated with signal 11, Segmentation fault.
#0 0x2e6e6f69 in ??()
(gdb) bt
#0 0x2e6e6f69 in ??()
#1 0x40310738 in ??()
#2 0x20459102 in menu_table()
#3 0x31073900 in ??()
#4 0x35910240 in ??()
#5 0x01530084 in ??()
#6 0x00000052 in ??()
#7 0x00000000 in ??()
(gdb) q
bt和bt full沒有顯示任何有用的信息。我已經編寫了我的二進制-g標誌。相同的二進制文件生成了正常的核心(具有適當的調試信息的核心),我已經修復了。
在這種特殊情況下,我無法識別任何問題。請建議我如何調試和解決問題。
感謝您的輸入。 – user2307143 2013-04-23 04:27:50
@ user2307143:有幫助嗎?真正的問題是什麼?如果你放棄了實際的問題和解決方案(並且可能會提高相關答案),它可以幫助其他成員滾動查看類似的問題。 – 2013-04-23 04:31:12
編號時我使用了-g標誌。我根本沒有用過-O。我也交叉檢查,空間足夠。我的開發和生產環境相同。最初從你的評論我雖然空間可能是問題,但它不是。我無法找到解決方案。代碼訪問相同的功能很多次,但有些如何在3-4天后產生分段錯誤,核心除了menu_table函數外沒有相關的信息。 – user2307143 2013-04-23 04:58:28