当前位置: 技术问答>linux和unix
gdb调试问题,关于list命令的
来源: 互联网 发布时间:2015-10-04
本文导语: 小弟在调试一个C语言的可执行文件。出现以下问题。我在使用list命令时不显示出程序的源码,这是怎么回事啊,出错的信息如下,请高手指点。 # gdb test GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) Copyright 2003 Free Sof...
小弟在调试一个C语言的可执行文件。出现以下问题。我在使用list命令时不显示出程序的源码,这是怎么回事啊,出错的信息如下,请高手指点。
# gdb test
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-redhat-linux-gnu"...
(gdb) run
Starting program: /root/test
The string is hello there
The string printed backward is
Program exited with code 040.
(gdb) list
1 ../sysdeps/i386/elf/start.S: 没有那个文件或目录.
in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb)
# gdb test
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-redhat-linux-gnu"...
(gdb) run
Starting program: /root/test
The string is hello there
The string printed backward is
Program exited with code 040.
(gdb) list
1 ../sysdeps/i386/elf/start.S: 没有那个文件或目录.
in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb) list
1 in ../sysdeps/i386/elf/start.S
(gdb)
|
可能如楼上所说