diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-13 21:10:30 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-13 21:10:30 +0000 |
commit | 8f87102502242e23f901af040c8eb904de162f87 (patch) | |
tree | 5e2f7ee452611b31cf43b0732fc1e03619f319fd /gdb/gdbarch.h | |
parent | 3f565f1eb5001c29a32b383d8b7fe05f73557db8 (diff) | |
download | gdb-8f87102502242e23f901af040c8eb904de162f87.zip gdb-8f87102502242e23f901af040c8eb904de162f87.tar.gz gdb-8f87102502242e23f901af040c8eb904de162f87.tar.bz2 |
2003-01-13 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (FRAME_INIT_SAVED_REGS): Change to function with
predicate.
* gdbarch.h, gdbarch.c: Regenerate.
* stack.c (frame_info): Only initialize the saved registers when
FRAME_INIT_SAVED_REGS_P.
* frame.c (frame_saved_regs_register_unwind): Assert
FRAME_INIT_SAVED_REGS_P.
(deprecated_generic_get_saved_register): Ditto.
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 bc5d9ca..336f6ca 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1750,6 +1750,31 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_ #endif #endif +#if defined (FRAME_INIT_SAVED_REGS) +/* Legacy for systems yet to multi-arch FRAME_INIT_SAVED_REGS */ +#if !defined (FRAME_INIT_SAVED_REGS_P) +#define FRAME_INIT_SAVED_REGS_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS_P) +#define FRAME_INIT_SAVED_REGS_P() (0) +#endif + +extern int gdbarch_frame_init_saved_regs_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_INIT_SAVED_REGS_P) +#error "Non multi-arch definition of FRAME_INIT_SAVED_REGS" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_INIT_SAVED_REGS_P) +#define FRAME_INIT_SAVED_REGS_P() (gdbarch_frame_init_saved_regs_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (FRAME_INIT_SAVED_REGS) +#define FRAME_INIT_SAVED_REGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_INIT_SAVED_REGS"), 0) +#endif + typedef void (gdbarch_frame_init_saved_regs_ftype) (struct frame_info *frame); extern void gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame); extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs); |