+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * remote-sim.c (gdbsim_store_register): Update API to
+ sim_store_register to check more error conditions.
+
2011-01-10 Michael Snyder <msnyder@vmware.com>
* nto-procfs.c: Comment cleanup, mostly periods and spaces.
if (nr_bytes > 0 && nr_bytes != register_size (gdbarch, regno))
internal_error (__FILE__, __LINE__,
_("Register size different to expected"));
- /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
- indicating that GDB and the SIM have different ideas about
- which registers are fetchable. */
+ if (nr_bytes < 0)
+ internal_error (__FILE__, __LINE__,
+ _("Register %d not updated"), regno);
+ if (nr_bytes == 0)
+ warning (_("Register %s not updated"),
+ gdbarch_register_name (gdbarch, regno));
+
if (remote_debug)
{
printf_filtered ("gdbsim_store_register: %d", regno);
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * remote-sim.h (sim_store_register): Update the API
+ documentation for this function.
+
2010-09-06 Pedro Alves <pedro@codesourcery.com>
* signals.def: Replace all ANY uses by SET with specific numbers.
/* Store register REGNO from the raw (target endian) value in BUF.
- Return the actual size of the register or zero if REGNO is not
- applicable.
- Legacy implementations ignore LENGTH and always return -1.
+ Return the actual size of the register, any size not equal to
+ LENGTH indicates the register was not updated correctly.
- If LENGTH does not match the size of REGNO no data is transfered
- (the actual register size is still returned). */
+ Return a LENGTH of -1 to indicate the register was not updated
+ and an error has occurred.
+
+ Return a LENGTH of 0 to indicate the register was not updated
+ but no error has occurred. */
int sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length);
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * interf.c (sim_store_register): Update return value to
+ match new API.
+
2010-05-20 Joel Brobecker <brobecker@adacore.com>
* sis.h: Remove #include <stdint.h>.
regval = (value[3] << 24) | (value[2] << 16)
| (value[1] << 8) | value[0];
set_regi(&sregs, regno, regval);
- return -1;
+ return length;
}
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * compile.c (sim_store_register): Update return value to
+ match new API.
+
2010-04-14 Mike Frysinger <vapier@gentoo.org>
* compile.c (sim_write): Add const to buffer arg.
h8_set_ticks (sd, longval);
break;
}
- return -1;
+ return length;
}
int
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * gdb-if.c (sim_store_register): Update return value to
+ match new API.
+
2010-12-04 Masaki Muranaka <monaka@monami-software.com>
* Makefile.in: Use CC_FOR_BUILD to build opc2c.
check_desc (sd);
if (!check_regno (regno))
- return 0;
+ return -1;
size = reg_size (regno);
default:
fprintf (stderr, "m32c minisim: unrecognized register number: %d\n",
regno);
- return -1;
+ return 0;
}
}
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * interp.c (sim_store_register): Update return value to
+ match new API.
+
2010-04-19 Mike Frysinger <vapier@gentoo.org>
* dv-mn103ser.c (sockser_addr, USE_SOCKSER_P): Delete
int length)
{
State.regs[rn] = get_word (memory);
- return -1;
+ return length;
}
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * gdb-sim.c (sim_store_register): Update return value to
+ match new API.
+
2011-01-05 Joel Brobecker <brobecker@adacore.com>
* psim.texinfo: Copyright year update.
const char *regname = regnum2name (regno);
if (simulator == NULL || regname == NULL)
- return -1;
+ return 0;
TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",
regno, regname, (long)buf));
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * gdb-if.c (sim_store_register): Update return value to
+ match new API.
+
2010-12-14 DJ Delorie <dj@redhat.com>
* rx.c (decode_opcode): For "MVFC PC,", use the address of the
check_desc (sd);
if (!check_regno (regno))
- return 0;
+ return -1;
size = reg_size (regno);
if (length != size)
- return 0;
+ return -1;
if (rx_big_endian)
val = get_be (buf, length);
default:
fprintf (stderr, "rx minisim: unrecognized register number: %d\n",
regno);
- return -1;
+ return 0;
}
return size;
+2011-01-11 Andrew Burgess <aburgess@broadcom.com>
+
+ * interp.c (sim_store_register): Update return value to
+ match new API.
+
2010-03-30 Mike Frysinger <vapier@gentoo.org>
* interp.c (interrupt_names): Add const to pointer type.
int length;
{
State.regs[rn] = T2H_4 (*(unsigned32*)memory);
- return -1;
+ return length;
}
void