aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-02 14:53:57 +0000
committerTom Tromey <tromey@redhat.com>2009-09-02 14:53:57 +0000
commite78022079ce4c50f042bb5287665a4f38704a71b (patch)
tree76c5d22b601a7a3ab15067483733204fe114f9db /gdb/frame.c
parentd34089166b3e7b60151752997db33c3f28016349 (diff)
downloadgdb-e78022079ce4c50f042bb5287665a4f38704a71b.zip
gdb-e78022079ce4c50f042bb5287665a4f38704a71b.tar.gz
gdb-e78022079ce4c50f042bb5287665a4f38704a71b.tar.bz2
gdb
* frame.h (frame_unwinder_is): Declare. * frame.c (frame_unwinder_is): New function. * dwarf2loc.c: Include dwarf2-frame.h. (dwarf_expr_frame_cfa): New function. (dwarf2_evaluate_loc_desc): Use it. (needs_frame_frame_cfa): New function. (dwarf2_loc_desc_needs_frame): Use it. * dwarf2expr.h (struct dwarf_expr_context) <get_frame_cfa>: New field. * dwarf2expr.c (execute_stack_op) <DW_OP_call_frame_cfa>: New case. * dwarf2-frame.h (dwarf2_frame_cfa): Declare. * dwarf2-frame.c (no_get_frame_cfa): New function. (execute_stack_op): Use it. (dwarf2_frame_cfa): New function. gdb/testsuite * gdb.dwarf2/callframecfa.exp: New file. * gdb.dwarf2/callframecfa.S: New file.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 67e0607..67ef967 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1843,6 +1843,17 @@ get_frame_args_address (struct frame_info *fi)
return fi->base->this_args (fi, &fi->base_cache);
}
+/* Return true if the frame unwinder for frame FI is UNWINDER; false
+ otherwise. */
+
+int
+frame_unwinder_is (struct frame_info *fi, const struct frame_unwind *unwinder)
+{
+ if (fi->unwind == NULL)
+ fi->unwind = frame_unwind_find_by_frame (fi, &fi->prologue_cache);
+ return fi->unwind == unwinder;
+}
+
/* Level of the selected frame: 0 for innermost, 1 for its caller, ...
or -1 for a NULL frame. */