Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Ed Liversidge <ed@harmonicss.co.uk>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Endian issues on T4240 Powerpc:e6500
Date: Mon, 01 May 2017 09:43:00 -0000	[thread overview]
Message-ID: <3be0b78313f541d6866794c281327587@winhexbeeu29.win.mail> (raw)

Hi,

I am trying to get gdb 7.12.1 (build from source tried --target=powerpc64-linux-gdb and --target=powerpc64-elf-gdb), to allow me to remotely debug a T4240 PowerPC target.

When I connect to a bdi3000 emulator, gdb reports the program counter to be 32bit word swapped to the actual program counter, reported by the emulator:

(gdb) target remote 192.168.1.70:2001

(gdb) show architecture
The target architecture is assumed to be powerpc:e6500
(gdb) show endian
The target endianness is set automatically (currently big endian)
(gdb) i r pc
pc             0x801080f8ffffffff         0x801080f8ffffffff
(gdb) x $pc
0x801080f8ffffffff:           Cannot access memory at address 0x801080f8ffffffff
T4240#0>info
    Target CPU        : T4/B4 Thread#0 (e6500)
    Core state        : halted
    Debug entry cause : single step
    Current PC        : 0xffffffff_801080f8
    Current CR        : 0x00000000
    Current MSR       : 0x80000200
    Current LR        : 0xffffffff_8021bee4
    Current CCSRBAR   : 0xf_fe000000

As you can see, the BDI reports the PC as 0xffffffff801080f8, and gdb reports it as 0x801080f8ffffffff. I thought perhaps this was a display issue, but the read of the instruction at $pc is also incorrect.

Is this a bug, or am I missing something?

I have also tried the very latest git 8.0, with different results:
  (gdb) target remote 192.168.1.70:2001
  Remote debugging using 192.168.1.70:2001
  warning: No executable has been specified and target does not support
  determining executable automatically.  Try using the "file" command.
  0x7ff7bef0 in ?? ()
  (gdb) i r $pc
  pc             0x7ff7bef0     0x7ff7bef0
  (gdb) show architecture
  The target architecture is set automatically (currently rs6000:6000)
  (gdb) set architecture powerpc:common64
  The target architecture is assumed to be powerpc:common64
  Truncated register 51 in remote 'g' packet
  (gdb) show architecture
  The target architecture is assumed to be powerpc:common64
  Truncated register 51 in remote 'g' packet
  (gdb) i r $pc
  Truncated register 51 in remote 'g' packet

Can anyone help me to get this working?

Thanks in advance for any help,

Ed Liversidge
Director, Harmonic Software Systems Ltd.


                 reply	other threads:[~2017-05-01  9:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3be0b78313f541d6866794c281327587@winhexbeeu29.win.mail \
    --to=ed@harmonicss.co.uk \
    --cc=gdb@sourceware.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