gdb with powerpc

Ran Shalit
Tue Aug 11 16:50:00 GMT 2015


I would like to ask if anyone tried remote debugging with
gdb/gdbserver on powerpc.
I've tried to cross-compile gdb for powerpc, but I get into troubles.
I am using the following compiler:
powerpc-buildroot-linux-gnu-gcc (Buildroot 2014.11) 4.8.3

I've downloaded several version, gdb version 6 and above all have same
error as following:

gcc -c -g -O2    -I. -I.././gdb -I.././gdb/config
-DLOCALEDIR="\"/home/tigran/gdb/share/locale\"" -DHAVE_CONFIG_H
-I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd
-I.././gdb/../bfd -I.././gdb/../include -I../intl -I.././gdb/../intl
-DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral
-Wunused-label -Wunused-function -Wno-pointer-sign -Wuninitialized
ppc-linux-nat.c: In function ‘ppc_register_u_addr’:
ppc-linux-nat.c:186:47: error: ‘PT_R0’ undeclared (first use in this function)
     u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize);

Trying to compile older version 5.3 also fails in different way:

-I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb
-I./../../gdb  -I./../../gdb/config -I./../../mmalloc -I../../intl
-I./../../intl support.c
In file included from cpu.h:25:0,
                 from support.c:27:
./ppc-instructions: In function ‘convert_to_integer’:
idecode_fields.h:105:31: error: label at end of compound statement
 #define LABEL(dest)  XCONCAT4(label__,dest,__,MY_PREFIX)

As an alternative, Is anyone familiar with binary package with
gdb/gdbserver for powerpc used with x86 host ?

Best Regards,

More information about the Gdb mailing list