[patch] Fix i386 memory-by-register access on amd64
Mark Kettenis
mark.kettenis@xs4all.nl
Tue Jul 7 18:00:00 GMT 2009
> Date: Tue, 7 Jul 2009 18:24:06 +0200 (CEST)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
>
> Jan Kratochvil wrote:
>
> > Updated the patch to do on 64bit hosts exactly the same what 32bit hosts do.
> > 32bit hosts do all the CORE_ADDR calculations 64bit, just the final ptrace
> > call strips the width to 32bits.
>
> Hmm, I'm wondering how this would affect platforms where addresses are
> generally treated as signed integers (MIPS ?). Dan, do you know if the
> kernel expects the ptrace address argument to be sign-extended on MIPS?
Yes, I expect that to be the case for targets that do an ILP32 ABI on
a 64-bit CPU where there's a "hole" in the moddle of the 64-bit
virtual adddress space.
> This should be done inside the TARGET_OBJECT_MEMORY case; there is no reason
> why the same truncation should be performed for other object types.
But then I don't understand Jan's diff at all. Linux has its own
implementation for TARGET_OBJECT_MEMORY in linux-nat.c. Why isn't
that one used?
More information about the Gdb-patches
mailing list