* gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
* symtab.c (find_function_start_sal, in_prologue): Likewise.
* linespec.c (minsym_found): Likewise.
* infrun.c (step_into_function): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
+2007-06-09 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (SKIP_PROLOGUE): Replace by gdbarch_skip_prologue.
+ * symtab.c (find_function_start_sal, in_prologue): Likewise.
+ * linespec.c (minsym_found): Likewise.
+ * infrun.c (step_into_function): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (NAME_OF_MALLOC): Replace by gdbarch_name_of_malloc.
fprintf_unfiltered (file,
"gdbarch_dump: skip_permanent_breakpoint = <0x%lx>\n",
(long) current_gdbarch->skip_permanent_breakpoint);
-#ifdef SKIP_PROLOGUE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SKIP_PROLOGUE(ip)",
- XSTRING (SKIP_PROLOGUE (ip)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: skip_prologue = <0x%lx>\n",
(long) current_gdbarch->skip_prologue);
typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype *skip_prologue);
-#if !defined (GDB_TM_FILE) && defined (SKIP_PROLOGUE)
-#error "Non multi-arch definition of SKIP_PROLOGUE"
-#endif
-#if !defined (SKIP_PROLOGUE)
-#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
-#endif
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
F:=:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:regcache
#
-f:=:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
+f::CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
f::int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
f:=:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
M::CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
s = find_pc_symtab (stop_pc);
if (s && s->language != language_asm)
- ecs->stop_func_start = SKIP_PROLOGUE (ecs->stop_func_start);
+ ecs->stop_func_start = gdbarch_skip_prologue
+ (current_gdbarch, ecs->stop_func_start);
ecs->sal = find_pc_line (ecs->stop_func_start, 0);
/* Use the step_resume_break to step until the end of the prologue,
if (funfirstline)
{
values.sals[0].pc += DEPRECATED_FUNCTION_START_OFFSET;
- values.sals[0].pc = SKIP_PROLOGUE (values.sals[0].pc);
+ values.sals[0].pc = gdbarch_skip_prologue
+ (current_gdbarch, values.sals[0].pc);
}
values.nelts = 1;
return values;
{ /* skip "first line" of function (which is actually its prologue) */
asection *section = SYMBOL_BFD_SECTION (sym);
/* If function is in an unmapped overlay, use its unmapped LMA
- address, so that SKIP_PROLOGUE has something unique to work on */
+ address, so that gdbarch_skip_prologue has something unique to work
+ on */
if (section_is_overlay (section) &&
!section_is_mapped (section))
pc = overlay_unmapped_address (pc, section);
pc += DEPRECATED_FUNCTION_START_OFFSET;
- pc = SKIP_PROLOGUE (pc);
+ pc = gdbarch_skip_prologue (current_gdbarch, pc);
/* For overlays, map pc back into its mapped VMA range */
pc = overlay_mapped_address (pc, section);
}
sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0);
- /* Check if SKIP_PROLOGUE left us in mid-line, and the next
+ /* Check if gdbarch_skip_prologue left us in mid-line, and the next
line is still part of the same function. */
if (sal.pc != pc
&& BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end
- The minimal symbols and partial symbols, which can usually tell
us the starting and ending addresses of a function.
- If we know the function's start address, we can call the
- architecture-defined SKIP_PROLOGUE function to analyze the
+ architecture-defined gdbarch_skip_prologue function to analyze the
instruction stream and guess where the prologue ends.
- Our `func_start' argument; if non-zero, this is the caller's
best guess as to the function's entry point. At the time of
if (! func_start)
return 1; /* We *might* be in a prologue. */
- prologue_end = SKIP_PROLOGUE (func_start);
+ prologue_end = gdbarch_skip_prologue (current_gdbarch, func_start);
return func_start <= pc && pc < prologue_end;
}
/* We don't have any good line number info, so use the minsym
information, together with the architecture-specific prologue
scanning code. */
- CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr);
+ CORE_ADDR prologue_end = gdbarch_skip_prologue
+ (current_gdbarch, func_addr);
return func_addr <= pc && pc < prologue_end;
}