This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [1/6] Remove macro TARGET_VIRTUAL_FRAME_POINTER
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 12 Jun 2007 18:04:51 +0200
- Subject: [rfc] [1/6] Remove macro TARGET_VIRTUAL_FRAME_POINTER
Hello,
this patch removes TARGET_VIRTUAL_FRAME_POINTER macro from gdbarch.sh
ChangeLog:
* gdbarch.sh (TARGET_VIRTUAL_FRAME_POINTER): Replace by
gdbarch_virtual_frame_pointer.
* tracepoint.c (encode_actions): Likewise.
* dwarf2loc.c (dwarf2_loc_desc_needs_frame): Likewise.
* ax-gdb.c (gen_frame_args_address, gen_frame_locals_address): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
Is this ok to commit?
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urN src/gdb/ax-gdb.c dev/gdb/ax-gdb.c
--- src/gdb/ax-gdb.c 2007-05-31 19:11:18.000000000 +0200
+++ dev/gdb/ax-gdb.c 2007-06-11 19:25:28.000000000 +0200
@@ -461,7 +461,8 @@
int frame_reg;
LONGEST frame_offset;
- TARGET_VIRTUAL_FRAME_POINTER (ax->scope, &frame_reg, &frame_offset);
+ gdbarch_virtual_frame_pointer (current_gdbarch,
+ ax->scope, &frame_reg, &frame_offset);
ax_reg (ax, frame_reg);
gen_offset (ax, frame_offset);
}
@@ -475,7 +476,8 @@
int frame_reg;
LONGEST frame_offset;
- TARGET_VIRTUAL_FRAME_POINTER (ax->scope, &frame_reg, &frame_offset);
+ gdbarch_virtual_frame_pointer (current_gdbarch,
+ ax->scope, &frame_reg, &frame_offset);
ax_reg (ax, frame_reg);
gen_offset (ax, frame_offset);
}
diff -urN src/gdb/dwarf2loc.c dev/gdb/dwarf2loc.c
--- src/gdb/dwarf2loc.c 2007-06-11 11:31:56.000000000 +0200
+++ dev/gdb/dwarf2loc.c 2007-06-11 19:25:28.000000000 +0200
@@ -387,7 +387,8 @@
error (_("Unexpected opcode after DW_OP_fbreg for symbol \"%s\"."),
SYMBOL_PRINT_NAME (symbol));
- TARGET_VIRTUAL_FRAME_POINTER (ax->scope, &frame_reg, &frame_offset);
+ gdbarch_virtual_frame_pointer (current_gdbarch,
+ ax->scope, &frame_reg, &frame_offset);
ax_reg (ax, frame_reg);
ax_const_l (ax, frame_offset);
ax_simple (ax, aop_add);
diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c 2007-06-11 11:31:56.000000000 +0200
+++ dev/gdb/gdbarch.c 2007-06-11 19:25:28.000000000 +0200
@@ -1315,12 +1315,6 @@
fprintf_unfiltered (file,
"gdbarch_dump: vbit_in_delta = %s\n",
paddr_d (current_gdbarch->vbit_in_delta));
-#ifdef TARGET_VIRTUAL_FRAME_POINTER
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
- XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: virtual_frame_pointer = <0x%lx>\n",
(long) current_gdbarch->virtual_frame_pointer);
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h 2007-06-11 11:31:56.000000000 +0200
+++ dev/gdb/gdbarch.h 2007-06-11 19:25:28.000000000 +0200
@@ -277,12 +277,6 @@
typedef void (gdbarch_virtual_frame_pointer_ftype) (CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
extern void gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset);
extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer);
-#if !defined (GDB_TM_FILE) && defined (TARGET_VIRTUAL_FRAME_POINTER)
-#error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
-#endif
-#if !defined (TARGET_VIRTUAL_FRAME_POINTER)
-#define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
-#endif
extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh 2007-06-11 11:31:56.000000000 +0200
+++ dev/gdb/gdbarch.sh 2007-06-11 19:25:28.000000000 +0200
@@ -425,7 +425,7 @@
# Function for getting target's idea of a frame pointer. FIXME: GDB's
# whole scheme for dealing with "frames" and "frame pointers" needs a
# serious shakedown.
-f:TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset:0:legacy_virtual_frame_pointer::0
+f::void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset:0:legacy_virtual_frame_pointer::0
#
M::void:pseudo_register_read:struct regcache *regcache, int cookednum, gdb_byte *buf:regcache, cookednum, buf
M::void:pseudo_register_write:struct regcache *regcache, int cookednum, const gdb_byte *buf:regcache, cookednum, buf
diff -urN src/gdb/tracepoint.c dev/gdb/tracepoint.c
--- src/gdb/tracepoint.c 2007-06-11 11:31:58.000000000 +0200
+++ dev/gdb/tracepoint.c 2007-06-11 19:25:28.000000000 +0200
@@ -1539,7 +1539,8 @@
*tdp_actions = NULL;
*stepping_actions = NULL;
- TARGET_VIRTUAL_FRAME_POINTER (t->address, &frame_reg, &frame_offset);
+ gdbarch_virtual_frame_pointer (current_gdbarch,
+ t->address, &frame_reg, &frame_offset);
for (action = t->actions; action; action = action->next)
{