分类:
2007-11-30 16:44:06
(gdb) target jtag jtag://localhost:9999 Remote or1k debugging using jtag://localhost:9999 Debug group should be available in the or1k implementation. |
1)下载源码包和补丁 下载官方源码包: 下载补丁: 2)解压 tar zxvf binutils-2.16.1.tar.gz 3)打补丁 cd binutils-2.16.1 bzcat binutils-2.16.1-unified.diff.bz2 | patch -p1 4)配置安装 # mkdir ../b-b # ../binutils-2.16.1/configure --target=or32-elf \ |
1)下载源码包和补丁 下载官方源码包: 下载补丁: 2)解压 tar zxvf gcc-3.4.4.tar.gz 3)打补丁 # cd gcc-3.4.4 # patch -p1 < gcc-3.4.4-or32-unified.diff 4)配置安装 # mkdir ../b-gcc # ../gcc-3.4.4/configure --target=or32-elf --prefix=/opt/or32-elf \ |
1)下载源码包和补丁 下载官方源码包: 2)解压 tar zxvf or1k_gdb-5_3.tar.gz 3)配置安装 # mkdir b-gdb # ../or1k/gdb-5.3/configure --target=or32-elf |
../../../tarballs/gdb-5.3/opcodes/or32-dis.c:65: error: static declaration of 'or32_extract' follows non-static declaration ../../../tarballs/gdb-5.3/opcodes/../include/opcode/or32.h:223: error: previous declaration of 'or32_extract' was here |
由于or32-dis.c和or32.h中or32_extract声明与定义不一致。 gdb-5.3/opcodes/or32-dis.c:65中or32_extract前面带static gdb-5.3/include/opcode/or32.h:223中or32_extract前面不带static 造成不一致。 修改其中一处即可 |
../../gdb-5.3/gdb/gdbtypes.c: In function 鈘ecursive_dump_type? ../../gdb-5.3/gdb/gdbtypes.c:2961: error: invalid lvalue in increment |
由于gdb5.3不能用gcc4.*编译只能用gcc3编译。左值指针加加认为是错误。 在FC6中提供了compat-gcc-34-3.4.6-4.i386.rpm包,安装以后可以在不影响原GCC的情况下使用gcc34。 |
../../../tarballs/gdb-5.3/gdb/or1k-tdep.c: In function `htrace_print_command': ../../../tarballs/gdb-5.3/gdb/or1k-tdep.c:2280: error: incompatible type for argument 2 of `print_data_struct' |
在or1k-tdep.c中的htrace_print_command函数声明了 struct htrace_data_struct *td; 并且生成动态数组 td=(struct htrace_data_struct *)malloc(TRACE_DATA_SIZE * length); 但是在调用 print_data_struct (from + i, td[i]); 时,print_data_struct 第二个参数是struct htrace_data_struct *,而传递给他的却struct htrace_data_struct,所以出错。 可以修改 print_data_struct (from + i, td[i]); 为 print_data_struct (from + i, &td[i]); |