diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-11-05 23:11:31 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-11-05 23:11:31 +0000 |
commit | 5fdff4261c7ed2a7c14c2e72cb6981e853af2803 (patch) | |
tree | edddf127a9f330bf999f65b5d19c66c87f399cab /gdb/gdbarch.h | |
parent | 0a2a5e0f3c3ac5b6f635e33a4a804d5c1083f33b (diff) | |
download | gdb-5fdff4261c7ed2a7c14c2e72cb6981e853af2803.zip gdb-5fdff4261c7ed2a7c14c2e72cb6981e853af2803.tar.gz gdb-5fdff4261c7ed2a7c14c2e72cb6981e853af2803.tar.bz2 |
Change INIT_EXTRA_FRAME_INFO() to a function with predicate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 31746fc..1990969 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1441,6 +1441,31 @@ extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_ #endif #endif +#if defined (INIT_EXTRA_FRAME_INFO) +/* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */ +#if !defined (INIT_EXTRA_FRAME_INFO_P) +#define INIT_EXTRA_FRAME_INFO_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P) +#define INIT_EXTRA_FRAME_INFO_P() (0) +#endif + +extern int gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P) +#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P) +#define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO) +#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0) +#endif + typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame); extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame); extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info); |