From: Andrew Cagney Date: Mon, 23 Feb 1998 16:40:34 +0000 (+0000) Subject: Specify correct values for REGISTER_RAW_SIZE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5af9fc5f50fe5ef373219668cb94f2894b263a6b;p=binutils-gdb.git Specify correct values for REGISTER_RAW_SIZE. If a SIM/GDB register size botch, warn the user once. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 61de6d5f805..4946432aed2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +Tue Feb 24 03:32:59 1998 Andrew Cagney + + * remote-sim.c (gdbsim_fetch_register): Don't abort when the + register size is wrong. + +start-sanitize-r5900 +Tue Feb 24 02:53:41 1998 Andrew Cagney + + * config/mips/tm-r5900.h (REGISTER_VIRTUAL_SIZE, + REGISTE_RAW_SIZE): Re-define. + +end-sanitize-r5900 Thu Feb 19 16:49:48 1998 John Metzler * target.c - tracing 64 bit targets crashed long long printfs diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 70f32215188..4ec4cd39247 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -339,6 +339,7 @@ static void gdbsim_fetch_register (regno) int regno; { + static int warn_user = 1; if (regno == -1) { for (regno = 0; regno < NUM_REGS; regno++) @@ -351,8 +352,14 @@ gdbsim_fetch_register (regno) if (nr_bytes == 0) /* register not applicable, supply zero's */ memset (buf, 0, MAX_REGISTER_RAW_SIZE); - else if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno)) - fatal ("Register size different to expected"); + else if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno) + && warn_user) + { + printf_unfiltered ("Size of register %s (%d) incorrect (%d instead of %d))", + reg_names [regno], regno, + nr_bytes, REGISTER_RAW_SIZE (regno)); + warn_user = 0; + } supply_register (regno, buf); if (sr_get_debug ()) {