From dae477fed8cdd8063a79042f2781a983be1c728d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Tue, 11 Jan 2011 14:19:34 +0000 Subject: http://sourceware.org/ml/gdb-patches/2010-11/msg00112.html gdb/ChangeLog * remote-sim.c (gdbsim_store_register): Update API to sim_store_register to check more error conditions. include/gdb/ChangeLog * remote-sim.h (sim_store_register): Update the API documentation for this function. sim/erc32/ChangeLog sim/h8300/ChangeLog sim/m32c/ChangeLog sim/mn10300/ChangeLog sim/ppc/ChangeLog sim/rx/ChangeLog sim/v850/ChangeLog * ???.c (sim_store_register): Update return value to match new API. --- gdb/ChangeLog | 5 +++++ gdb/remote-sim.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2e86bb8..18f70ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-01-11 Andrew Burgess + + * remote-sim.c (gdbsim_store_register): Update API to + sim_store_register to check more error conditions. + 2011-01-10 Michael Snyder * nto-procfs.c: Comment cleanup, mostly periods and spaces. diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index f2015f0..baaf439 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); -- cgit v1.1