* hppah-nat.c (store_inferior_registers): Move check for

CANNOT_STORE_REGISTER to a better place.  Fixes ptrace I/O errors
	found by test suite during function calls, which attempts to write
	unwritable registers.
This commit is contained in:
Stu Grossman 1995-03-20 15:38:56 +00:00
parent 5c26250b95
commit a15f6b0a8e
2 changed files with 12 additions and 11 deletions

View File

@ -1,3 +1,10 @@
Mon Mar 20 07:34:48 1995 Stu Grossman (grossman@cygnus.com)
* hppah-nat.c (store_inferior_registers): Move check for
CANNOT_STORE_REGISTER to a better place. Fixes ptrace I/O errors
found by test suite during function calls, which attempts to write
unwritable registers.
Sat Mar 18 02:02:24 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* mdebugread.c (parse_symbol): If finishing a function without

View File

@ -60,6 +60,8 @@ store_inferior_registers (regno)
if (regno >= 0)
{
if (CANNOT_STORE_REGISTER (regno))
return;
regaddr = register_addr (regno, offset);
errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
@ -90,22 +92,14 @@ store_inferior_registers (regno)
sprintf (msg, "writing register %s: %s",
reg_names[regno], err);
warning (msg);
goto error_exit;
return;
}
regaddr += sizeof(int);
}
}
else
{
for (regno = 0; regno < NUM_REGS; regno++)
{
if (CANNOT_STORE_REGISTER (regno))
continue;
store_inferior_registers (regno);
}
}
error_exit:
return;
for (regno = 0; regno < NUM_REGS; regno++)
store_inferior_registers (regno);
}
/* Fetch one register. */