diff options
author | Stu Grossman <grossman@cygnus> | 1995-03-20 15:38:56 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1995-03-20 15:38:56 +0000 |
commit | a15f6b0a8e527e2424d031e8916857b7c67f1984 (patch) | |
tree | ca20bc873413f310b99be60dacc10785dfadf6de | |
parent | 5c26250b95bae82df80cab9985c6857203c9b93b (diff) | |
download | gdb-a15f6b0a8e527e2424d031e8916857b7c67f1984.zip gdb-a15f6b0a8e527e2424d031e8916857b7c67f1984.tar.gz gdb-a15f6b0a8e527e2424d031e8916857b7c67f1984.tar.bz2 |
* 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.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/hppah-nat.c | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22e0a82..1a54a27 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c index 5681658..bbea4c9 100644 --- a/gdb/hppah-nat.c +++ b/gdb/hppah-nat.c @@ -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. */ |