QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2043|回复: 2

请教GDB调试的问题

[复制链接]
发表于 2006-7-21 11:43:41 | 显示全部楼层 |阅读模式
最近一直在建嵌入式交叉开发环境(在linux(fedora4)与ARM(S3C44B0)之间的连接),可是GDB(gdbserver/gdb)调试一直弄不好,有哪位好心人可以帮帮我,不胜感激!我的情况时:

client:
/mnt/hu> gdbserver :2000 hello &
[30]
/mnt/hu> Process hello created; pid = 31

server:
[root@localhost arm]# arm-elf-gdb
GNU gdb 5.0
Copyright 2000 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 "--host=i686-pc-linux-gnu --target=arm-elf".

(gdb) file hello.gdb
Reading symbols from hello.gdb...done.

(gdb) target remote 192.168.253.2:2000
Remote debugging using 192.168.253.2:2000
0xce30050 in _start ()

client:
/mnt/hu> Process hello created; pid = 31
Remote debugging from host 192.168.253.8
code at 0xce30040 - 0xce35d20, data at 0xce35d24

server:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /root/arm/hello.gdb
You can't do that without a process to debug.
(gdb)

client:
/mnt/hu> Process hello created; pid = 31
Remote debugging from host 192.168.253.8
code at 0xce30040 - 0xce35d20, data at 0xce35d24
Killing inferior

sh 16: Child 30 died
为什么输入run命令是会出现:You can't do that without a process to debug.
发表于 2006-7-25 16:25:58 | 显示全部楼层
gdbserver dev_pc_ip:port file2debug &
回复

使用道具 举报

发表于 2006-8-13 03:42:23 | 显示全部楼层
gdb:target
gdb:add-file-symbol
gdb:break main
gdb:cont
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-22 23:09 , Processed in 0.037754 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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