diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-19 23:27:28 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-19 23:27:28 +0000 |
commit | dedc2a2b6559e402f90c322d37953d1875381b76 (patch) | |
tree | 743b5859a05fcbeeb90398d2951c84b71a67c692 /gdb/gdbarch.h | |
parent | b7261c70f17360b2abbadbc0bbed3caabd1b23f6 (diff) | |
download | gdb-dedc2a2b6559e402f90c322d37953d1875381b76.zip gdb-dedc2a2b6559e402f90c322d37953d1875381b76.tar.gz gdb-dedc2a2b6559e402f90c322d37953d1875381b76.tar.bz2 |
2003-01-19 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_saved_regs_pop): Assert POP_FRAME_P.
* gdbarch.sh (POP_FRAME): Change to function with predicate.
Suppress actual parameters when `-'.
* gdbarch.h, gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 336f6ca..303477c 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1577,6 +1577,32 @@ extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_pu #endif #endif +#if defined (POP_FRAME) +/* Legacy for systems yet to multi-arch POP_FRAME */ +#if !defined (POP_FRAME_P) +#define POP_FRAME_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME_P) +#define POP_FRAME_P() (0) +#endif + +extern int gdbarch_pop_frame_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POP_FRAME_P) +#error "Non multi-arch definition of POP_FRAME" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POP_FRAME_P) +#define POP_FRAME_P() (gdbarch_pop_frame_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (POP_FRAME) +#define POP_FRAME (internal_error (__FILE__, __LINE__, "POP_FRAME"), 0) +#define POP_FRAME (gdbarch_pop_frame (current_gdbarch)) +#endif + typedef void (gdbarch_pop_frame_ftype) (void); extern void gdbarch_pop_frame (struct gdbarch *gdbarch); extern void set_gdbarch_pop_frame (struct gdbarch *gdbarch, gdbarch_pop_frame_ftype *pop_frame); |