Specify correct values for REGISTER_RAW_SIZE.

If a SIM/GDB register size botch, warn the user once.
This commit is contained in:
Andrew Cagney 1998-02-23 16:40:34 +00:00
parent 2c3c3f790d
commit 5af9fc5f50
2 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,15 @@
Tue Feb 24 03:32:59 1998 Andrew Cagney <cagney@b1.cygnus.com>
* 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 <cagney@b1.cygnus.com>
* 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 <jmetzler@cygnus.com>
* target.c - tracing 64 bit targets crashed long long printfs

View file

@ -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 ())
{