ptrace for mips n32 and n64

Daniel Jacobowitz drow@mvista.com
Fri Mar 14 16:57:00 GMT 2003


On Fri, Mar 14, 2003 at 01:52:30PM -0300, Alexandre Oliva wrote:
> On Mar 14, 2003, Daniel Jacobowitz <drow@mvista.com> wrote:
> 
> > Eh?  No it won't.  ptrace is exported as a varargs function.  Think
> > about what happens when you pass a 32-bit pointer to a varargs function
> > that pops a long long argument.
> 
> Let's see...  The 32-bit argument gets passed in a single register,
> therefore it is sign-extended.  The entry code may or may not save the
> register as a 64-bit value in the stack, but regardless of how it does
> it, it just works.  Remember n32 is a 64-bit architecture.  All
> arguments are passed in 64-bit slots, registers or stack.

Oh, that's right, we have a sane number of argument registers don't we?
It's a little creepy but I guess it will work.

I still don't really like it - it will make porting native GDB a real
pain, which is probably why Kevin only did rda.  But I suppose this
isn't the right place to discuss that.  Of course, there wasn't a right
place to discuss it at the time either.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Libc-alpha mailing list