mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-03 15:42:52 +00:00
* 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.
This commit is contained in:
parent
9e678452d7
commit
bdcd319a1e
@ -1,3 +1,12 @@
|
||||
2001-08-15 Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2001-08-14 Daniel Jacobowitz <drow@mvista.com>
|
||||
H.J. Lu (hjl@gnu.org)
|
||||
|
||||
|
@ -99,6 +99,12 @@ generic_return_value_on_stack_not (struct type *type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
generic_skip_trampoline_code (CORE_ADDR pc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *
|
||||
legacy_register_name (int i)
|
||||
{
|
||||
|
@ -127,4 +127,6 @@ int cannot_register_not (int regnum);
|
||||
|
||||
extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
|
||||
|
||||
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
|
||||
|
||||
#endif
|
||||
|
@ -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,
|
||||
@ -2199,6 +2209,13 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
"gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
|
||||
(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. */
|
||||
|
@ -1947,6 +1947,23 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Default (function) for non- multi-arch platforms. */
|
||||
#if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) (generic_skip_trampoline_code (pc))
|
||||
#endif
|
||||
|
||||
typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (CORE_ADDR pc);
|
||||
extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc);
|
||||
extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_skip_trampoline_code_ftype *skip_trampoline_code);
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
|
||||
#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
|
||||
#endif
|
||||
#if GDB_MULTI_ARCH
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
|
||||
|
||||
|
||||
|
@ -539,6 +539,7 @@ f:2:ADDR_BITS_REMOVE:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr:::core_addr_
|
||||
# FIXME/cagney/2001-01-18: The logic is backwards. It should be asking if the target can
|
||||
# single step. If not, then implement single step using breakpoints.
|
||||
F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
|
||||
f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -120,14 +120,6 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
|
||||
#endif
|
||||
|
||||
|
||||
/* Some machines have trampoline code that sits between function callers
|
||||
and the actual functions themselves. If this machine doesn't have
|
||||
such things, disable their processing. */
|
||||
|
||||
#ifndef SKIP_TRAMPOLINE_CODE
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) 0
|
||||
#endif
|
||||
|
||||
/* Dynamic function trampolines are similar to solib trampolines in that they
|
||||
are between the caller and the callee. The difference is that when you
|
||||
enter a dynamic trampoline, you can't determine the callee's address. Some
|
||||
|
Loading…
x
Reference in New Issue
Block a user