Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
  2004-03-19  0:09 [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function Andrew Cagney
@ 2004-03-01  0:53 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2004-03-01  0:53 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

On the basis that a deprecated function is less evil than a deprecated 
macro.  Tested on NetBSD PPC.

committed,
Andrew
(it's after midnight)

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2069 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
@ 2004-03-19  0:09 Andrew Cagney
  2004-03-01  0:53 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2004-03-19  0:09 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

On the basis that a deprecated function is less evil than a deprecated 
macro.  Tested on NetBSD PPC.

committed,
Andrew
(it's after midnight)

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2069 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-01  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19  0:09 [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function Andrew Cagney
2004-03-01  0:53 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox