This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Detect 64-bit-ness in PowerPC Book III-E
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: yao at codesourcery dot com (Yao Qi), anton at samba dot org
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 11 Dec 2014 16:30:57 +0100 (CET)
- Subject: Re: [PATCH] Detect 64-bit-ness in PowerPC Book III-E
- Authentication-results: sourceware.org; auth=none
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