aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog26
-rw-r--r--gdb/arch-utils.c9
-rw-r--r--gdb/arch-utils.h2
-rw-r--r--gdb/gdbarch.c5
-rw-r--r--gdb/gdbarch.h8
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/remote-mips.c14
-rw-r--r--gdb/std-regs.c7
8 files changed, 49 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b9481dd..7852e61 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,31 @@
2007-06-18 Markus Deuling <deuling@de.ibm.com>
+ * gdbarch.sh (DEPRECATED_FP_REGNUM): Replace by
+ gdbarch_deprecated_fp_regnum.
+ * std-regs.c (value_of_builtin_frame_fp_reg): Likewise.
+ * remote-mips.c (mips_wait, mips_fetch_registers): Likewise.
+ * arch-utils.c (legacy_virtual_frame_pointer): Likewise.
+ * arch-utils.h (gdbarch_virtual_frame_pointer_ftype): Likewise
+ (comment).
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+2007-06-18 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (EXTRACT_RETURN_VALUE): Replace with
+ gdbarch_extract_return_value.
+ * value.c (generic_use_struct_convention): Likewise (comment).
+ * ia64-tdep.c (ia64_use_struct_convention): Likewise (comment).
+ * arch-utils.c (legacy_return_value): Likewise.
+ * arch-utils.h (legacy_return_value): Likewise (comment).
+ * gdbarch.sh (STORE_RETURN_VALUE): Replace by
+ gdbarch_store_return_value.
+ * stack.c (return_command): Likewise (comment).
+ * arch-utils.h (legacy_return_value): Likewise (comment).
+ * arch-utils.c (legacy_return_value): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+2007-06-18 Markus Deuling <deuling@de.ibm.com>
+
* gdbarch.sh (DEPRECATED_USE_STRUCT_CONVENTION): Replace by
gdbarch_deprecated_use_struct_convention.
* arch-utils.c (legacy_return_value): Likewise.
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 73e4520..9937008 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -175,7 +175,7 @@ cannot_register_not (int regnum)
}
/* Legacy version of target_virtual_frame_pointer(). Assumes that
- there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or
+ there is an gdbarch_deprecated_fp_regnum and that it is the same, cooked or
raw. */
void
@@ -188,9 +188,10 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
register and an offset can determine this. I think it should
instead generate a byte code expression as that would work better
with things like Dwarf2's CFI. */
- if (DEPRECATED_FP_REGNUM >= 0
- && DEPRECATED_FP_REGNUM < gdbarch_num_regs (current_gdbarch))
- *frame_regnum = DEPRECATED_FP_REGNUM;
+ if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0
+ && gdbarch_deprecated_fp_regnum (current_gdbarch)
+ < gdbarch_num_regs (current_gdbarch))
+ *frame_regnum = gdbarch_deprecated_fp_regnum (current_gdbarch);
else if (gdbarch_sp_regnum (current_gdbarch) >= 0
&& gdbarch_sp_regnum (current_gdbarch)
< gdbarch_num_regs (current_gdbarch))
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index d49fe13..45b1b33 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -72,7 +72,7 @@ void default_coff_make_msymbol_special (int val, struct minimal_symbol *msym);
int cannot_register_not (int regnum);
/* Legacy version of target_virtual_frame_pointer(). Assumes that
- there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or
+ there is an gdbarch_deprecated_fp_regnum and that it is the same, cooked or
raw. */
extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 543c8d0..26421a4 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -722,11 +722,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: decr_pc_after_break = 0x%s\n",
paddr_nz (current_gdbarch->decr_pc_after_break));
-#ifdef DEPRECATED_FP_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n",
- XSTRING (DEPRECATED_FP_REGNUM));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_fp_regnum = %s\n",
paddr_d (current_gdbarch->deprecated_fp_regnum));
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index c7d8586..59a7bda 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -257,16 +257,10 @@ extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct
extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
- DEPRECATED_FP_REGNUM. */
+ deprecated_fp_regnum. */
extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_FP_REGNUM)
-#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
-#endif
-#if !defined (DEPRECATED_FP_REGNUM)
-#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
-#endif
/* See gdbint.texinfo. See infcall.c. */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 697b84c..00326e6 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -462,8 +462,8 @@ M::struct type *:register_type:int reg_nr:reg_nr
# See gdbint.texinfo, and PUSH_DUMMY_CALL.
M::struct frame_id:unwind_dummy_id:struct frame_info *info:info
# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
-# DEPRECATED_FP_REGNUM.
-v:=:int:deprecated_fp_regnum:::-1:-1::0
+# deprecated_fp_regnum.
+v::int:deprecated_fp_regnum:::-1:-1::0
# See gdbint.texinfo. See infcall.c.
M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index d63bbcb..4773704 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1773,8 +1773,13 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
gdbarch_sp_regnum (current_gdbarch)), rsp);
regcache_raw_supply (regcache, gdbarch_sp_regnum (current_gdbarch), buf);
- store_unsigned_integer (buf, register_size (current_gdbarch, DEPRECATED_FP_REGNUM), 0);
- regcache_raw_supply (regcache, DEPRECATED_FP_REGNUM, buf);
+ store_unsigned_integer (buf,
+ register_size (current_gdbarch,
+ gdbarch_deprecated_fp_regnum
+ (current_gdbarch)),
+ 0);
+ regcache_raw_supply (regcache,
+ gdbarch_deprecated_fp_regnum (current_gdbarch), buf);
if (nfields == 9)
{
@@ -1911,8 +1916,9 @@ mips_fetch_registers (struct regcache *regcache, int regno)
return;
}
- if (regno == DEPRECATED_FP_REGNUM || regno == MIPS_ZERO_REGNUM)
- /* DEPRECATED_FP_REGNUM on the mips is a hack which is just
+ if (regno == gdbarch_deprecated_fp_regnum (current_gdbarch)
+ || regno == MIPS_ZERO_REGNUM)
+ /* gdbarch_deprecated_fp_regnum on the mips is a hack which is just
supposed to read zero (see also mips-nat.c). */
val = 0;
else
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index 16f0b8a..22f743d 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -32,14 +32,15 @@
static struct value *
value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton)
{
- if (DEPRECATED_FP_REGNUM >= 0)
+ if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0)
/* NOTE: cagney/2003-04-24: Since the mere presence of "fp" in the
register name table overrides this built-in $fp register, there
- is no real reason for this DEPRECATED_FP_REGNUM trickery here.
+ is no real reason for this gdbarch_deprecated_fp_regnum trickery here.
An architecture wanting to implement "$fp" as alias for a raw
register can do so by adding "fp" to register name table (mind
you, doing this is probably a dangerous thing). */
- return value_of_register (DEPRECATED_FP_REGNUM, frame);
+ return value_of_register (gdbarch_deprecated_fp_regnum (current_gdbarch),
+ frame);
else
{
struct value *val = allocate_value (builtin_type_void_data_ptr);