中国Linux公社论坛's Archiver

loonux 发表于 2013-7-12 19:50

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

我在调试一个测试代码,在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.

各位前辈给看看问题到底出在哪呢??:shock:

loonux 发表于 2013-7-12 19:52

最蛋疼的是其它命令都正常:cry:

ksh 发表于 2013-7-13 22:31

1、在target remote之后,应该是continue,而不是run。因为程序已经开始运行了,
只是停在第一条指令而已。
2、另外你的 gdb版本是什么?因为SkyEye有些gdb命令没有实现,所以对不同的
gdb版本,有时也有些问题。

-- ksh

loonux 发表于 2013-7-20 00:18

回复 3# ksh 的帖子

多谢版主。。是GDB版本问题:-D

页: [1]

Powered by Discuz! Archiver 6.1.0F  © 2001-2007 Comsenz Inc.