ptrace for mips n32 and n64

Alexandre Oliva aoliva@redhat.com
Fri Mar 14 15:39:00 GMT 2003


On Mar 14, 2003, Daniel Jacobowitz <drow@mvista.com> wrote:

> On Fri, Mar 14, 2003 at 11:35:42AM -0300, Alexandre Oliva wrote:
>> Yay.  Lots of code duplication.  I'm sure Uli will love this patch.
>> :-/ Ok?  (the point being that ptrace must take as argument and return
>> 64-bit values on n32)

> Why must it?

Because that's the ABI defined by the kernel, as much as I dislike
it.  Of course, glibc could adapt the interface and return longs even
though the kernel gives it a long long, and pass a long long where it
gets just a long.  I don't know much about the interface of ptrace,
anyway.  I just did what Kevin told me he needed for his debugging
code to work.

> I can't think of any reason for it to take 64-bit
> values.  It'll also be a tremendous headache, since you'll have to cast
> any pointers passed to ptrace.

If you pass a pointer to ptrace, it will be sign-extended to 64 bits,
just as it should.  No hassle.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Libc-alpha mailing list