diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-18 13:35:31 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-18 13:35:31 +0000 |
commit | 9df628e0aa21fe96d386e6a634d0af30d9b2efb7 (patch) | |
tree | 503736636ec7c2ab30389dada3d698497f8e14d0 /gdb/gdbarch.c | |
parent | 82bd7b59c94c3fbb5ee9186e7c08b350ea073375 (diff) | |
download | gdb-9df628e0aa21fe96d386e6a634d0af30d9b2efb7.zip gdb-9df628e0aa21fe96d386e6a634d0af30d9b2efb7.tar.gz gdb-9df628e0aa21fe96d386e6a634d0af30d9b2efb7.tar.bz2 |
* gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
* gdbarch.c gdbarch.h: Regenerate.
* breakpoint.c (create_longjmp_breakpoint): Always compile this
function.
(breakpoint_reset): Test GET_LONGJMP_TARGET_P().
* infrun.c (GET_LONGJMP_TARGET): Delete default definition.
(handle_inferior_event): Test GET_LONGJMP_TARGET_P().
* arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
* arm-tdep.c (arm_get_longjmp_target): New function.
(arm_gdbarch_init): Initialize jb_pc to -1. If ABI handler changes
this to a positive value register arm_get_longjmp_target as the
longjmp handler.
* arm-linux-tdep.c (arm_get_longjmp_target): Delete.
(arm_linux_init_abi): Set up longjmp description in tdep.
* armnbsd-nat.c (get_longjmp_target): Delete.
* armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
description in tdep.
* config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
(get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
* config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
(GET_LONGJMP_TARGET): Delete.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index f4000b5..8467d41 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -182,6 +182,7 @@ struct gdbarch gdbarch_register_bytes_ok_ftype *register_bytes_ok; gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; gdbarch_cannot_store_register_ftype *cannot_store_register; + gdbarch_get_longjmp_target_ftype *get_longjmp_target; int use_generic_dummy_frames; int call_dummy_location; gdbarch_call_dummy_address_ftype *call_dummy_address; @@ -346,6 +347,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, generic_get_saved_register, 0, 0, @@ -638,6 +640,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of register_bytes_ok, has predicate */ /* Skip verify of cannot_fetch_register, invalid_p == 0 */ /* Skip verify of cannot_store_register, invalid_p == 0 */ + /* Skip verify of get_longjmp_target, has predicate */ if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && (gdbarch->use_generic_dummy_frames == -1)) fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames"); @@ -1282,6 +1285,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", (long) FUNCTION_START_OFFSET); #endif +#ifdef GET_LONGJMP_TARGET + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "GET_LONGJMP_TARGET(pc)", + XSTRING (GET_LONGJMP_TARGET (pc))); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n", + (long) current_gdbarch->get_longjmp_target + /*GET_LONGJMP_TARGET ()*/); +#endif #ifdef GET_SAVED_REGISTER #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -3030,6 +3044,30 @@ set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, } int +gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) +{ + return gdbarch->get_longjmp_target != 0; +} + +int +gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc) +{ + if (gdbarch->get_longjmp_target == 0) + internal_error (__FILE__, __LINE__, + "gdbarch: gdbarch_get_longjmp_target invalid"); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); + return gdbarch->get_longjmp_target (pc); +} + +void +set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, + gdbarch_get_longjmp_target_ftype get_longjmp_target) +{ + gdbarch->get_longjmp_target = get_longjmp_target; +} + +int gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch) { if (gdbarch->use_generic_dummy_frames == -1) |