diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-08-01 03:22:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-08-01 03:22:32 +0000 |
commit | b5539f23a007948b94f7565488b33ca9fd4c6ab0 (patch) | |
tree | 918c62994500f1534cd509084c69a520ac3b61d7 /sim | |
parent | 7a2d09ccbfef984e3dc483887d6bc7d6e304615f (diff) | |
download | gdb-b5539f23a007948b94f7565488b33ca9fd4c6ab0.zip gdb-b5539f23a007948b94f7565488b33ca9fd4c6ab0.tar.gz gdb-b5539f23a007948b94f7565488b33ca9fd4c6ab0.tar.bz2 |
sim: bfin: update return value in bfin_reg_{fetch,store}
The latest gdb sim-remote.c really wants a return value from the fetch/store
register functions, so update the Blackfin sim to avoid the warnings/errors.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r-- | sim/bfin/ChangeLog | 6 | ||||
-rw-r--r-- | sim/bfin/machs.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 5d09b5a..49f2d6b 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,9 @@ +2012-07-31 Mike Frysinger <vapier@gentoo.org> + + * machs.c (bfin_reg_fetch): Change return 0 to return -1, and + return -1 to return 4. + (bfin_reg_store): Likewise. + 2012-06-15 Joel Brobecker <brobecker@adacore.com> * config.in, configure: Regenerate. diff --git a/sim/bfin/machs.c b/sim/bfin/machs.c index 9d0f263..04e39b5 100644 --- a/sim/bfin/machs.c +++ b/sim/bfin/machs.c @@ -1859,7 +1859,7 @@ bfin_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *buf, int len) else if (rn == SIM_BFIN_CC_REGNUM) value = CCREG; else - return 0; // will be an error in gdb + return -1; /* Handle our KSP/USP shadowing in SP. While in supervisor mode, we have the normal SP/USP behavior. User mode is tricky though. */ @@ -1874,7 +1874,7 @@ bfin_reg_fetch (SIM_CPU *cpu, int rn, unsigned char *buf, int len) bfin_store_unsigned_integer (buf, 4, value); - return -1; // disables size checking in gdb + return 4; } static int @@ -1893,9 +1893,9 @@ bfin_reg_store (SIM_CPU *cpu, int rn, unsigned char *buf, int len) else if (rn == SIM_BFIN_CC_REGNUM) SET_CCREG (value); else - return 0; // will be an error in gdb + return -1; - return -1; // disables size checking in gdb + return 4; } static sim_cia |