aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-09-17 15:42:21 +0000
committerAndrew Cagney <cagney@redhat.com>2003-09-17 15:42:21 +0000
commitefe59759d8d01aa611222e4d7000e41561945741 (patch)
tree50707fc956000e76f0502a8959764bb99b082cea
parent627003499ddac21de88a2d00a0062e2f9407dcce (diff)
downloadgdb-efe59759d8d01aa611222e4d7000e41561945741.zip
gdb-efe59759d8d01aa611222e4d7000e41561945741.tar.gz
gdb-efe59759d8d01aa611222e4d7000e41561945741.tar.bz2
2003-09-17 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_NPC_REGNUM): Deprecate NPC_REGNUM. * gdbarch.h, gdbarch.c: Regenerate. * core-sol2.c, hppa-tdep.c, lynx-nat.c, procfs.c: Update. * regcache.c, remote-vxsparc.c, sparc-linux-nat.c: Update. * sparc-nat.c, sparc-tdep.c, sparc64-tdep.c: Update. * sparcnbsd-tdep.c: Update.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/core-sol2.c2
-rw-r--r--gdb/gdbarch.c38
-rw-r--r--gdb/gdbarch.h15
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/hppa-tdep.c4
-rw-r--r--gdb/lynx-nat.c4
-rw-r--r--gdb/procfs.c4
-rw-r--r--gdb/regcache.c4
-rw-r--r--gdb/remote-vxsparc.c2
-rw-r--r--gdb/sparc-linux-nat.c6
-rw-r--r--gdb/sparc-nat.c8
-rw-r--r--gdb/sparc-tdep.c26
-rw-r--r--gdb/sparc64-tdep.c2
-rw-r--r--gdb/sparcnbsd-tdep.c16
15 files changed, 79 insertions, 65 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7e52923..4601597 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2003-09-17 Andrew Cagney <cagney@redhat.com>
+ * gdbarch.sh (DEPRECATED_NPC_REGNUM): Deprecate NPC_REGNUM.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * core-sol2.c, hppa-tdep.c, lynx-nat.c, procfs.c: Update.
+ * regcache.c, remote-vxsparc.c, sparc-linux-nat.c: Update.
+ * sparc-nat.c, sparc-tdep.c, sparc64-tdep.c: Update.
+ * sparcnbsd-tdep.c: Update.
+
+2003-09-17 Andrew Cagney <cagney@redhat.com>
+
* gdbarch.sh (DEPRECATED_REGISTER_BYTE): Rename REGISTER_BYTE.
* gdbarch.h, gdbarch.c: Regenerate.
* arm-linux-tdep.c, core-sol2.c, cris-tdep.c: Update.
diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c
index e4a25eb..a365233 100644
--- a/gdb/core-sol2.c
+++ b/gdb/core-sol2.c
@@ -103,7 +103,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
= gregs->r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
= gregs->r_pc;
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)]
+ *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)]
= gregs->r_npc;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)]
= gregs->r_y;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index a2b0f64..974a3c0 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -142,7 +142,7 @@ struct gdbarch
int pc_regnum;
int ps_regnum;
int fp0_regnum;
- int npc_regnum;
+ int deprecated_npc_regnum;
gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
@@ -310,7 +310,7 @@ struct gdbarch startup_gdbarch =
-1, /* pc_regnum */
-1, /* ps_regnum */
0, /* fp0_regnum */
- 0, /* npc_regnum */
+ 0, /* deprecated_npc_regnum */
0, /* stab_reg_to_regnum */
0, /* ecoff_reg_to_regnum */
0, /* dwarf_reg_to_regnum */
@@ -501,7 +501,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->pc_regnum = -1;
current_gdbarch->ps_regnum = -1;
current_gdbarch->fp0_regnum = -1;
- current_gdbarch->npc_regnum = -1;
+ current_gdbarch->deprecated_npc_regnum = -1;
current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
@@ -632,7 +632,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of pc_regnum, invalid_p == 0 */
/* Skip verify of ps_regnum, invalid_p == 0 */
/* Skip verify of fp0_regnum, invalid_p == 0 */
- /* Skip verify of npc_regnum, invalid_p == 0 */
+ /* Skip verify of deprecated_npc_regnum, invalid_p == 0 */
/* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
/* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
/* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
@@ -1357,6 +1357,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
#endif
+#ifdef DEPRECATED_NPC_REGNUM
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_NPC_REGNUM # %s\n",
+ XSTRING (DEPRECATED_NPC_REGNUM));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_NPC_REGNUM = %d\n",
+ DEPRECATED_NPC_REGNUM);
+#endif
#ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1910,14 +1918,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: NAME_OF_MALLOC = %s\n",
NAME_OF_MALLOC);
#endif
-#ifdef NPC_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: NPC_REGNUM # %s\n",
- XSTRING (NPC_REGNUM));
- fprintf_unfiltered (file,
- "gdbarch_dump: NPC_REGNUM = %d\n",
- NPC_REGNUM);
-#endif
#ifdef NUM_PSEUDO_REGS
fprintf_unfiltered (file,
"gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
@@ -2971,20 +2971,20 @@ set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
}
int
-gdbarch_npc_regnum (struct gdbarch *gdbarch)
+gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- /* Skip verify of npc_regnum, invalid_p == 0 */
+ /* Skip verify of deprecated_npc_regnum, invalid_p == 0 */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
- return gdbarch->npc_regnum;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_npc_regnum called\n");
+ return gdbarch->deprecated_npc_regnum;
}
void
-set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
- int npc_regnum)
+set_gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch,
+ int deprecated_npc_regnum)
{
- gdbarch->npc_regnum = npc_regnum;
+ gdbarch->deprecated_npc_regnum = deprecated_npc_regnum;
}
int
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index ac044b5..65006ca 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -374,13 +374,16 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
#define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
#endif
-extern int gdbarch_npc_regnum (struct gdbarch *gdbarch);
-extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
-#error "Non multi-arch definition of NPC_REGNUM"
+/* Replace DEPRECATED_NPC_REGNUM with an implementation of WRITE_PC
+ that updates PC, NPC and even NNPC. */
+
+extern int gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_npc_regnum (struct gdbarch *gdbarch, int deprecated_npc_regnum);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_NPC_REGNUM)
+#error "Non multi-arch definition of DEPRECATED_NPC_REGNUM"
#endif
-#if !defined (NPC_REGNUM)
-#define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
+#if !defined (DEPRECATED_NPC_REGNUM)
+#define DEPRECATED_NPC_REGNUM (gdbarch_deprecated_npc_regnum (current_gdbarch))
#endif
/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 010d678..0884c3c 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -453,7 +453,9 @@ v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0
v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0
v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0
v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
-v:2:NPC_REGNUM:int:npc_regnum::::0:-1::0
+# Replace DEPRECATED_NPC_REGNUM with an implementation of WRITE_PC
+# that updates PC, NPC and even NNPC.
+v:2:DEPRECATED_NPC_REGNUM:int:deprecated_npc_regnum::::0:-1::0
# Convert stab register number (from \`r\' declaration) to a gdb REGNUM.
f:2:STAB_REG_TO_REGNUM:int:stab_reg_to_regnum:int stab_regnr:stab_regnr:::no_op_reg_to_regnum::0
# Provide a default mapping from a ecoff register number to a gdb REGNUM.
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index de11549..0670807 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -2630,7 +2630,7 @@ hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
write_register_pid (31, v | 0x3, ptid);
write_register_pid (PC_REGNUM, v, ptid);
- write_register_pid (NPC_REGNUM, v + 4, ptid);
+ write_register_pid (DEPRECATED_NPC_REGNUM, v + 4, ptid);
}
/* return the alignment of a type in bytes. Structures have the maximum
@@ -5178,7 +5178,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sp_regnum (gdbarch, 30);
set_gdbarch_fp0_regnum (gdbarch, 64);
set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
- set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
+ set_gdbarch_deprecated_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
set_gdbarch_deprecated_register_raw_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_register_byte (gdbarch, hppa_register_byte);
set_gdbarch_deprecated_register_virtual_size (gdbarch, hppa_register_raw_size);
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index fe5283d..bbd88b6 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -305,7 +305,7 @@ fetch_inferior_registers (int regno)
supply_register (PS_REGNUM, (char *) &ec.psr);
supply_register (Y_REGNUM, (char *) &ec.y);
supply_register (PC_REGNUM, (char *) &ec.pc);
- supply_register (NPC_REGNUM, (char *) &ec.npc);
+ supply_register (DEPRECATED_NPC_REGNUM, (char *) &ec.npc);
supply_register (WIM_REGNUM, (char *) &ec.wim);
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)], ec.o,
@@ -390,7 +390,7 @@ store_inferior_registers (int regno)
ec.psr = read_register (PS_REGNUM);
ec.y = read_register (Y_REGNUM);
ec.pc = read_register (PC_REGNUM);
- ec.npc = read_register (NPC_REGNUM);
+ ec.npc = read_register (DEPRECATED_NPC_REGNUM);
ec.wim = read_register (WIM_REGNUM);
memcpy (ec.o, &deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)],
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 96cdaa9..11fa6f3 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3705,7 +3705,7 @@ procfs_fetch_registers (int regno)
{
if ((regno >= 0 && regno < FP0_REGNUM) ||
regno == PC_REGNUM ||
- (NPC_REGNUM >= 0 && regno == NPC_REGNUM) ||
+ (DEPRECATED_NPC_REGNUM >= 0 && regno == DEPRECATED_NPC_REGNUM) ||
regno == DEPRECATED_FP_REGNUM ||
regno == SP_REGNUM)
return; /* not a floating point register */
@@ -3779,7 +3779,7 @@ procfs_store_registers (int regno)
{
if ((regno >= 0 && regno < FP0_REGNUM) ||
regno == PC_REGNUM ||
- (NPC_REGNUM >= 0 && regno == NPC_REGNUM) ||
+ (DEPRECATED_NPC_REGNUM >= 0 && regno == DEPRECATED_NPC_REGNUM) ||
regno == DEPRECATED_FP_REGNUM ||
regno == SP_REGNUM)
return; /* not a floating point register */
diff --git a/gdb/regcache.c b/gdb/regcache.c
index e29143c..3561d7c 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1345,8 +1345,8 @@ generic_target_write_pc (CORE_ADDR pc, ptid_t ptid)
#ifdef PC_REGNUM
if (PC_REGNUM >= 0)
write_register_pid (PC_REGNUM, pc, ptid);
- if (NPC_REGNUM >= 0)
- write_register_pid (NPC_REGNUM, pc + 4, ptid);
+ if (DEPRECATED_NPC_REGNUM >= 0)
+ write_register_pid (DEPRECATED_NPC_REGNUM, pc + 4, ptid);
#else
internal_error (__FILE__, __LINE__,
"generic_target_write_pc");
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index c18f91a..339b99f 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -157,7 +157,7 @@ vx_write_register (int regno)
if (regno >= 0)
{
if ((G0_REGNUM <= regno && regno <= I7_REGNUM)
- || (Y_REGNUM <= regno && regno <= NPC_REGNUM))
+ || (Y_REGNUM <= regno && regno <= DEPRECATED_NPC_REGNUM))
in_fp_regs = 0;
else
in_gp_regs = 0;
diff --git a/gdb/sparc-linux-nat.c b/gdb/sparc-linux-nat.c
index 261ed60..f43cb59 100644
--- a/gdb/sparc-linux-nat.c
+++ b/gdb/sparc-linux-nat.c
@@ -40,7 +40,7 @@ supply_gregset (elf_gregset_t *gregsetp)
supply_register (PS_REGNUM, (char *) (regp + 32));
supply_register (PC_REGNUM, (char *) (regp + 33));
- supply_register (NPC_REGNUM, (char *) (regp + 34));
+ supply_register (DEPRECATED_NPC_REGNUM, (char *) (regp + 34));
supply_register (Y_REGNUM, (char *) (regp + 35));
supply_register (WIM_REGNUM, (char *) (regp + 36));
@@ -65,8 +65,8 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regno == -1 || regno == PC_REGNUM)
regcache_collect (PC_REGNUM, regp + 33);
- if (regno == -1 || regno == NPC_REGNUM)
- regcache_collect (NPC_REGNUM, regp + 34);
+ if (regno == -1 || regno == DEPRECATED_NPC_REGNUM)
+ regcache_collect (DEPRECATED_NPC_REGNUM, regp + 34);
if (regno == -1 || regno == Y_REGNUM)
regcache_collect (Y_REGNUM, regp + 35);
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index 24c1472..a4df865 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -108,7 +108,7 @@ fetch_inferior_registers (int regno)
= inferior_registers.r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
= inferior_registers.r_pc;
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)]
+ *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)]
= inferior_registers.r_npc;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
@@ -117,7 +117,7 @@ fetch_inferior_registers (int regno)
deprecated_register_valid[Y_REGNUM] = 1;
deprecated_register_valid[PS_REGNUM] = 1;
deprecated_register_valid[PC_REGNUM] = 1;
- deprecated_register_valid[NPC_REGNUM] = 1;
+ deprecated_register_valid[DEPRECATED_NPC_REGNUM] = 1;
/* If we don't set these valid, read_register_bytes() rereads
all the regs every time it is called! FIXME. */
deprecated_register_valid[WIM_REGNUM] = 1; /* Not true yet, FIXME */
@@ -261,7 +261,7 @@ store_inferior_registers (int regno)
inferior_registers.r_pc =
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)];
inferior_registers.r_npc =
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)];
+ *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)];
inferior_registers.r_y =
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)];
@@ -318,7 +318,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
15 * REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
+ *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)] = gregs->r_npc;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
/* My best guess at where to get the locals and input
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 7263217..3a81821 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -168,7 +168,7 @@ typedef enum
Beihl (beihl@mcc.com). */
/* npc4 and next_pc describe the situation at the time that the
- step-breakpoint was set, not necessary the current value of NPC_REGNUM. */
+ step-breakpoint was set, not necessary the current value of DEPRECATED_NPC_REGNUM. */
static CORE_ADDR next_pc, npc4, target;
static int brknpc4, brktrg;
typedef char binsn_quantum[BREAKPOINT_MAX];
@@ -195,7 +195,7 @@ sparc_software_single_step (enum target_signal ignore, /* pid, but we don't need
if (insert_breakpoints_p)
{
/* Always set breakpoint for NPC. */
- next_pc = read_register (NPC_REGNUM);
+ next_pc = read_register (DEPRECATED_NPC_REGNUM);
npc4 = next_pc + 4; /* branch not taken */
target_insert_breakpoint (next_pc, break_mem[0]);
@@ -1320,10 +1320,10 @@ sparc_pop_frame (void)
write_register (PC_REGNUM,
read_memory_integer (fsr[PC_REGNUM],
REGISTER_RAW_SIZE (PC_REGNUM)));
- if (fsr[NPC_REGNUM])
- write_register (NPC_REGNUM,
- read_memory_integer (fsr[NPC_REGNUM],
- REGISTER_RAW_SIZE (NPC_REGNUM)));
+ if (fsr[DEPRECATED_NPC_REGNUM])
+ write_register (DEPRECATED_NPC_REGNUM,
+ read_memory_integer (fsr[DEPRECATED_NPC_REGNUM],
+ REGISTER_RAW_SIZE (DEPRECATED_NPC_REGNUM)));
}
else if (get_frame_extra_info (frame)->flat)
{
@@ -1342,7 +1342,7 @@ sparc_pop_frame (void)
}
write_register (PC_REGNUM, pc);
- write_register (NPC_REGNUM, pc + 4);
+ write_register (DEPRECATED_NPC_REGNUM, pc + 4);
}
else if (fsr[I7_REGNUM])
{
@@ -1350,7 +1350,7 @@ sparc_pop_frame (void)
pc = PC_ADJUST ((CORE_ADDR) read_memory_integer (fsr[I7_REGNUM],
SPARC_INTREG_SIZE));
write_register (PC_REGNUM, pc);
- write_register (NPC_REGNUM, pc + 4);
+ write_register (DEPRECATED_NPC_REGNUM, pc + 4);
}
flush_cached_frames ();
}
@@ -1479,7 +1479,7 @@ supply_gregset (gdb_gregset_t *gregsetp)
/* These require a bit more care. */
supply_register (PC_REGNUM, ((char *) (regp + R_PC)) + offset);
- supply_register (NPC_REGNUM, ((char *) (regp + R_nPC)) + offset);
+ supply_register (DEPRECATED_NPC_REGNUM, ((char *) (regp + R_nPC)) + offset);
supply_register (Y_REGNUM, ((char *) (regp + R_Y)) + offset);
if (GDB_TARGET_IS_SPARC64)
@@ -1598,8 +1598,8 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == PC_REGNUM))
deprecated_read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
- if ((regno == -1) || (regno == NPC_REGNUM))
- deprecated_read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
+ if ((regno == -1) || (regno == DEPRECATED_NPC_REGNUM))
+ deprecated_read_register_gen (DEPRECATED_NPC_REGNUM, (char *) (regp + R_nPC) + offset);
if ((regno == -1) || (regno == Y_REGNUM))
deprecated_read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
@@ -3384,7 +3384,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 68);
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_npc_regnum (gdbarch, SPARC32_NPC_REGNUM);
+ set_gdbarch_deprecated_npc_regnum (gdbarch, SPARC32_NPC_REGNUM);
set_gdbarch_pc_regnum (gdbarch, SPARC32_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_push_arguments (gdbarch, sparc32_push_arguments);
@@ -3433,7 +3433,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 136);
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_npc_regnum (gdbarch, SPARC64_NPC_REGNUM);
+ set_gdbarch_deprecated_npc_regnum (gdbarch, SPARC64_NPC_REGNUM);
set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_push_arguments (gdbarch, sparc64_push_arguments);
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 81b2115..b605a1d 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1356,7 +1356,7 @@ sparc64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Register numbers of various important registers. */
set_gdbarch_sp_regnum (gdbarch, SPARC_SP_REGNUM); /* %sp */
set_gdbarch_pc_regnum (gdbarch, SPARC64_PC_REGNUM); /* %pc */
- set_gdbarch_npc_regnum (gdbarch, SPARC64_NPC_REGNUM);
+ set_gdbarch_deprecated_npc_regnum (gdbarch, SPARC64_NPC_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, SPARC_F0_REGNUM); /* %f0 */
/* Call dummy code. */
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 6cd0e3f..f259507 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -59,8 +59,8 @@ sparcnbsd_supply_reg32 (char *regs, int regno)
if (regno == PC_REGNUM || regno == -1)
supply_register (PC_REGNUM, regs + REG32_OFFSET_PC);
- if (regno == NPC_REGNUM || regno == -1)
- supply_register (NPC_REGNUM, regs + REG32_OFFSET_NPC);
+ if (regno == DEPRECATED_NPC_REGNUM || regno == -1)
+ supply_register (DEPRECATED_NPC_REGNUM, regs + REG32_OFFSET_NPC);
if (regno == Y_REGNUM || regno == -1)
supply_register (Y_REGNUM, regs + REG32_OFFSET_Y);
@@ -126,8 +126,8 @@ sparcnbsd_supply_reg64 (char *regs, int regno)
if (regno == PC_REGNUM || regno == -1)
supply_register (PC_REGNUM, regs + REG64_OFFSET_PC);
- if (regno == NPC_REGNUM || regno == -1)
- supply_register (NPC_REGNUM, regs + REG64_OFFSET_NPC);
+ if (regno == DEPRECATED_NPC_REGNUM || regno == -1)
+ supply_register (DEPRECATED_NPC_REGNUM, regs + REG64_OFFSET_NPC);
if (regno == Y_REGNUM || regno == -1)
{
@@ -220,8 +220,8 @@ sparcnbsd_fill_reg32 (char *regs, int regno)
if (regno == PC_REGNUM || regno == -1)
regcache_collect (PC_REGNUM, regs + REG32_OFFSET_PC);
- if (regno == NPC_REGNUM || regno == -1)
- regcache_collect (NPC_REGNUM, regs + REG32_OFFSET_NPC);
+ if (regno == DEPRECATED_NPC_REGNUM || regno == -1)
+ regcache_collect (DEPRECATED_NPC_REGNUM, regs + REG32_OFFSET_NPC);
if (regno == Y_REGNUM || regno == -1)
regcache_collect (Y_REGNUM, regs + REG32_OFFSET_Y);
@@ -261,8 +261,8 @@ sparcnbsd_fill_reg64 (char *regs, int regno)
if (regno == PC_REGNUM || regno == -1)
regcache_collect (PC_REGNUM, regs + REG64_OFFSET_PC);
- if (regno == NPC_REGNUM || regno == -1)
- regcache_collect (NPC_REGNUM, regs + REG64_OFFSET_NPC);
+ if (regno == DEPRECATED_NPC_REGNUM || regno == -1)
+ regcache_collect (DEPRECATED_NPC_REGNUM, regs + REG64_OFFSET_NPC);
if (regno == Y_REGNUM || regno == -1)
regcache_collect (Y_REGNUM, regs + REG64_OFFSET_Y);