summaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index f2015f02577..baaf4397a42 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -529,9 +529,13 @@ gdbsim_store_register (struct target_ops *ops,
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);