From: Daniel Jacobowitz Date: Fri, 15 Feb 2002 22:59:13 +0000 (+0000) Subject: 2002-02-15 Daniel Jacobowitz X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d33e73ab96028119937986b9d2365e3d48b6afc;p=binutils-gdb.git 2002-02-15 Daniel Jacobowitz * gdbserver/linux-mips-low.c (cannot_fetch_register): Use find_regno instead of find_register_by_number. (cannot_store_register): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 89b2166d6df..463209966e1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-02-15 Daniel Jacobowitz + + * gdbserver/linux-mips-low.c (cannot_fetch_register): Use find_regno + instead of find_register_by_number. + (cannot_store_register): Likewise. + 2002-02-14 Pierre Muller * dwarf2read.c: Replace fprintf (stderr, ...) by diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c index ef14c6a9d6e..892bc2d6d09 100644 --- a/gdb/gdbserver/linux-mips-low.c +++ b/gdb/gdbserver/linux-mips-low.c @@ -65,14 +65,10 @@ int regmap[] = { int cannot_fetch_register (int regno) { - struct reg *reg; - if (regmap[regno] == -1) return 1; - reg = find_register_by_number (regno); - - if (strcmp (reg->name, "zero") == 0) + if (find_regno ("zero") == regno); return 1; return 0; @@ -81,23 +77,19 @@ cannot_fetch_register (int regno) int cannot_store_register (int regno) { - struct reg *reg; - if (regmap[regno] == -1) return 1; - reg = find_register_by_number (regno); - - if (strcmp (reg->name, "zero") == 0) + if (find_regno ("zero") == regno) return 1; - if (strcmp (reg->name, "cause") == 0) + if (find_regno ("cause") == regno) return 1; - if (strcmp (reg->name, "bad") == 0) + if (find_regno ("bad") == regno) return 1; - if (strcmp (reg->name, "fir") == 0) + if (find_regno ("fir") == regno) return 1; return 0;