* [PATCH]: Convert SAVED_PC_AFTER_CALL into a function for i386
@ 2001-04-17 16:21 Mark Kettenis
0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2001-04-17 16:21 UTC (permalink / raw)
To: gdb-patches
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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-17 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 16:21 [PATCH]: Convert SAVED_PC_AFTER_CALL into a function for i386 Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox