+2007-06-18 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (DEPRECATED_FUNCTION_START_OFFSET): Replace by
+ gdbarch_deprecated_function_start_offset.
+ * symtab.c (find_function_start_sal)skip_prologue_using_sal): Likewise.
+ * linespec.c (minsym_found): Likewise.
+ * infrun.c (handle_inferior_event): Likewise.
+ * infcall.c (find_function_addr): Likewise.
+ * cli/cli-cmds.c (disassemble_command): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
2007-06-18 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Replace by
/* FIXME: cagney/2004-02-07: This should be an observer. */
low = tui_get_low_disassembly_address (low, pc);
#endif
- low += DEPRECATED_FUNCTION_START_OFFSET;
+ low += gdbarch_deprecated_function_start_offset (current_gdbarch);
}
else if (!(space_index = (char *) strchr (arg, ' ')))
{
/* FIXME: cagney/2004-02-07: This should be an observer. */
low = tui_get_low_disassembly_address (low, pc);
#endif
- low += DEPRECATED_FUNCTION_START_OFFSET;
+ low += gdbarch_deprecated_function_start_offset (current_gdbarch);
}
else
{
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_fp_regnum = %s\n",
paddr_d (current_gdbarch->deprecated_fp_regnum));
-#ifdef DEPRECATED_FUNCTION_START_OFFSET
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
- XSTRING (DEPRECATED_FUNCTION_START_OFFSET));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
paddr_nz (current_gdbarch->deprecated_function_start_offset));
/* A function can be addressed by either it's "pointer" (possibly a
descriptor address) or "entry point" (first executable instruction).
The method "convert_from_func_ptr_addr" converting the former to the
- latter. DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+ latter. gdbarch_deprecated_function_start_offset is being used to implement
a simplified subset of that functionality - the function's address
corresponds to the "function pointer" and the function's start
corresponds to the "function entry point" - and hence is redundant. */
extern CORE_ADDR gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_function_start_offset);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_FUNCTION_START_OFFSET)
-#error "Non multi-arch definition of DEPRECATED_FUNCTION_START_OFFSET"
-#endif
-#if !defined (DEPRECATED_FUNCTION_START_OFFSET)
-#define DEPRECATED_FUNCTION_START_OFFSET (gdbarch_deprecated_function_start_offset (current_gdbarch))
-#endif
/* Return the remote protocol register number associated with this
register. Normally the identity mapping. */
# A function can be addressed by either it's "pointer" (possibly a
# descriptor address) or "entry point" (first executable instruction).
# The method "convert_from_func_ptr_addr" converting the former to the
-# latter. DEPRECATED_FUNCTION_START_OFFSET is being used to implement
+# latter. gdbarch_deprecated_function_start_offset is being used to implement
# a simplified subset of that functionality - the function's address
# corresponds to the "function pointer" and the function's start
# corresponds to the "function entry point" - and hence is redundant.
-v:=:CORE_ADDR:deprecated_function_start_offset:::0:::0
+v::CORE_ADDR:deprecated_function_start_offset:::0:::0
# Return the remote protocol register number associated with this
# register. Normally the identity mapping.
if (retval_type != NULL)
*retval_type = value_type;
- return funaddr + DEPRECATED_FUNCTION_START_OFFSET;
+ return funaddr + gdbarch_deprecated_function_start_offset (current_gdbarch);
}
/* Call breakpoint_auto_delete on the current contents of the bpstat
will both be 0 if it doesn't work. */
find_pc_partial_function (stop_pc, &ecs->stop_func_name,
&ecs->stop_func_start, &ecs->stop_func_end);
- ecs->stop_func_start += DEPRECATED_FUNCTION_START_OFFSET;
+ ecs->stop_func_start
+ += gdbarch_deprecated_function_start_offset (current_gdbarch);
ecs->another_trap = 0;
bpstat_clear (&stop_bpstat);
stop_step = 0;
values.sals[0].section = SYMBOL_BFD_SECTION (msymbol);
if (funfirstline)
{
- values.sals[0].pc += DEPRECATED_FUNCTION_START_OFFSET;
+ values.sals[0].pc
+ += gdbarch_deprecated_function_start_offset (current_gdbarch);
values.sals[0].pc = gdbarch_skip_prologue
(current_gdbarch, values.sals[0].pc);
}
!section_is_mapped (section))
pc = overlay_unmapped_address (pc, section);
- pc += DEPRECATED_FUNCTION_START_OFFSET;
+ pc += gdbarch_deprecated_function_start_offset (current_gdbarch);
pc = gdbarch_skip_prologue (current_gdbarch, pc);
/* For overlays, map pc back into its mapped VMA range */
/* Get an initial range for the function. */
find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
- start_pc += DEPRECATED_FUNCTION_START_OFFSET;
+ start_pc += gdbarch_deprecated_function_start_offset (current_gdbarch);
prologue_sal = find_pc_line (start_pc, 0);
if (prologue_sal.line != 0)