This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
fix another call-frame-cfa bug
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Mon, 17 Aug 2009 14:31:54 -0600
- Subject: fix another call-frame-cfa bug
- Reply-to: tromey at redhat dot com
I'm checking this in on the call-frame-cfa branch.
This fixes another bug that a user found:
https://bugzilla.redhat.com/show_bug.cgi?id=517870
The problem is that the code assumed that a frame's "unwind" field was
set when trying to compute the CFA. However, this field is computed
lazily, so we must compute it in frame_unwinder_is.
Jan, this is another one for Fedora.
Tom
2009-08-17 Tom Tromey <tromey@redhat.com>
* frame.c (frame_unwinder_is): Compute 'unwind' if needed.
diff --git a/gdb/frame.c b/gdb/frame.c
index 2b5a5b6..3f32471 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1849,6 +1849,8 @@ get_frame_args_address (struct frame_info *fi)
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;
}