Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matt Rice <ratmice@gmail.com>
To: gdb-patches@sourceware.org
Subject: [patch] bfin: swapped args in bfin_extract_return_value?
Date: Wed, 20 Jul 2011 06:10:00 -0000	[thread overview]
Message-ID: <CACTLOFpa7MrLx-1UTx08qX2Akdm=Ssb+tHHN0GjdFp+U6r9G-A@mail.gmail.com> (raw)

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

             reply	other threads:[~2011-07-20  2:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20  6:10 Matt Rice [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACTLOFpa7MrLx-1UTx08qX2Akdm=Ssb+tHHN0GjdFp+U6r9G-A@mail.gmail.com' \
    --to=ratmice@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox