QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1678|回复: 1

请教使用GDB调试skyeye的问题

[复制链接]
发表于 2004-6-12 18:34:58 | 显示全部楼层 |阅读模式
我很想调试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)

=============
 楼主| 发表于 2004-6-12 20:32:15 | 显示全部楼层
呵呵,我再把GDB目录下的Makefile中的strip $(bindir)/skyeye 这一行去掉.终于得出了具有调试信息的skyeye版本.
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-4-28 05:38 , Processed in 0.063208 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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