This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix another call-frame-cfa bug


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;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]