Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Ran Shalit <ranshalit@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, gdb <gdb@sourceware.org>
Subject: gdb with powerpc
Date: Tue, 11 Aug 2015 16:50:00 -0000	[thread overview]
Message-ID: <CAJ2oMhLr9aoZ258hm0-xuRuW5iksLMOgNOL=hQh6S4SteFNDeg@mail.gmail.com> (raw)

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="\"/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
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:

gcc -c -g -O2 -DDEFAULT_INLINE=PSIM_INLINE_LOCALS
-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN -DWITH_SMP=5
-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 ‘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,
Ran


             reply	other threads:[~2015-08-11 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 16:50 Ran Shalit [this message]
2015-08-11 23:57 ` Pedro Alves
2015-08-12  3:24 ` Bob Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ2oMhLr9aoZ258hm0-xuRuW5iksLMOgNOL=hQh6S4SteFNDeg@mail.gmail.com' \
    --to=ranshalit@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox