mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 06:20:30 +00:00
* arch-utils.c (generic_in_solib_call_trampoline): New function.
* arch-utils.h (generic_in_solib_call_trampoline): Extern declaration. * gdbarch.c: Regenerated from gdbarch.sh. * gdbarch.h: Ditto. * gdbarch.sh (function_list): Add `IN_SOLIB_CALL_TRAMPOLINE' definition. * infrun.c (IN_SOLIB_CALL_TRAMPOLINE): Remove macro.
This commit is contained in:
parent
0a299a95a8
commit
68e9cc944c
@ -1,3 +1,12 @@
|
||||
2001-10-31 Corinna Vinschen <vinschen@redhat.com>
|
||||
|
||||
* arch-utils.c (generic_in_solib_call_trampoline): New function.
|
||||
* arch-utils.h (generic_in_solib_call_trampoline): Extern declaration.
|
||||
* gdbarch.c: Regenerated from gdbarch.sh.
|
||||
* gdbarch.h: Ditto.
|
||||
* gdbarch.sh (function_list): Add `IN_SOLIB_CALL_TRAMPOLINE' definition.
|
||||
* infrun.c (IN_SOLIB_CALL_TRAMPOLINE): Remove macro.
|
||||
|
||||
2001-10-31 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
From DJ Barrow.
|
||||
|
@ -105,6 +105,12 @@ generic_skip_trampoline_code (CORE_ADDR pc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
generic_in_solib_call_trampoline (CORE_ADDR pc, char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *
|
||||
legacy_register_name (int i)
|
||||
{
|
||||
|
@ -132,4 +132,6 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
|
||||
|
||||
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
|
||||
|
||||
extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
|
||||
|
||||
#endif
|
||||
|
@ -253,6 +253,7 @@ struct gdbarch
|
||||
gdbarch_software_single_step_ftype *software_single_step;
|
||||
gdbarch_print_insn_ftype *print_insn;
|
||||
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
|
||||
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
|
||||
};
|
||||
|
||||
|
||||
@ -390,6 +391,7 @@ struct gdbarch startup_gdbarch =
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* startup_gdbarch() */
|
||||
};
|
||||
|
||||
@ -497,6 +499,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
||||
current_gdbarch->addr_bits_remove = core_addr_identity;
|
||||
current_gdbarch->print_insn = legacy_print_insn;
|
||||
current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
|
||||
current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
|
||||
/* gdbarch_alloc() */
|
||||
|
||||
return current_gdbarch;
|
||||
@ -795,6 +798,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||
/* Skip verify of software_single_step, has predicate */
|
||||
/* Skip verify of print_insn, invalid_p == 0 */
|
||||
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
|
||||
/* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
|
||||
}
|
||||
|
||||
|
||||
@ -1327,6 +1331,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
(long) current_gdbarch->integer_to_address
|
||||
/*INTEGER_TO_ADDRESS ()*/);
|
||||
#endif
|
||||
#ifdef IN_SOLIB_CALL_TRAMPOLINE
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: %s # %s\n",
|
||||
"IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
|
||||
XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
|
||||
if (GDB_MULTI_ARCH)
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
|
||||
(long) current_gdbarch->in_solib_call_trampoline
|
||||
/*IN_SOLIB_CALL_TRAMPOLINE ()*/);
|
||||
#endif
|
||||
#ifdef MAX_REGISTER_RAW_SIZE
|
||||
fprintf_unfiltered (file,
|
||||
"gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
|
||||
@ -4240,6 +4255,24 @@ set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
|
||||
gdbarch->skip_trampoline_code = skip_trampoline_code;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
|
||||
{
|
||||
if (gdbarch->in_solib_call_trampoline == 0)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"gdbarch: gdbarch_in_solib_call_trampoline invalid");
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
|
||||
return gdbarch->in_solib_call_trampoline (pc, name);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
|
||||
gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
|
||||
{
|
||||
gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
|
||||
}
|
||||
|
||||
|
||||
/* Keep a registry of per-architecture data-pointers required by GDB
|
||||
modules. */
|
||||
|
@ -2023,6 +2023,27 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* For SVR4 shared libraries, each call goes through a small piece of
|
||||
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
|
||||
to nonzero if we are current stopped in one of these. */
|
||||
|
||||
/* Default (function) for non- multi-arch platforms. */
|
||||
#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (generic_in_solib_call_trampoline (pc, name))
|
||||
#endif
|
||||
|
||||
typedef int (gdbarch_in_solib_call_trampoline_ftype) (CORE_ADDR pc, char *name);
|
||||
extern int gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
|
||||
extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline);
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
|
||||
#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
|
||||
#endif
|
||||
#if GDB_MULTI_ARCH
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
|
||||
|
||||
|
||||
|
@ -542,6 +542,10 @@ f:2:ADDR_BITS_REMOVE:CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr:::core_addr_
|
||||
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:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
|
||||
f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
|
||||
# For SVR4 shared libraries, each call goes through a small piece of
|
||||
# trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
|
||||
# to nonzero if we are current stopped in one of these.
|
||||
f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -183,14 +183,6 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
|
||||
#define SKIP_SOLIB_RESOLVER(pc) 0
|
||||
#endif
|
||||
|
||||
/* For SVR4 shared libraries, each call goes through a small piece of
|
||||
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
|
||||
to nonzero if we are current stopped in one of these. */
|
||||
|
||||
#ifndef IN_SOLIB_CALL_TRAMPOLINE
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc,name) 0
|
||||
#endif
|
||||
|
||||
/* In some shared library schemes, the return path from a shared library
|
||||
call may need to go through a trampoline too. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user