From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFC] sim: Update sim_{fetch,store}_register for sh and mn10300
Date: Thu, 16 Feb 2012 00:27:00 -0000 [thread overview]
Message-ID: <20120215171319.229a3e1d@mesquite.lan> (raw)
The patch below updates sim_fetch_register for both mn10300 and sh
to return the length of the value being fetched instead of -1. For
sh, sim_store_register() is changed in a like fashion.
This change is necessary due to past changes to remote-sim.c which do
more stringent checks of the return value.
Comments?
sim/mn10300/ChangeLog:
* interp.c (sim_fetch_register): Return length, not -1.
sim/ChangeLog:
* sh/interp.c (sim_store_register, sim_fetch_register): Return
length, not -1.
Index: sim/mn10300/interp.c
===================================================================
RCS file: /cvs/src/src/sim/mn10300/interp.c,v
retrieving revision 1.7
diff -u -p -r1.7 interp.c
--- sim/mn10300/interp.c 5 Jul 2011 19:06:38 -0000 1.7
+++ sim/mn10300/interp.c 15 Feb 2012 23:59:49 -0000
@@ -383,7 +383,7 @@ sim_fetch_register (SIM_DESC sd,
int length)
{
put_word (memory, State.regs[rn]);
- return -1;
+ return length;
}
int
Index: sim/sh/interp.c
===================================================================
RCS file: /cvs/src/src/sim/sh/interp.c,v
retrieving revision 1.23
diff -u -p -r1.23 interp.c
--- sim/sh/interp.c 16 Apr 2011 18:16:36 -0000 1.23
+++ sim/sh/interp.c 15 Feb 2012 23:59:49 -0000
@@ -2356,7 +2356,7 @@ sim_store_register (sd, rn, memory, leng
default:
return 0;
}
- return -1;
+ return length;
}
int
@@ -2531,7 +2531,7 @@ sim_fetch_register (sd, rn, memory, leng
return 0;
}
* (int *) memory = swap (val);
- return -1;
+ return length;
}
int
next reply other threads:[~2012-02-16 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 0:27 Kevin Buettner [this message]
2012-02-16 10:38 ` Mike Frysinger
2012-02-16 23:40 ` Kevin Buettner
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=20120215171319.229a3e1d@mesquite.lan \
--to=kevinb@redhat.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