Re: [PATCH] Detect 64-bit-ness in PowerPC Book III-E

Ulrich Weigand
2014-12-11T15:31:13Z

Yao Qi wrote:

> This patch is to teach GDBServer to detect 64-bit inferior correctly.
> We find a problem that GDBServer is unable to detect on an e5500 core
> processor. Current GDBServer assumes that MSR is a 64-bit register,
> but MSR is a 32-bit register in Book III-E. This patch is to fix this
> problem by checking both bits in MSR, in order to handle both Book
> III-S and Book III-E.

Hmm. If it actually is Book III-S, then bit 32 is "reserved", so I'm
not sure including it in the check is safe.

Anton, what would you suggest a user program to use to safely detect
whether a ptrace-attached child is 64-bit or not, on either Book III-S
or Book III-E systems?

In any case, whatever we do, we should do both in native GDB and
gdbserver.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com