]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* mips-linux-nat.c (mips_linux_cannot_fetch_register)
authorDaniel Jacobowitz <drow@false.org>
Mon, 7 Jul 2003 15:17:55 +0000 (15:17 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 7 Jul 2003 15:17:55 +0000 (15:17 +0000)
(mips_linux_cannot_store_register): List supported instead of
unsupported registers.

gdb/ChangeLog
gdb/mips-linux-nat.c

index 06b1918ce181e8ceb2b1c3066e403f917deccf87..27481e227929efcac4e1b69e0389cc3a27232d78 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-07  Daniel Jacobowitz  <drow@mvista.com>
+
+       * mips-linux-nat.c (mips_linux_cannot_fetch_register)
+       (mips_linux_cannot_store_register): List supported instead of
+       unsupported registers.
+
 2003-07-07  Daniel Jacobowitz  <drow@mvista.com>
 
        * disasm.c (dump_insns): Separate instructions from addresses.
index a0469f6f9f385bea4e16dc820c9a4de9da2f9ba2..6d58055300a0f8cd8b9764a2304822f6d9154cbc 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 int
 mips_linux_cannot_fetch_register (int regno)
 {
-  if (REGISTER_NAME (regno)[0] == 0)
-    return 1;
-  if (regno == PS_REGNUM)
-    return 1;
-  else if (regno == ZERO_REGNUM)
-    return 1;
-  else
+  if (regno > ZERO_REGNUM && regno < ZERO_REGNUM + 32)
     return 0;
+  else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
+    return 0;
+
+  switch (regno)
+    {
+    case LO_REGNUM:
+    case HI_REGNUM:
+    case BADVADDR_REGNUM:
+    case CAUSE_REGNUM:
+    case PC_REGNUM:
+    case FCRCS_REGNUM:
+    case FCRIR_REGNUM:
+      return 0;
+    }
+
+  return 1;
 }
 
 int
 mips_linux_cannot_store_register (int regno)
 {
-  if (REGISTER_NAME (regno)[0] == 0)
-    return 1;
-  if (regno == PS_REGNUM)
-    return 1;
-  else if (regno == ZERO_REGNUM)
-    return 1;
-  else if (regno == BADVADDR_REGNUM)
-    return 1;
-  else if (regno == CAUSE_REGNUM)
-    return 1;
-  else if (regno == FCRIR_REGNUM)
-    return 1;
-  else
+  if (regno > ZERO_REGNUM && regno < ZERO_REGNUM + 32)
     return 0;
+  else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
+    return 0;
+
+  switch (regno)
+    {
+    case LO_REGNUM:
+    case HI_REGNUM:
+    case PC_REGNUM:
+    case FCRCS_REGNUM:
+      return 0;
+    }
+
+  return 1;
 }