This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] mips-o64-extract-return-value
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sources dot redhat dot com, cagney <cagney at redhat dot com>
- Date: Wed, 19 Nov 2003 17:07:56 -0800
- Subject: [RFA] mips-o64-extract-return-value
- Organization: Red Hat, Inc.
Hi Andrew,
This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't
find the function's return value. It follows some work that you
were apparently doing w.r.t. the mips internal register representation.
I suspect that the same thing needs to be done for mips_eabi_extract...,
but I haven't tested that. What do you think?
I'll probably try doing something similar for store_return_value too.
Michael
2003-11-19 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_o64_extract_return_value):
Correct for raw reg / virtual reg scheme.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.254
diff -p -r1.254 mips-tdep.c
*** mips-tdep.c 16 Nov 2003 22:46:49 -0000 1.254
--- mips-tdep.c 20 Nov 2003 01:00:31 -0000
*************** mips_o64_extract_return_value (struct ty
*** 4681,4692 ****
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset,
hi.len);
}
--- 4681,4692 ----
return_value_location (valtype, &hi, &lo);
memcpy (valbuf + lo.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset,
lo.len);
if (hi.len > 0)
memcpy (valbuf + hi.buf_offset,
! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset,
hi.len);
}