当前位置: 技术问答>linux和unix
gdb找不到源文件的问题
来源: 互联网 发布时间:2015-02-21
本文导语: 现象如下: [/home/aixy/src/Test]>gdb Test GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT) Copyright 2001 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...
现象如下:
[/home/aixy/src/Test]>gdb Test
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 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"...Dwarf Error: Cannot handle DW_F
ORM_strp in DWARF reader.
(gdb) break 95
Can't find a default source file
(gdb) file Test
Reading symbols from CITICTest...Dwarf Error: Cannot handle DW_FORM_strp in DWAR
F reader.
(gdb)
请问这是什么意思啊?为什么找不到啊?
[/home/aixy/src/Test]>gdb Test
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 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"...Dwarf Error: Cannot handle DW_F
ORM_strp in DWARF reader.
(gdb) break 95
Can't find a default source file
(gdb) file Test
Reading symbols from CITICTest...Dwarf Error: Cannot handle DW_FORM_strp in DWAR
F reader.
(gdb)
请问这是什么意思啊?为什么找不到啊?
|
编译的时候在gcc或者g++后面加上 -g -DZDEBUG -DZLOGS 参数
g++ -g -DZDEBUG -DZLOGS foo.c -o foo
g++ -g -DZDEBUG -DZLOGS foo.c -o foo