aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-10-30 22:54:40 +0000
committerAndrew Cagney <cagney@redhat.com>2004-10-30 22:54:40 +0000
commit24e0595198db53c091cee0757a231d7639f72b73 (patch)
tree9c3c00d34b045591346142fd95ccc06d1bd43dd9 /gdb
parent613e114ff9d8c0f2bbe5177ef94f702123bb8885 (diff)
downloadgdb-24e0595198db53c091cee0757a231d7639f72b73.zip
gdb-24e0595198db53c091cee0757a231d7639f72b73.tar.gz
gdb-24e0595198db53c091cee0757a231d7639f72b73.tar.bz2
2004-10-30 Andrew Cagney <cagney@gnu.org>
* config/mips/tm-mips.h (PS_REGNUM): Delete. * mips-tdep.h (MIPS_PS_REGNUM): Add. * remote-vxmips.c, mipsv4-nat.c, mips-tdep.c: Update. * mips-linux-nat.c: Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/config/mips/tm-mips.h1
-rw-r--r--gdb/mips-linux-nat.c6
-rw-r--r--gdb/mips-linux-tdep.c12
-rw-r--r--gdb/mips-tdep.c5
-rw-r--r--gdb/mips-tdep.h1
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/remote-vxmips.c4
8 files changed, 20 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e4d4c33..07157b1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2004-10-30 Andrew Cagney <cagney@gnu.org>
+ * config/mips/tm-mips.h (PS_REGNUM): Delete.
+ * mips-tdep.h (MIPS_PS_REGNUM): Add.
+ * remote-vxmips.c, mipsv4-nat.c, mips-tdep.c: Update.
+ * mips-linux-nat.c: Update.
+
* mips-tdep.h: Add comments on registers.
(MIPS_UNUSED_REGNUM): Define.
* config/mips/tm-mips.h (ZERO_REGNUM, UNUSED_REGNUM)
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 678e3f0..d404fd1 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -44,7 +44,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
#define RA_REGNUM 31 /* Contains return address value */
-#define PS_REGNUM 32 /* Contains processor status */
#define FIRST_EMBED_REGNUM 74 /* First CP0 register for embedded use */
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 6cd9e87..835ba58 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -23,9 +23,9 @@
#include "mips-tdep.h"
/* Pseudo registers can not be read. ptrace does not provide a way to
- read (or set) PS_REGNUM, and there's no point in reading or setting
- MIPS_ZERO_REGNUM. We also can not set BADVADDR, CAUSE, or FCRIR
- via ptrace(). */
+ read (or set) MIPS_PS_REGNUM, and there's no point in reading or
+ setting MIPS_ZERO_REGNUM. We also can not set BADVADDR, CAUSE, or
+ FCRIR via ptrace(). */
int
mips_linux_cannot_fetch_register (int regno)
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index faaa836..60c62ca 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -124,7 +124,7 @@ supply_gregset (elf_gregset_t *gregsetp)
(char *)(regp + EF_CP0_EPC));
supply_32bit_reg (mips_regnum (current_gdbarch)->badvaddr,
(char *)(regp + EF_CP0_BADVADDR));
- supply_32bit_reg (PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
+ supply_32bit_reg (MIPS_PS_REGNUM, (char *)(regp + EF_CP0_STATUS));
supply_32bit_reg (mips_regnum (current_gdbarch)->cause,
(char *)(regp + EF_CP0_CAUSE));
@@ -152,7 +152,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
- fill_gregset (gregsetp, PS_REGNUM);
+ fill_gregset (gregsetp, MIPS_PS_REGNUM);
fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
return;
@@ -173,7 +173,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
regaddr = EF_CP0_EPC;
else if (regno == mips_regnum (current_gdbarch)->badvaddr)
regaddr = EF_CP0_BADVADDR;
- else if (regno == PS_REGNUM)
+ else if (regno == MIPS_PS_REGNUM)
regaddr = EF_CP0_STATUS;
else if (regno == mips_regnum (current_gdbarch)->cause)
regaddr = EF_CP0_CAUSE;
@@ -402,7 +402,7 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
(char *)(regp + MIPS64_EF_CP0_EPC));
regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->badvaddr,
(char *)(regp + MIPS64_EF_CP0_BADVADDR));
- regcache_raw_supply (current_regcache, PS_REGNUM,
+ regcache_raw_supply (current_regcache, MIPS_PS_REGNUM,
(char *)(regp + MIPS64_EF_CP0_STATUS));
regcache_raw_supply (current_regcache, mips_regnum (current_gdbarch)->cause,
(char *)(regp + MIPS64_EF_CP0_CAUSE));
@@ -431,7 +431,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->hi);
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->pc);
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->badvaddr);
- mips64_fill_gregset (gregsetp, PS_REGNUM);
+ mips64_fill_gregset (gregsetp, MIPS_PS_REGNUM);
mips64_fill_gregset (gregsetp, mips_regnum (current_gdbarch)->cause);
return;
@@ -452,7 +452,7 @@ mips64_fill_gregset (mips64_elf_gregset_t *gregsetp, int regno)
regaddr = MIPS64_EF_CP0_EPC;
else if (regno == mips_regnum (current_gdbarch)->badvaddr)
regaddr = MIPS64_EF_CP0_BADVADDR;
- else if (regno == PS_REGNUM)
+ else if (regno == MIPS_PS_REGNUM)
regaddr = MIPS64_EF_CP0_STATUS;
else if (regno == mips_regnum (current_gdbarch)->cause)
regaddr = MIPS64_EF_CP0_CAUSE;
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index b27bc20..fb84d2f 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -60,7 +60,7 @@ static const struct objfile_data *mips_pdr_data;
static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum);
-/* A useful bit in the CP0 status register (PS_REGNUM). */
+/* A useful bit in the CP0 status register (MIPS_PS_REGNUM). */
/* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip. */
#define ST0_FR (1 << 26)
@@ -386,7 +386,7 @@ mips2_fp_compat (void)
/* Otherwise check the FR bit in the status register - it controls
the FP compatiblity mode. If it is clear we are in compatibility
mode. */
- if ((read_register (PS_REGNUM) & ST0_FR) == 0)
+ if ((read_register (MIPS_PS_REGNUM) & ST0_FR) == 0)
return 1;
#endif
@@ -5313,7 +5313,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file, "mips_dump_tdep: PROC_REG_MASK = function?\n");
fprintf_unfiltered (file, "mips_dump_tdep: PROC_REG_OFFSET = function?\n");
fprintf_unfiltered (file, "mips_dump_tdep: PROC_SYMBOL = function?\n");
- fprintf_unfiltered (file, "mips_dump_tdep: PS_REGNUM = %d\n", PS_REGNUM);
#ifdef SAVED_BYTES
fprintf_unfiltered (file,
"mips_dump_tdep: SAVED_BYTES = %d\n", SAVED_BYTES);
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index 9dac4c2..3c476ef 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -77,6 +77,7 @@ enum
MIPS_T9_REGNUM = 25, /* Contains address of callee in PIC. */
MIPS_SP_REGNUM = 29,
MIPS_RA_REGNUM = 31,
+ MIPS_PS_REGNUM = 32, /* Contains processor status. */
MIPS_EMBED_LO_REGNUM = 33,
MIPS_EMBED_HI_REGNUM = 34,
MIPS_EMBED_BADVADDR_REGNUM = 35,
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 75956c1..5229fd5 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -63,7 +63,7 @@ supply_gregset (gregset_t *gregsetp)
(char *) (regp + CXT_CAUSE));
/* Fill inaccessible registers with zero. */
- regcache_raw_supply (current_regcache, PS_REGNUM, zerobuf);
+ regcache_raw_supply (current_regcache, MIPS_PS_REGNUM, zerobuf);
regcache_raw_supply (current_regcache,
mips_regnum (current_gdbarch)->badvaddr,
zerobuf);
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 84e6c7d..c112ca9 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -108,7 +108,7 @@ vx_read_register (int regno)
/* Copy SR, LO, HI, and PC. */
- memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (MIPS_PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR],
MIPS_GREG_SIZE);
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],
@@ -173,7 +173,7 @@ vx_write_register (int regno)
/* Copy SR, LO, HI, and PC. */
memcpy (&mips_greg_packet[MIPS_R_SR],
- &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)],
+ &deprecated_registers[DEPRECATED_REGISTER_BYTE (MIPS_PS_REGNUM)],
MIPS_GREG_SIZE);
memcpy (&mips_greg_packet[MIPS_R_LO],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (mips_regnum (current_gdbarch)->lo)],