QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5091|回复: 3

求助:用arm-elf-gdb调试的时候老是出现错误

[复制链接]
发表于 2013-7-12 19:50:00 | 显示全部楼层 |阅读模式
我在调试一个测试代码,在skyeye上是可以正常运行的。
但是通过arm-elf-gdb链接skyeye进行调试的时候,运行“run”会出现一个错误,如下所示:
gdb输入和输出:

(gdb) target remote 127.0.0.1:12345
Remote debugging using 127.0.0.1:12345
0x1000000 in begin ()
(gdb) break hello
Breakpoint 1 at 0x1000024: file hello.c, line 12.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /home/loonux/下载/Hello4Skyeye/hello
You can't do that without a process to debug.

skyeye输出:

Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8061680
log_info: log is off.
log_info:log file is ./sk1.log, fd is 0x8373238
log_info: log start clock 0
log_info: log end clock 200000
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
start addr is set to 0x01000000 by exec file.
debugmode= 1, filename = skyeye.conf, server TCP port is 12345
Remote debugging using host:12345
putpkt(read): Got EOF
readchar: Got EOF
Remote side has terminated connection.  GDBserver will reopen the connection.

各位前辈给看看问题到底出在哪呢??
 楼主| 发表于 2013-7-12 19:52:10 | 显示全部楼层
最蛋疼的是其它命令都正常
回复

使用道具 举报

发表于 2013-7-13 22:31:37 | 显示全部楼层
1、在target remote之后,应该是continue,而不是run。因为程序已经开始运行了,
只是停在第一条指令而已。
2、另外你的 gdb版本是什么?因为SkyEye有些gdb命令没有实现,所以对不同的
gdb版本,有时也有些问题。

-- ksh
回复

使用道具 举报

 楼主| 发表于 2013-7-20 00:18:22 | 显示全部楼层

回复 3# ksh 的帖子

多谢版主。。是GDB版本问题
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-3-29 04:58 , Processed in 0.100816 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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