Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] bfin: swapped args in bfin_extract_return_value?
@ 2011-07-20  6:10 Matt Rice
  2011-07-20 14:15 ` Tom Tromey
  2011-07-20 16:05 ` Mike Frysinger
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Rice @ 2011-07-20  6:10 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

I don't really know this code, so this patch might be wrong,
and don't have a setup to test it.

but from the types, and the variable names, it smells of arguments
that have been swapped.

Thanks.

2011-07-11  Matt Rice  <ratmice@gmail.com>

        * bfin-tdep.c (bfin_extract_return_value): Fix swapped
        arguments to store_unsigned_integer.

[-- Attachment #2: foo.diff --]
[-- Type: application/octet-stream, Size: 473 bytes --]

diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 8322af5..5522c5b 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -623,7 +623,7 @@ bfin_extract_return_value (struct type *type,
   while (len > 0)
     {
       regcache_cooked_read_unsigned (regs, regno++, &tmp);
-      store_unsigned_integer (valbuf, (len > 4 ? 4 : len), tmp, byte_order);
+      store_unsigned_integer (valbuf, (len > 4 ? 4 : len), byte_order, tmp);
       len -= 4;
       valbuf += 4;
     }

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-20 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-20  6:10 [patch] bfin: swapped args in bfin_extract_return_value? Matt Rice
2011-07-20 14:15 ` Tom Tromey
2011-07-20 16:03   ` Yao Qi
2011-07-20 16:27   ` Mike Frysinger
2011-07-20 16:05 ` Mike Frysinger
2011-07-20 17:04   ` Matt Rice
2011-07-20 17:55     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox