+2007-06-09 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (SKIP_TRAMPOLINE_CODE): Replace by
+ gdbarch_skip_trampoline_code.
+ * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise (comment).
+ * objc-lang.c (objc_skip_trampoline)
+ (objc_submethod_helper_data): Likewise.
+ * m32c-lang.c (m32c_skip_trampoline_code): Likewise (comment).
+ * infrun.c (handle_inferior_event): Likewise.
+ * gnu-v3-abi.c (gnuv3_skip_trampoline): Likewise.
+ * gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Replace by
+ gdbarch_in_solib_return_trampoline.
+ * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise (comment).
+ * infrun.c (handle_inferior_event): Likewise.
+ * hppa-tdep.c (hppa_stub_unwind_sniffer): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
fprintf_unfiltered (file,
"gdbarch_dump: in_function_epilogue_p = <0x%lx>\n",
(long) current_gdbarch->in_function_epilogue_p);
-#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)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
(long) current_gdbarch->in_solib_return_trampoline);
fprintf_unfiltered (file,
"gdbarch_dump: skip_solib_resolver = <0x%lx>\n",
(long) current_gdbarch->skip_solib_resolver);
-#ifdef SKIP_TRAMPOLINE_CODE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SKIP_TRAMPOLINE_CODE(pc)",
- XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: skip_trampoline_code = <0x%lx>\n",
(long) current_gdbarch->skip_trampoline_code);
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 !defined (GDB_TM_FILE) && defined (SKIP_TRAMPOLINE_CODE)
-#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
-#endif
-#if !defined (SKIP_TRAMPOLINE_CODE)
-#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
-#endif
/* If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
evaluates non-zero, this is the address where the debugger will place
typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
-#if !defined (GDB_TM_FILE) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
-#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
-#endif
-#if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
-#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
-#endif
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
# FIXME: cagney/2003-08-28: Need to find a better way of selecting the
# disassembler. Perhaps objdump can handle it?
f:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info::0:
-f:=:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc::generic_skip_trampoline_code::0
+f::CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc::generic_skip_trampoline_code::0
# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER
# a step-resume breakpoint to get us past the dynamic linker.
m::CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc::generic_skip_solib_resolver::0
# Some systems also have trampoline code for returning from shared libs.
-f:=:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name::generic_in_solib_return_trampoline::0
+f::int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name::generic_in_solib_return_trampoline::0
# A target might have problems with watchpoints as soon as the stack
# frame of the current function has been destroyed. This mostly happens
struct obj_section *section;
char *thunk_name, *fn_name;
- real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code (current_gdbarch, stop_pc);
if (real_stop_pc == 0)
real_stop_pc = stop_pc;
return 0;
method_stop_pc = SYMBOL_VALUE_ADDRESS (fn_sym);
- real_stop_pc = SKIP_TRAMPOLINE_CODE (method_stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code
+ (current_gdbarch, method_stop_pc);
if (real_stop_pc == 0)
real_stop_pc = method_stop_pc;
if (pc == 0
|| (tdep->in_solib_call_trampoline != NULL
&& tdep->in_solib_call_trampoline (pc, NULL))
- || IN_SOLIB_RETURN_TRAMPOLINE (pc, NULL))
+ || gdbarch_in_solib_return_trampoline (current_gdbarch, pc, NULL))
return &hppa_stub_frame_unwind;
return NULL;
}
end of, if we do step into it. */
real_stop_pc = skip_language_trampoline (stop_pc);
if (real_stop_pc == 0)
- real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code (current_gdbarch, stop_pc);
if (real_stop_pc != 0)
ecs->stop_func_start = real_stop_pc;
/* If we're in the return path from a shared library trampoline,
we want to proceed through the trampoline when stepping. */
- if (IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
+ if (gdbarch_in_solib_return_trampoline (current_gdbarch,
+ stop_pc, ecs->stop_func_name))
{
/* Determine where this trampoline returns. */
- CORE_ADDR real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ CORE_ADDR real_stop_pc = gdbarch_skip_trampoline_code
+ (current_gdbarch, stop_pc);
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into solib return tramp\n");
their program is calling, not in some trampoline code they've never
seen before.)
- The SKIP_TRAMPOLINE_CODE gdbarch method tells GDB how to step
+ The gdbarch_skip_trampoline_code method tells GDB how to step
through such trampoline functions transparently to the user. When
given the address of a trampoline function's first instruction,
- SKIP_TRAMPOLINE_CODE should return the address of the first
+ gdbarch_skip_trampoline_code should return the address of the first
instruction of the function really being called. If GDB decides it
wants to step into that function, it will set a breakpoint there
and silently continue to it.
CORE_ADDR real_stop_pc;
CORE_ADDR method_stop_pc;
- real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code (current_gdbarch, stop_pc);
if (real_stop_pc != 0)
find_objc_msgcall (real_stop_pc, &method_stop_pc);
if (method_stop_pc)
{
- real_stop_pc = SKIP_TRAMPOLINE_CODE (method_stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code
+ (current_gdbarch, method_stop_pc);
if (real_stop_pc == 0)
real_stop_pc = method_stop_pc;
}
* The old function "pc_off_limits" used to do a lot of other things
* in addition, such as detecting shared library jump stubs and
* returning the address of the shlib function that would be called.
- * That functionality has been moved into the SKIP_TRAMPOLINE_CODE and
+ * That functionality has been moved into the gdbarch_skip_trampoline_code and
* IN_SOLIB_TRAMPOLINE macros, which are resolved in the target-
* dependent modules.
*/
branches, meaning that the link register doesn't get set.
Therefore, GDB's usual step_over_function () mechanism won't work.
- Instead, use the IN_SOLIB_RETURN_TRAMPOLINE and
- SKIP_TRAMPOLINE_CODE hooks in handle_inferior_event() to skip past
+ Instead, use the gdbarch_skip_trampoline_code and
+ gdbarch_skip_trampoline_code hooks in handle_inferior_event() to skip past
@FIX code. */
int