|
常见的被gdb调试的文件与源文件名是相同的,比如可以通过gcc命令方式将源文件test.c生成目标文件test.o,然后采用gdb test命令方式调试.
可是我这里数个后缀为.c的文件,通过makefile文件生成了一个新的可执行文件3dma_lnx,且3dma_lnx文件与所有的源文件名都不同,我用gdb 3dma_lnx命令进行调试时,出现如下状况:
[root@localhost src]# gdb 3dma_lnx
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) break 10
Breakpoint 1 at 0x8049ef8: file ../sysdeps/i386/elf/start.S, line 10.
(gdb) run
Starting program: /home/zsk/3dma_rock/bin/3dma_lnx
Breakpoint 1,
Current language: auto; currently asm
(gdb) step
52 ../sysdeps/i386/elf/start.S: 没有那个文件或目录.
in ../sysdeps/i386/elf/start.S
(gdb) step
53 in ../sysdeps/i386/elf/start.S
(gdb) step
59 in ../sysdeps/i386/elf/start.S
(gdb) step
60 in ../sysdeps/i386/elf/start.S
(gdb) step
65 in ../sysdeps/i386/elf/start.S
(gdb) step
67 in ../sysdeps/i386/elf/start.S
(gdb) step
71 in ../sysdeps/i386/elf/start.S
(gdb) step
72 in ../sysdeps/i386/elf/start.S
(gdb) step
74 in ../sysdeps/i386/elf/start.S
(gdb) step
75 in ../sysdeps/i386/elf/start.S
(gdb) step
77 in ../sysdeps/i386/elf/start.S
(gdb) step
81 in ../sysdeps/i386/elf/start.S
(gdb) step
****************************************************
Run Stamp start time Wed Oct 20 22:35:34 2004
machine name localhost.localdomain
operating system Linux
****************************************************
****************************************************
Run Stamp start time Wed Oct 20 22:35:34 2004
machine name localhost.localdomain
operating system Linux
****************************************************
Input Data Options
tomographic data (1)
segmented data (2)
burn data (3)
medial axis data (4)
throat data (5)
pore-throat network data (6)
fluid data (7)
Enter choice: q
Data Processing Options
Input Data Options
tomographic data (1)
segmented data (2)
burn data (3)
medial axis data (4)
throat data (5)
pore-throat network data (6)
fluid data (7)
Enter choice: 135761552
Data Processing Options
Program received signal SIGSEGV, Segmentation fault.
0x0804a133 in main_menu_driver_file ()
(gdb) break 100
No line 100 in file "../sysdeps/i386/elf/start.S".
(gdb)
郁闷,我应该如何调试啊? |
|