This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 29 Feb 2004 19:53:09 -0500
- Subject: [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
On the basis that a deprecated function is less evil than a deprecated
macro. Tested on NetBSD PPC.
committed,
Andrew
(it's after midnight)
2004-02-29 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_init_frame_pc_first): New function.
(rs6000_gdbarch_init): Set deprecated_init_frame_pc_first.
* config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC_FIRST):
Delete macro.
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.181
diff -u -r1.181 rs6000-tdep.c
--- rs6000-tdep.c 17 Feb 2004 15:21:22 -0000 1.181
+++ rs6000-tdep.c 1 Mar 2004 00:50:07 -0000
@@ -211,6 +211,13 @@
}
static CORE_ADDR
+rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev)
+{
+ return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next)
+ : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ());
+}
+
+static CORE_ADDR
rs6000_frame_args_address (struct frame_info *fi)
{
struct frame_extra_info *extra_info = get_frame_extra_info (fi);
@@ -2914,6 +2921,7 @@
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
+ set_gdbarch_deprecated_init_frame_pc_first (gdbarch, rs6000_init_frame_pc_first);
if (!sysv_abi)
{
Index: config/rs6000/tm-rs6000.h
===================================================================
RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
retrieving revision 1.29
diff -u -r1.29 tm-rs6000.h
--- config/rs6000/tm-rs6000.h 15 Feb 2004 22:55:30 -0000 1.29
+++ config/rs6000/tm-rs6000.h 1 Mar 2004 00:50:07 -0000
@@ -74,12 +74,6 @@
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPLAST_REGNUM 63 /* Last floating point register */
-/* Define other aspects of the stack frame. */
-
-#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
- (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) : \
- prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ())
-
/* Notice when a new child process is started. */
#define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior