This is the mail archive of the
mailing list for the glibc project.
Re: ptrace for mips n32 and n64
On Fri, Mar 14, 2003 at 01:52:30PM -0300, Alexandre Oliva wrote:
> On Mar 14, 2003, Daniel Jacobowitz <drow at mvista dot 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.
MontaVista Software Debian GNU/Linux Developer