无法使用GDB进行远程调试 [英] can't remote debug with GDB
问题描述
(gdb)目标远程10.0.0.2:2345
远程调试使用10.0 .0.2:2345
警告:体系结构拒绝了目标提供的描述
远程'g'数据包回复太长:
bit体系结构,ubuntu 64位
$ uname -a
Linux ubuntu-VirtualBox 3.13.0-24-generic#47 -Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU / Linux
尝试设置不同的体系结构不会有帮助。
(gdb)set architecture i386:x86-64:intel
目标体系结构假定为i386:x86-64:intel
(gdb)目标远程10.0.0.2:2345
使用10.0.0.2:2345远程调试
警告:体系结构拒绝目标提供的描述
回复包含无效的十六进制数字59
感谢任何想法,
Ran
我有一个类似的问题,从openSUSE 13.1 i64调试ARM CortexA5上的代码。问题发生时,当我在目标机上调用gdbserver,在笔记本电脑上调用gdb时,却在笔记本电脑上调用gdb而不是指向交叉编译二进制文件,而是编译为笔记本电脑(因此为i64)编译的那个。
在笔记本电脑上调用gdb指向相同的,交叉编译的二进制文件,该文件在目标机上以gdbserver启动后,一切正常,错误消息消失。
I'm trying to debug target with gdb, but get rejection.
(gdb) target remote 10.0.0.2:2345 Remote debugging using 10.0.0.2:2345 warning: Architecture rejected target-supplied description Remote 'g' packet reply is too long: 00000000ba4eefbe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c04defbe0000000090770940100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
The PC is 64-bit architecture, ubuntu 64-bit
$ uname -a Linux ubuntu-VirtualBox 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Trying to set different architecture doesn't help. (gdb) set architecture i386:x86-64:intel The target architecture is assumed to be i386:x86-64:intel (gdb) target remote 10.0.0.2:2345 Remote debugging using 10.0.0.2:2345 warning: Architecture rejected target-supplied description Reply contains invalid hex digit 59
Thanks for any idea, Ran
i had a similar problem, debugging code on a ARM CortexA5 from openSUSE 13.1 i64. problem occured, when i called the gdbserver on the target and gdb on the laptop, but called gdb on laptop not pointing to the cross compiled binary, but to the one compiled for the laptop (hence i64).
after calling gdb on the laptop pointing to the same, cross compiled binary that is started with gdbserver on the target, all is OK and the error message dissapears.
这篇关于无法使用GDB进行远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!