diff options
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 f41a35d..2ed6b21 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1332,6 +1332,31 @@ extern void set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_push_ #endif #endif +#if defined (PUSH_RETURN_ADDRESS) +/* Legacy for systems yet to multi-arch PUSH_RETURN_ADDRESS */ +#if !defined (PUSH_RETURN_ADDRESS_P) +#define PUSH_RETURN_ADDRESS_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS_P) +#define PUSH_RETURN_ADDRESS_P() (0) +#endif + +extern int gdbarch_push_return_address_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PUSH_RETURN_ADDRESS_P) +#error "Non multi-arch definition of PUSH_RETURN_ADDRESS" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PUSH_RETURN_ADDRESS_P) +#define PUSH_RETURN_ADDRESS_P() (gdbarch_push_return_address_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (PUSH_RETURN_ADDRESS) +#define PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "PUSH_RETURN_ADDRESS"), 0) +#endif + typedef CORE_ADDR (gdbarch_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp); extern CORE_ADDR gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp); extern void set_gdbarch_push_return_address (struct gdbarch *gdbarch, gdbarch_push_return_address_ftype *push_return_address); |