diff options
author | Daniel Jacobowitz <dan@debian.org> | 2003-07-07 15:17:55 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2003-07-07 15:17:55 +0000 |
commit | e0e94344bb7bc16dff7ec65aaaa90d7d5ce313a1 (patch) | |
tree | 8cd0e3517d86f05bfe75f2b548d347d3e0a5445a /gdb/mips-linux-nat.c | |
parent | 957a74b740b314789528fdf6b759910cbf3c6dd5 (diff) | |
download | gdb-e0e94344bb7bc16dff7ec65aaaa90d7d5ce313a1.tar.gz |
* mips-linux-nat.c (mips_linux_cannot_fetch_register)
(mips_linux_cannot_store_register): List supported instead of
unsupported registers.
Diffstat (limited to 'gdb/mips-linux-nat.c')
-rw-r--r-- | gdb/mips-linux-nat.c | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index a0469f6f9f3..6d58055300a 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -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. @@ -29,31 +29,42 @@ 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; } |