aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-04-11 20:30:08 +0000
committerDaniel Jacobowitz <drow@false.org>2002-04-11 20:30:08 +0000
commitbc1e36cac4325ccb7f5d1128adb69c744499f438 (patch)
tree5990e0dcd87748a953fab50b46d286eabc485776 /gdb/gdbserver/linux-low.c
parente3f36dbd4775498d38cb5a6d24608c2c7626c209 (diff)
downloadgdb-bc1e36cac4325ccb7f5d1128adb69c744499f438.zip
gdb-bc1e36cac4325ccb7f5d1128adb69c744499f438.tar.gz
gdb-bc1e36cac4325ccb7f5d1128adb69c744499f438.tar.bz2
2002-04-11 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/linux-low.c (usr_store_inferior_registers): Support registers which are allowed to fail to store. * gdbserver/linux-low.h (linux_target_ops): Likewise. * gdbserver/linux-ppc-low.c (ppc_regmap): Support FPSCR. (ppc_cannot_store_register): FPSCR may not be storable. * regformats/reg-ppc.dat: Support FPSCR.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r--gdb/gdbserver/linux-low.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 8c729df..bd1a876 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -240,7 +240,7 @@ usr_store_inferior_registers (int regno)
if (regno >= the_low_target.num_regs)
return;
- if ((*the_low_target.cannot_store_register) (regno))
+ if ((*the_low_target.cannot_store_register) (regno) == 1)
return;
regaddr = register_addr (regno);
@@ -254,14 +254,15 @@ usr_store_inferior_registers (int regno)
*(int *) (register_data (regno) + i));
if (errno != 0)
{
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "writing register %d: %s",
- regno, err);
- error (msg);
- return;
+ if ((*the_low_target.cannot_store_register) (regno) == 0)
+ {
+ char *err = strerror (errno);
+ char *msg = alloca (strlen (err) + 128);
+ sprintf (msg, "writing register %d: %s",
+ regno, err);
+ error (msg);
+ return;
+ }
}
regaddr += sizeof (int);
}