* Fix ARM big-endian struct arg passing
@ 2007-06-19 18:11 Joseph S. Myers
2007-06-19 22:42 ` Richard Earnshaw
0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2007-06-19 18:11 UTC (permalink / raw)
To: gdb-patches
This patch fixes GDB incorrectly aligning part-register arguments on
big-endian ARM. It changes the following tests from FAIL to PASS in
testing with a cross to arm-linux-gnueabi (big-endian multilib); OK to
commit?
gdb.base/structs.exp: p/c L<n>; call 1 structs-tc
gdb.base/structs.exp: p/c L<n>; call 1 structs-ts
gdb.base/structs.exp: p/c L<n>; call 10 structs-tc
gdb.base/structs.exp: p/c L<n>; call 11 structs-tc
gdb.base/structs.exp: p/c L<n>; call 13 structs-tc
gdb.base/structs.exp: p/c L<n>; call 14 structs-tc
gdb.base/structs.exp: p/c L<n>; call 15 structs-tc
gdb.base/structs.exp: p/c L<n>; call 2 structs-tc
gdb.base/structs.exp: p/c L<n>; call 3 structs-tc
gdb.base/structs.exp: p/c L<n>; call 3 structs-tc-ts
gdb.base/structs.exp: p/c L<n>; call 3 structs-ts
gdb.base/structs.exp: p/c L<n>; call 4 structs-ts-tc
gdb.base/structs.exp: p/c L<n>; call 5 structs-tc
gdb.base/structs.exp: p/c L<n>; call 5 structs-tc-ts
gdb.base/structs.exp: p/c L<n>; call 5 structs-ts
gdb.base/structs.exp: p/c L<n>; call 5 structs-ts-tc
gdb.base/structs.exp: p/c L<n>; call 6 structs-tc
gdb.base/structs.exp: p/c L<n>; call 7 structs-tc
gdb.base/structs.exp: p/c L<n>; call 8 structs-ts-tc
gdb.base/structs.exp: p/c L<n>; call 9 structs-tc
2007-06-19 Joseph Myers <joseph@codesourcery.com>
* arm-tdep.c (arm_push_dummy_call): Correct padding of partial
registers for big-endian.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.238
diff -u -r1.238 arm-tdep.c
--- arm-tdep.c 18 Jun 2007 18:58:13 -0000 1.238
+++ arm-tdep.c 19 Jun 2007 17:26:17 -0000
@@ -1289,6 +1289,8 @@
/* The argument is being passed in a general purpose
register. */
CORE_ADDR regval = extract_unsigned_integer (val, partial_len);
+ if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+ regval <<= (INT_REGISTER_SIZE - partial_len) * 8;
if (arm_debug)
fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
argnum,
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix ARM big-endian struct arg passing
2007-06-19 18:11 Fix ARM big-endian struct arg passing Joseph S. Myers
@ 2007-06-19 22:42 ` Richard Earnshaw
0 siblings, 0 replies; 2+ messages in thread
From: Richard Earnshaw @ 2007-06-19 22:42 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gdb-patches
On Tue, 2007-06-19 at 18:11 +0000, Joseph S. Myers wrote:
> This patch fixes GDB incorrectly aligning part-register arguments on
> big-endian ARM. It changes the following tests from FAIL to PASS in
> testing with a cross to arm-linux-gnueabi (big-endian multilib); OK to
> commit?
>
> gdb.base/structs.exp: p/c L<n>; call 1 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 1 structs-ts
> gdb.base/structs.exp: p/c L<n>; call 10 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 11 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 13 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 14 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 15 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 2 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 3 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 3 structs-tc-ts
> gdb.base/structs.exp: p/c L<n>; call 3 structs-ts
> gdb.base/structs.exp: p/c L<n>; call 4 structs-ts-tc
> gdb.base/structs.exp: p/c L<n>; call 5 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 5 structs-tc-ts
> gdb.base/structs.exp: p/c L<n>; call 5 structs-ts
> gdb.base/structs.exp: p/c L<n>; call 5 structs-ts-tc
> gdb.base/structs.exp: p/c L<n>; call 6 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 7 structs-tc
> gdb.base/structs.exp: p/c L<n>; call 8 structs-ts-tc
> gdb.base/structs.exp: p/c L<n>; call 9 structs-tc
>
> 2007-06-19 Joseph Myers <joseph@codesourcery.com>
>
> * arm-tdep.c (arm_push_dummy_call): Correct padding of partial
> registers for big-endian.
OK.
R.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-19 22:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19 18:11 Fix ARM big-endian struct arg passing Joseph S. Myers
2007-06-19 22:42 ` Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox