linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* gdb with powerpc
@ 2015-08-11 16:50 Ran Shalit
  2015-08-11 23:57 ` Pedro Alves
  2015-08-12  3:24 ` Bob Cochran
  0 siblings, 2 replies; 3+ messages in thread
From: Ran Shalit @ 2015-08-11 16:50 UTC (permalink / raw)
  To: linuxppc-dev, gdb

Hello,

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=3D"\"/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=3D1 -DTUI=3D1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral
-Wunused-label -Wunused-function -Wno-pointer-sign -Wuninitialized
ppc-linux-nat.c
ppc-linux-nat.c: In function =E2=80=98ppc_register_u_addr=E2=80=99:
ppc-linux-nat.c:186:47: error: =E2=80=98PT_R0=E2=80=99 undeclared (first us=
e in this function)
     u_addr =3D ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize);


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

gcc -c -g -O2 -DDEFAULT_INLINE=3DPSIM_INLINE_LOCALS
-DWITH_HOST_BYTE_ORDER=3DLITTLE_ENDIAN -DWITH_SMP=3D5
-DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO     -I.
-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 =E2=80=98convert_to_integer=E2=80=99:
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,
Ran

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb with powerpc
  2015-08-11 16:50 gdb with powerpc Ran Shalit
@ 2015-08-11 23:57 ` Pedro Alves
  2015-08-12  3:24 ` Bob Cochran
  1 sibling, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2015-08-11 23:57 UTC (permalink / raw)
  To: Ran Shalit, linuxppc-dev, gdb

On 08/11/2015 05:50 PM, Ran Shalit wrote:
> Hello,
> 
> 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
> 

> gcc -c -g -O2    -I. -I.././gdb -I.././gdb/config

Looks like you're using your host x86 gcc to build a ppc program.
That can't work.

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

Please try following the instructions at:

 https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gdb with powerpc
  2015-08-11 16:50 gdb with powerpc Ran Shalit
  2015-08-11 23:57 ` Pedro Alves
@ 2015-08-12  3:24 ` Bob Cochran
  1 sibling, 0 replies; 3+ messages in thread
From: Bob Cochran @ 2015-08-12  3:24 UTC (permalink / raw)
  To: Ran Shalit, linuxppc-dev, gdb

On 08/11/2015 12:50 PM, Ran Shalit wrote:
> Hello,
>
> I would like to ask if anyone tried remote debugging with
> gdb/gdbserver on powerpc.
>
[snip]
>                                 ^
>
> As an alternative, Is anyone familiar with binary package with
> gdb/gdbserver for powerpc used with x86 host ?

I use the powerpc toolchain built using the Yocto Project recipes, and 
this includes gdb and gdbserver (if you include the gdb recipe ).  I can 
run gdb remotely and on my target ( both 32-bit and 64-bit targets ).

They also have pre-built toolchains that might include gdb, but I don't 
use them.


>
> Best Regards,
> Ran
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-12  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 16:50 gdb with powerpc Ran Shalit
2015-08-11 23:57 ` Pedro Alves
2015-08-12  3:24 ` Bob Cochran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).