* 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 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.
return 0;
}
+int
+generic_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ return 0;
+}
+
char *
legacy_register_name (int i)
{
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
+extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
+
#endif
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;
};
0,
0,
0,
+ 0,
/* startup_gdbarch() */
};
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;
/* 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 */
}
(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",
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. */
#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);
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
}
#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. */