aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-11-06 11:02:12 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-11-06 11:02:12 +0000
commitc12260ac385cffb6c60330b62a789a4fad9f52a1 (patch)
tree5ffbe71a86f4cb4f586708895cb14e10e224c76c /gdb/gdbarch.h
parent9e5abb068c86f04dcdd5ca82068caad4785c3a85 (diff)
downloadgdb-c12260ac385cffb6c60330b62a789a4fad9f52a1.zip
gdb-c12260ac385cffb6c60330b62a789a4fad9f52a1.tar.gz
gdb-c12260ac385cffb6c60330b62a789a4fad9f52a1.tar.bz2
* arch-utils.c (generic_in_function_epilogue_p): New function.
* arch-utils.h (generic_in_function_epilogue_p): Declare extern. * breakpoint.c (watchpoint_check): Add test whether the pc is currently in the epilogue of a function. * gdbarch.c: Autogenerated from gdbarch.sh. * gdbarch.h: Ditto. * gdbarch.sh (function_list): Add `in_function_epilogue_p' definition.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 1990969..f41a35d 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2069,6 +2069,20 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
#endif
#endif
+/* A target might have problems with watchpoints as soon as the stack
+ frame of the current function has been destroyed. This mostly happens
+ as the first action in a funtion's epilogue. in_function_epilogue_p()
+ is defined to return a non-zero value if either the given addr is one
+ instruction after the stack destroying instruction up to the trailing
+ return instruction or if we can figure out that the stack frame has
+ already been invalidated regardless of the value of addr. Targets
+ which don't suffer from that problem could just let this functionality
+ untouched. */
+
+typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);