This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix i386 memory-by-register access on amd64
On Tue, Jul 07, 2009 at 06:24:06PM +0200, Ulrich Weigand wrote:
> 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?
Ptrace takes a long. If GDB is o32/n32, we're only passing it 32
bits. If we are an n64 application, debugging an o32 application, I'm
not sure what happens with sign extension... but it doesn't much
matter; 32-bit userspace applications only get to use the low half of
the address space anyway.
--
Daniel Jacobowitz
CodeSourcery