From a15f6b0a8e527e2424d031e8916857b7c67f1984 Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Mon, 20 Mar 1995 15:38:56 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 7 +++++++ gdb/hppah-nat.c | 16 +++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22e0a82e6fb..1a54a27ce9a 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 56816586547..bbea4c9b658 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. */ -- 2.30.2