Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gdbserver报告错误的目标体系结构_Gdb_Gdbserver - Fatal编程技术网

gdbserver报告错误的目标体系结构

gdbserver报告错误的目标体系结构,gdb,gdbserver,Gdb,Gdbserver,我正在x86_64目标上远程调试一个x86_64可执行文件,但gdbserver似乎报告调试一个i386可执行文件: 在目标上: # gdbserver --attach :9999 12345 Attached; pid = 12345 Listening on port 9999 # gdb <normal GDB banner> (gdb) target remote 10.0.0.1:9999 Remote debugging using 10.0.0.1:9999 0x7

我正在x86_64目标上远程调试一个x86_64可执行文件,但gdbserver似乎报告调试一个i386可执行文件:

目标上

# gdbserver --attach :9999 12345
Attached; pid = 12345
Listening on port 9999
# gdb
<normal GDB banner>
(gdb) target remote 10.0.0.1:9999
Remote debugging using 10.0.0.1:9999
0x773660d8 in ?? ()
(gdb) show architecture 
The target architecture is set automatically (currently i386)
主机上

# gdbserver --attach :9999 12345
Attached; pid = 12345
Listening on port 9999
# gdb
<normal GDB banner>
(gdb) target remote 10.0.0.1:9999
Remote debugging using 10.0.0.1:9999
0x773660d8 in ?? ()
(gdb) show architecture 
The target architecture is set automatically (currently i386)
#gdb
(gdb)目标远程10.0.0.1:9999
使用10.0.0.1:9999进行远程调试
0x773660d8英寸??()
(gdb)显示架构
自动设置目标体系结构(当前为i386)
gdb(在主机上)还是gdbserver(在目标上)错误地确定了体系结构?为什么会发生这种情况,以及如何解决

TIA的任何见解。

问题已解决:

>是gdb(在主机上)还是gdbserver(在目标上)错误地确定了体系结构

它是gdbserver

>为什么会发生这种情况

我使用的是一个gdbserver二进制文件,它是为错误的体系结构(i386)构建的