|
我很想调试skyeye看看里面发生的事,可惜我不够料,
生成skyeye时我把Makefile里的CC = gcc 改为CC = gcc -g
可是gdb skyeye还是报no debugging symbols found.于是我就想自已
在GDB运行时加入.O文件的办法想加入.可是运行就出错了.
哪位高手指点一个具体应该怎样调试这种大型项目.
拜托了!
[root@mylabtop root]# gdb skyeye
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"...
(no debugging symbols found)...
(gdb) dir /root/skyeye/skyeye
Source directories searched: /root/skyeye/skyeye:$cdir:$cwd
(gdb) dir /root/skyeye/skyeye/gdb/
Source directories searched: /root/skyeye/skyeye/gdb:/root/skyeye/skyeye:$cdir:$cwd
(gdb) add-symbol-file /root/skyeye/skyeye/gdb/main.o
add symbol table from file "/root/skyeye/skyeye/gdb/main.o" at
(y or n) y
Reading symbols from /root/skyeye/skyeye/gdb/main.o...done.
(gdb) break main.c :744
Breakpoint 1 at 0xa85: file main.c, line 744.
(gdb) run
Starting program: /usr/local/bin/skyeye
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0xa85: 输入/输出错误.
(gdb)
============= |
|