Re: 請問使用gdb debug

看板SetupBBS作者時間22年前 (2004/01/02 15:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
解決了, 果然是這個問題 謝囉 :) ※ 引述《sby.bbs@bbs.csie.mcu.edu.tw (INT 0x19)》之銘言: : 查查看你的 Makefile, 看看 gcc 在 compile 的時候 : 有沒有用到 -s 這個 option 或者是有用了 strip 這支程式, : 這樣會拿掉執行檔裡面的符號表, 如此可減少執行檔的大小, : 不過在用 gdb debug 的時候得要記得把 strip 拿掉才行 :) : ※ 引述《else.bbs@bbs.kmsh.tnc.edu.tw (kmsh.twbbs.org)》之銘言: : : 我在Makefile的 CFLAGS 裡有加上 -ggdb : : 然後再去trace core dump時 : : 如下 : : GNU gdb 4.18 : : Copyright 1998 Free Software Foundation, Inc. : : GDB is free software, covered by the GNU General Public License, and you are : : welcome to change it and/or distribute copies of it under certain conditions. : : Type "show copying" to see the conditions. : : There is absolutely no warranty for GDB. Type "show warranty" for details. : : This GDB was configured as "i386-unknown-freebsd"... : : (no debugging symbols found)... : : Core was generated by `checkdir'. : : Program terminated with signal 10, Bus error. : : Reading symbols from /usr/lib/libc.so.3...(no debugging symbols found)...done. : : Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)... : : done. : : #0 0x280b49e7 in strcpy () from /usr/lib/libc.so.3 : : 打下列指令查詢對映的code : : (gdb) list : : No symbol table is loaded. Use the "file" command. : : (gdb) : : 為什麼會是no debugging symbols found呢 ? : : 查了一下google 沒找到合適的solution : : 可否給點意見呢 thx -- ㊣ 我是港灣裡的可愛水手 else ,我來自 港灣碼頭 ㊣ * 塔台: 港灣碼頭 bbs.kmsh.tnc.edu.tw [203.71.221.4] * -- 『 港.灣.碼.頭.BBS.站 』 █▉█▋ █▊██ ████ █▊██ >◎< 台南縣 私立港明高中 電子佈告欄 ███▍ ▊▉▊█ ███▅ ████ bbs.KMSH.tnc.edu.tw . 203.71.221.4 █▊█▋.▋█▋█.▅▅██.█▊██.
文章代碼(AID): #_zHSo00 (SetupBBS)
文章代碼(AID): #_zHSo00 (SetupBBS)