aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-08-20 23:01:29 +0000
committerMichael Snyder <msnyder@vmware.com>2002-08-20 23:01:29 +0000
commitd50355b63cf93537c82e0eeb1b680acf493e7e73 (patch)
tree2bf33b9d27f2900934d0c0b03b37e9ed64a82906 /gdb/gdbarch.c
parent757a7cc676c8decbdc2fd9f6b9d5289bf3fe54da (diff)
downloadgdb-d50355b63cf93537c82e0eeb1b680acf493e7e73.zip
gdb-d50355b63cf93537c82e0eeb1b680acf493e7e73.tar.gz
gdb-d50355b63cf93537c82e0eeb1b680acf493e7e73.tar.bz2
2002-08-20 Michael Snyder <msnyder@redhat.com>
* gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Add. * gdbarch.c, gdbarch.h: Regenerate. * arch-utils.c, arch-utils.h (generic_in_solib_return_trampoline): Add. * infrun.c (IN_SOLIB_RETURN_TRAMPOLINE): Delete default definition.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index c8e3c17..3c2df6d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -256,6 +256,7 @@ struct gdbarch
gdbarch_print_insn_ftype *print_insn;
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
+ gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
@@ -408,6 +409,7 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
+ 0,
generic_in_function_epilogue_p,
construct_inferior_arguments,
0,
@@ -536,6 +538,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
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;
+ current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
@@ -780,6 +783,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* 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 */
+ /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
/* Skip verify of pc_in_sigtramp, invalid_p == 0 */
/* Skip verify of in_function_epilogue_p, invalid_p == 0 */
/* Skip verify of construct_inferior_arguments, invalid_p == 0 */
@@ -1411,6 +1415,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->in_solib_call_trampoline
/*IN_SOLIB_CALL_TRAMPOLINE ()*/);
#endif
+#ifdef IN_SOLIB_RETURN_TRAMPOLINE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
+ XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
+ (long) current_gdbarch->in_solib_return_trampoline
+ /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
+#endif
#ifdef MAX_REGISTER_RAW_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
@@ -4664,6 +4679,25 @@ set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
}
int
+gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->in_solib_return_trampoline == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_in_solib_return_trampoline invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
+ return gdbarch->in_solib_return_trampoline (pc, name);
+}
+
+void
+set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
+ gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
+{
+ gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
+}
+
+int
gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
gdb_assert (gdbarch != NULL);