看板SetupBBS
标 题Re: 请问使用gdb debug
发信站港明高中 港湾码头 BBS (Fri Jan 2 14:36:16 2004)
转信站ptt!ctu-reader!ctu-peer!news.nctu!news.csie.ncyu!news.cs.nthu!KMSH
解决了, 果然是这个问题
谢罗 :)
※ 引述《[email protected] (INT 0x19)》之铭言:
: 查查看你的 Makefile, 看看 gcc 在 compile 的时候
: 有没有用到 -s 这个 option 或者是有用了 strip 这支程式,
: 这样会拿掉执行档里面的符号表, 如此可减少执行档的大小,
: 不过在用 gdb debug 的时候得要记得把 strip 拿掉才行 :)
: ※ 引述《[email protected] (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 █▊█▋.▋█▋█.▅▅██.█▊██.