Endian issues on T4240 Powerpc:e6500

Ed Liversidge ed@harmonicss.co.uk
Mon May 1 09:43:00 GMT 2017


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.



More information about the Gdb mailing list