Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@wins.uva.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH]: Convert SAVED_PC_AFTER_CALL into a function for i386
Date: Tue, 17 Apr 2001 16:21:00 -0000	[thread overview]
Message-ID: <200104172321.f3HNL9N03381@delius.kettenis.local> (raw)

Yet anothet one.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386-tdep.c (i386_saved_pc_after_call): New function.
	* config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Redefine in terms
	of i386_saved_pc_after_call.
	(i386_saved_pc_after_call): New prototype.

Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.27
diff -u -p -r1.27 i386-tdep.c
--- i386-tdep.c 2001/04/16 13:03:15 1.27
+++ i386-tdep.c 2001/04/17 23:18:55
@@ -365,6 +365,14 @@ i386_frame_chain (struct frame_info *fra
   return 0;
 }
 
+/* Immediately after a function call, return the saved pc.  */
+
+CORE_ADDR
+i386_saved_pc_after_call (struct frame_info *frame)
+{
+  return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
+}
+
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
Index: config/i386/tm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-i386.h,v
retrieving revision 1.15
diff -u -p -r1.15 tm-i386.h
--- config/i386/tm-i386.h 2001/04/16 13:03:15 1.15
+++ config/i386/tm-i386.h 2001/04/17 23:18:55
@@ -68,12 +68,10 @@ struct type;
 
 extern int i386_skip_prologue (int);
 
-/* Immediately after a function call, return the saved pc.  Can't always go
-   through the frames for this because on some machines the new frame is not
-   set up until the new function executes some instructions.  */
+/* Immediately after a function call, return the saved pc.  */
 
-#define SAVED_PC_AFTER_CALL(frame) \
-     (read_memory_unsigned_integer (read_register (SP_REGNUM), 4))
+#define SAVED_PC_AFTER_CALL(frame) i386_saved_pc_after_call (frame)
+extern CORE_ADDR i386_saved_pc_after_call (struct frame_info *frame);
 
 /* Stack grows downward.  */
 


                 reply	other threads:[~2001-04-17 16:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200104172321.f3HNL9N03381@delius.kettenis.local \
    --to=kettenis@wins.uva.nl \
    --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