This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] arm_extract_return_value, big-endian
- From: Fernando Nasser <fnasser at redhat dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com, rearnsha at arm dot com,cagney at redhat dot com, kevinb at redhat dot com
- Date: Tue, 03 Dec 2002 10:43:35 -0500
- Subject: Re: [RFA] arm_extract_return_value, big-endian
- Organization: Red Hat Canada
- References: <3DC989E0.DCFDC68A@redhat.com>
Well Michael, nobody has said anything, so if it seem to work lets make
the change. It seems reasonable to me.
My only question would be if we don't have any abstraction of the
"extract a small type from a register" operation somewhere (arch vector,
or an old macro). But you've probably have checked for that already.
Regards to all,
Fernando
Michael Snyder wrote:
[This doesn't seem to have gone out. Excuse me if it appears twice]
One of you arm-savvy guys check me out on this:
it seems logical, and it fixes two fails in callfuncs with -mbig-endian.
Michael
------------------------------------------------------------------------
2002-11-05 Michael Snyder <msnyder@redhat.com>
* arm-tdep.c (arm_extract_return_value): Handle offset of
small types on big-endian machines.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.74
diff -p -r1.74 arm-tdep.c
*** arm-tdep.c 1 Nov 2002 21:21:49 -0000 1.74
--- arm-tdep.c 6 Nov 2002 01:54:36 -0000
*************** arm_extract_return_value (struct type *t
*** 2274,2279 ****
--- 2274,2284 ----
break;
}
}
+ else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ memcpy (valbuf,
+ ®buf[REGISTER_BYTE (ARM_A1_REGNUM)]
+ + (REGISTER_RAW_SIZE (ARM_A1_REGNUM) - TYPE_LENGTH (type)),
+ TYPE_LENGTH (type));
else
memcpy (valbuf, ®buf[REGISTER_BYTE (ARM_A1_REGNUM)],
TYPE_LENGTH (type));
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9