不能为MIPS n32交叉编译GDBServer

时间:2013-08-23 12:27:52

标签: linux gdb mips cross-compiling gdbserver

我在为MIPS n32交叉编译GDBServer时遇到了麻烦。我正在使用GCC-4.7.2,binutils-2.22,glibc-2.11.1,glibc-ports-2.11和linux-2.6.32.61。我的主机是x86_64-cross-linux-gnu。我的目标是mips64-elf-linux。 MIPS的特定ABI是n32

当我去制作GDBserver时,我在编译regcache.c时遇到错误。 regcache.c位于gdb / gdbserver /中。有一个名为'reg'的结构,gcc正在尝试编译。我已经包含了所有mips包含的文件。我可以为x86编译GDBServer。我在/ usr / include /中搜索了所有包含文件,试图找到“struct reg”并且找不到任何东西都没有成功。我找到了这个article并且我更改了名称,希望它可以解决问题,但这不起作用,因为regcache.c中的reg结构具有offset和value等属性。我也试过在ptrace.h中弄乱pt_regs。但是我不认为我应该弄乱GDBServer附带的文件。

我的配置命令是:

CC=mips64-elf-linux-gcc configure --host=x86_64-cross-linux-gnu --target=mips64-elf-linux 

有谁知道为什么我不能为Mips n32编写GDBServer?

谢谢,

更新:

../gdb-7.6/gdb/gdbserver/regcache.c:207:7: error: invalid use of undefined type 'struct reg'
../gdb-7.6/gdb/gdbserver/regcache.c:207:7: error: dereferencing pointer to incomplete type
../gdb-7.6/gdb/gdbserver/regcache.c:208:7: error: invalid use of undefined type 'struct reg'
../gdb-7.6/gdb/gdbserver/regcache.c:208:7: error: dereferencing pointer to incomplete type
../gdb-7.6/gdb/gdbserver/regcache.c: In function 'find+_register_by_name'
../gdb-7.6/gdb/gdbserver/regcache.c:295:7: error: invalid use of undefined type 'struct reg'
../gdb-7.6/gdb/gdbserver/regcache.c:295:7: error: dereferencing pointer to incomplete type
../gdb-7.6/gdb/gdbserver/regcache.c: In function 'find_regno'
../gdb-7.6/gdb/gdbserver/regcache.c:315:7: error: invalid use of undefined type 'struct reg'
../gdb-7.6/gdb/gdbserver/regcache.c:315:7: error: dereferencing pointer to incomplete type

0 个答案:

没有答案