diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-06-07 16:23:12 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-06-07 16:23:12 +0000 |
commit | cde9ea48081fcfec378c5b6e22e3d4b41fa3e2ad (patch) | |
tree | 24e4d2d6b34cd315e91db8e9b382e74eb279a1aa /gdb/gdbarch.h | |
parent | 9a90a78063be817c7fa1b4548ca8fd4c7ca8e843 (diff) | |
download | gdb-cde9ea48081fcfec378c5b6e22e3d4b41fa3e2ad.zip gdb-cde9ea48081fcfec378c5b6e22e3d4b41fa3e2ad.tar.gz gdb-cde9ea48081fcfec378c5b6e22e3d4b41fa3e2ad.tar.bz2 |
2003-06-07 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (TARGET_READ_PC): Add predicate, remove default.
* gdbarch.h, gdbarch.c: Re-generate.
* regcache.c: Update comments on read_pc et.al.
(generic_target_read_pc): Delete function.
(read_pc_pid): Try TARGET_READ_PC and PC_REGNUM for a PC register.
* inferior.h (generic_target_read_pc): Delete declaration.
* frv-tdep.c (frv_gdbarch_init): Do not set read_pc to
generic_target_read_pc.
* sparc-tdep.c (sparc_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 9678f4f..db40c66 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -283,9 +283,29 @@ extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed); #define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch)) #endif +#if defined (TARGET_READ_PC) +/* Legacy for systems yet to multi-arch TARGET_READ_PC */ +#if !defined (TARGET_READ_PC_P) +#define TARGET_READ_PC_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC_P) +#define TARGET_READ_PC_P() (0) +#endif + +extern int gdbarch_read_pc_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P) +#error "Non multi-arch definition of TARGET_READ_PC" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P) +#define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch)) +#endif + /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC) -#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid)) +#define TARGET_READ_PC(ptid) (internal_error (__FILE__, __LINE__, "TARGET_READ_PC"), 0) #endif typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid); |