From: Mark Kettenis Date: Tue, 17 Apr 2001 23:20:55 +0000 (+0000) Subject: * i386-tdep.c (i386_saved_pc_after_call): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed84f6c14944278d643810232ce167b2f0c99fea;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f95d73700fb..3377633d7d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2001-04-18 Mark Kettenis + + * 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 * configure.host (m68030-sony-*, m68*-isi-*, m68*-sony-*): diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h index 83704413c05..c4b64a547f2 100644 --- a/gdb/config/i386/tm-i386.h +++ b/gdb/config/i386/tm-i386.h @@ -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. */ diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index f654d6f3d51..15b261ca474 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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. */