diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-04-06 20:50:10 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-04-06 20:50:10 +0000 |
commit | c2169756a8401d39c336250819099c1fbc9e5091 (patch) | |
tree | b34606f91e725e109d2a1b906e29133e940df977 /gdb/gdbarch.h | |
parent | 25f1b00810427752a10456206dc0c5289f997479 (diff) | |
download | gdb-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.h')
-rw-r--r-- | gdb/gdbarch.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index ed87fa0..039ba59 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -456,6 +456,12 @@ extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo #endif #endif +/* GDB's standard (or well known) register numbers. These can map onto + a real register or a pseudo (computed) register or not be defined at + all (-1). FIXME: cagney/2002-04-05: As of the time of writing, only + the PS_REGNUM was optional - code still depends on the others (fp, + pc, sp) designating registers. */ + extern int gdbarch_sp_regnum (struct gdbarch *gdbarch); extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum); #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM) @@ -490,6 +496,22 @@ extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum); #endif /* Default (value) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM) +#define PS_REGNUM (-1) +#endif + +extern int gdbarch_ps_regnum (struct gdbarch *gdbarch); +extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM) +#error "Non multi-arch definition of PS_REGNUM" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM) +#define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch)) +#endif +#endif + +/* Default (value) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM) #define FP0_REGNUM (-1) #endif |