[patch] bfin: swapped args in bfin_extract_return_value?

Matt Rice
2011-07-20T02:12:28Z

[-- 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;
}