aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-18 18:23:08 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-18 18:23:08 +0000
commitcbf3b44a9fd8240ea5f6daef05f7d43020f9fcc0 (patch)
tree8ac31c37150a776884b8db6d999ee40010f8641d /gdb
parentbceb6e50519a169c044c1d2fef5b3a9f5cda2a06 (diff)
downloadgdb-cbf3b44a9fd8240ea5f6daef05f7d43020f9fcc0.zip
gdb-cbf3b44a9fd8240ea5f6daef05f7d43020f9fcc0.tar.gz
gdb-cbf3b44a9fd8240ea5f6daef05f7d43020f9fcc0.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog11
-rw-r--r--gdb/cli/cli-cmds.c4
-rw-r--r--gdb/gdbarch.c5
-rw-r--r--gdb/gdbarch.h8
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/infcall.c2
-rw-r--r--gdb/infrun.c3
-rw-r--r--gdb/linespec.c3
-rw-r--r--gdb/symtab.c4
9 files changed, 23 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0f687f7..08a19e7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
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
gdbarch_deprecated_reg_struct_has_addr.
* infcall.c (call_function_by_hand): Likewise.
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 611f126..df83e8c 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -925,7 +925,7 @@ disassemble_command (char *arg, int from_tty)
/* 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, ' ')))
{
@@ -940,7 +940,7 @@ disassemble_command (char *arg, int from_tty)
/* 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
{
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 4f92ffc..60acc18 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -730,11 +730,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
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));
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index de37e84..c9a5d8a 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -459,19 +459,13 @@ extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR
/* 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. */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index c81e9bc..584c0a4 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -528,12 +528,12 @@ v::CORE_ADDR:decr_pc_after_break:::0:::0
# 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.
diff --git a/gdb/infcall.c b/gdb/infcall.c
index f7f75f4..5375969 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -232,7 +232,7 @@ find_function_addr (struct value *function, struct type **retval_type)
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
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 1557dc7..bad50a1 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1807,7 +1807,8 @@ handle_inferior_event (struct execution_control_state *ecs)
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;
diff --git a/gdb/linespec.c b/gdb/linespec.c
index dc003e5..9043ca6 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1833,7 +1833,8 @@ minsym_found (int funfirstline, struct minimal_symbol *msymbol)
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);
}
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 83ff938..6a9ef41 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2527,7 +2527,7 @@ find_function_start_sal (struct symbol *sym, int funfirstline)
!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 */
@@ -4101,7 +4101,7 @@ skip_prologue_using_sal (CORE_ADDR func_addr)
/* 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)