* i386-tdep.c (i386_saved_pc_after_call): New function.
authorMark Kettenis <kettenis@gnu.org>
Tue, 17 Apr 2001 23:20:55 +0000 (23:20 +0000)
committerMark Kettenis <kettenis@gnu.org>
Tue, 17 Apr 2001 23:20:55 +0000 (23:20 +0000)
* 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.

gdb/ChangeLog
gdb/config/i386/tm-i386.h
gdb/i386-tdep.c

index f95d73700fb110239d30540423f66e8bdae1ea74..3377633d7d946e56ea66735f560da565f4a6ce0e 100644 (file)
@@ -1,3 +1,10 @@
+2001-04-18  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.
+
 2001-04-16  Andrew Cagney  <ac131313@redhat.com>
 
        * configure.host (m68030-sony-*, m68*-isi-*, m68*-sony-*):
index 83704413c05cf65cb5ef6fe29db7ebe55f3b37bd..c4b64a547f2508af5bdb307f62a128caaef143a8 100644 (file)
@@ -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.  */
 
index f654d6f3d51df4cbbb39b3a4818498f222f2a184..15b261ca474c820e01f953a2def0142c2a9312be 100644 (file)
@@ -365,6 +365,14 @@ i386_frame_chain (struct frame_info *frame)
   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.  */