aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-04-06 20:50:10 +0000
committerAndrew Cagney <cagney@redhat.com>2002-04-06 20:50:10 +0000
commitc2169756a8401d39c336250819099c1fbc9e5091 (patch)
treeb34606f91e725e109d2a1b906e29133e940df977 /gdb/gdbarch.c
parent25f1b00810427752a10456206dc0c5289f997479 (diff)
downloadgdb-c2169756a8401d39c336250819099c1fbc9e5091.zip
gdb-c2169756a8401d39c336250819099c1fbc9e5091.tar.gz
gdb-c2169756a8401d39c336250819099c1fbc9e5091.tar.bz2
* gdbarch.sh (PS_REGNUM): Add. Document. Default to -1.
* gdbarch.c, gdbarch.h: Re-generate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 90118d6..fa9054b 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -151,6 +151,7 @@ struct gdbarch
int sp_regnum;
int fp_regnum;
int pc_regnum;
+ int ps_regnum;
int fp0_regnum;
int npc_regnum;
int nnpc_regnum;
@@ -296,6 +297,7 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
+ -1,
0,
0,
0,
@@ -459,6 +461,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->sp_regnum = -1;
current_gdbarch->fp_regnum = -1;
current_gdbarch->pc_regnum = -1;
+ current_gdbarch->ps_regnum = -1;
current_gdbarch->fp0_regnum = -1;
current_gdbarch->npc_regnum = -1;
current_gdbarch->nnpc_regnum = -1;
@@ -592,6 +595,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->pc_regnum == -1))
fprintf_unfiltered (log, "\n\tpc_regnum");
+ /* 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 nnpc_regnum, invalid_p == 0 */
@@ -1532,6 +1536,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->prologue_frameless_p
/*PROLOGUE_FRAMELESS_P ()*/);
#endif
+#ifdef PS_REGNUM
+ fprintf_unfiltered (file,
+ "gdbarch_dump: PS_REGNUM # %s\n",
+ XSTRING (PS_REGNUM));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: PS_REGNUM = %d\n",
+ PS_REGNUM);
+#endif
#ifdef PUSH_ARGUMENTS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2587,6 +2599,22 @@ set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
}
int
+gdbarch_ps_regnum (struct gdbarch *gdbarch)
+{
+ /* Skip verify of ps_regnum, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
+ return gdbarch->ps_regnum;
+}
+
+void
+set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
+ int ps_regnum)
+{
+ gdbarch->ps_regnum = ps_regnum;
+}
+
+int
gdbarch_fp0_regnum (struct gdbarch *gdbarch)
{
/* Skip verify of fp0_regnum, invalid_p == 0 */