LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1166|回复: 4

为什么gdb不能list源文件?

[复制链接]
发表于 2006-9-26 21:19:55 | 显示全部楼层 |阅读模式
输入命令及显示信息如下:

thompson@thompson-desktop:~/TRIOT$ gdb TRIOT-MC
GNU gdb 6.4-debian
Copyright 2005 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 "i486-linux-gnu"...Using host libthread_db library
"/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) list
1       ../sysdeps/i386/elf/start.S: No such file or directory.
        in ../sysdeps/i386/elf/start.S
(gdb)
发表于 2006-9-26 21:28:14 | 显示全部楼层
编译的时候加入 -g 选项
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-26 21:40:22 | 显示全部楼层
编译时加了-g
回复 支持 反对

使用道具 举报

发表于 2006-9-27 09:53:15 | 显示全部楼层
从输出信息上看,好像是源文件没有放对位置吧
回复 支持 反对

使用道具 举报

发表于 2006-9-27 14:24:36 | 显示全部楼层
directory=源文件所在目录
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表