This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Comvert FRAMELESS_FUNCTION_INVOCATION into a function for i386
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH] Comvert FRAMELESS_FUNCTION_INVOCATION into a function for i386
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Thu, 19 Apr 2001 13:40:48 +0200
And another one.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_frameless_function_invocation): New function.
* config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION): Redefine
in terms of i386_frameless_function_invocation. Adjust comment.
(i386_frameless_function_invocation): New prototype.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.28
diff -u -p -r1.28 i386-tdep.c
--- i386-tdep.c 2001/04/17 23:20:55 1.28
+++ i386-tdep.c 2001/04/19 11:38:43
@@ -365,6 +365,19 @@ i386_frame_chain (struct frame_info *fra
return 0;
}
+/* Determine whether the function invocation represented by FRAME does
+ not have a from on the stack associated with it. If it does not,
+ return non-zero, otherwise return zero. */
+
+int
+i386_frameless_function_invocation (struct frame_info *frame)
+{
+ if (frame->signal_handler_caller)
+ return 0;
+
+ return frameless_look_for_prologue (frame);
+}
+
/* Immediately after a function call, return the saved pc. */
CORE_ADDR
Index: config/i386/tm-i386.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-i386.h,v
retrieving revision 1.16
diff -u -p -r1.16 tm-i386.h
--- config/i386/tm-i386.h 2001/04/17 23:20:55 1.16
+++ config/i386/tm-i386.h 2001/04/19 11:38:43
@@ -328,12 +328,13 @@ extern CORE_ADDR i386_extract_struct_val
#define FRAME_CHAIN(frame) i386_frame_chain ((frame))
extern CORE_ADDR i386_frame_chain (struct frame_info *frame);
-/* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
+/* Determine whether the function invocation represented by FRAME does
+ not have a from on the stack associated with it. If it does not,
+ return non-zero, otherwise return zero. */
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
+#define FRAMELESS_FUNCTION_INVOCATION(frame) \
+ i386_frameless_function_invocation (frame)
+extern int i386_frameless_function_invocation (struct frame_info *frame);
/* Saved Pc. Get it from sigcontext if within sigtramp. */