diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-08-15 15:29:56 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-08-15 15:29:56 +0000 |
commit | bdcd319a1e4591cc67562d960ab225e9847e9a25 (patch) | |
tree | c91d6ac46f4d0d3ff83b77ad93595fd417a6e8ae /gdb/gdbarch.c | |
parent | 9e678452d756bcdb0a1a78a4e438aca09460acfa (diff) | |
download | gdb-bdcd319a1e4591cc67562d960ab225e9847e9a25.zip gdb-bdcd319a1e4591cc67562d960ab225e9847e9a25.tar.gz gdb-bdcd319a1e4591cc67562d960ab225e9847e9a25.tar.bz2 |
* arch-utils.c (generic_skip_trampoline_code): New function.
* arch-utils.h (generic_skip_trampoline_code): Declare external.
* gdbarch.c: Regeberated from gdbarch.sh.
* gdbarch.h: Ditto.
* gdbarch.sh (SKIP_TRAMPOLINE_CODE): Multi-arch.
* infrun.c: Remove default setting of SKIP_TRAMPOLINE_CODE macro.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 21645d9..ced8354 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -249,6 +249,7 @@ struct gdbarch gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; gdbarch_addr_bits_remove_ftype *addr_bits_remove; gdbarch_software_single_step_ftype *software_single_step; + gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; }; @@ -383,6 +384,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, /* startup_gdbarch() */ }; @@ -482,6 +484,7 @@ gdbarch_alloc (const struct gdbarch_info *info, gdbarch->extra_stack_alignment_needed = 1; gdbarch->convert_from_func_ptr_addr = core_addr_identity; gdbarch->addr_bits_remove = core_addr_identity; + gdbarch->skip_trampoline_code = generic_skip_trampoline_code; /* gdbarch_alloc() */ return gdbarch; @@ -777,6 +780,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ /* Skip verify of addr_bits_remove, invalid_p == 0 */ /* Skip verify of software_single_step, has predicate */ + /* Skip verify of skip_trampoline_code, invalid_p == 0 */ } @@ -1468,6 +1472,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); #endif +#ifdef SKIP_TRAMPOLINE_CODE + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "SKIP_TRAMPOLINE_CODE(pc)", + XSTRING (SKIP_TRAMPOLINE_CODE (pc))); +#endif #ifdef TARGET_ARCHITECTURE if (TARGET_ARCHITECTURE != NULL) fprintf_unfiltered (file, @@ -2200,6 +2210,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->software_single_step /*SOFTWARE_SINGLE_STEP ()*/); #endif +#ifdef SKIP_TRAMPOLINE_CODE + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n", + (long) current_gdbarch->skip_trampoline_code + /*SKIP_TRAMPOLINE_CODE ()*/); +#endif if (current_gdbarch->dump_tdep != NULL) current_gdbarch->dump_tdep (current_gdbarch, file); } @@ -4313,6 +4330,24 @@ set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch->software_single_step = software_single_step; } +CORE_ADDR +gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) +{ + if (gdbarch->skip_trampoline_code == 0) + internal_error (__FILE__, __LINE__, + "gdbarch: gdbarch_skip_trampoline_code invalid"); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); + return gdbarch->skip_trampoline_code (pc); +} + +void +set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, + gdbarch_skip_trampoline_code_ftype skip_trampoline_code) +{ + gdbarch->skip_trampoline_code = skip_trampoline_code; +} + /* Keep a registry of per-architecture data-pointers required by GDB modules. */ |