This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: fix mips gdbserver gunk
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 15 Feb 2002 18:00:15 -0500
- Subject: PATCH: fix mips gdbserver gunk
A little bit of code from the previous version of the regcache stuck around.
Killed thusly; committed as obvious.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-02-15 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/linux-mips-low.c (cannot_fetch_register): Use find_regno
instead of find_register_by_number.
(cannot_store_register): Likewise.
Index: linux-mips-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-mips-low.c,v
retrieving revision 1.1
diff -u -p -r1.1 linux-mips-low.c
--- linux-mips-low.c 2002/02/14 06:21:22 1.1
+++ linux-mips-low.c 2002/02/15 22:56:16
@@ -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;