Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <40428975.3020306@gnu.org> (raw)

[-- 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

WARNING: multiple messages have this Message-ID
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [obish] Convert rs6000 DEPRECATED_INIT_FRAME_PC_FIRST to a function
Date: Mon, 01 Mar 2004 00:53:00 -0000	[thread overview]
Message-ID: <40428975.3020306@gnu.org> (raw)
Message-ID: <20040301005300.vHdrYVP8Jq5I1_PCLxFFe0BA7GBvUYk3Uelv-v1M_c8@z> (raw)

[-- 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

             reply	other threads:[~2004-03-01  0:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Andrew Cagney [this message]
2004-03-01  0:53 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40428975.3020306@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox