Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Fix calls to frame_base_find_by_frame in frame.c (?)
@ 2008-05-09  4:04 Joel Brobecker
  2008-05-09  4:06 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2008-05-09  4:04 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Hi Daniel,

I noticed a regression while converting alpha-osf to the value-based
unwinding approach, and it looks like frame_base_find_by_frame was
changed to take a this_frame but the callers were still left passing
a next_frame. As a result, we ended up selecting the wrong frame
base unwinder for a one of our frames, leading to the wrong value
being printed for the one argument.

2008-05-08  Joel Brobecker  <brobecker@adacore.com>

        * frame.c (get_frame_base_address, get_frame_locals_address)
        (get_frame_args_address): Pass the correct frame when calling
        frame_base_find_by_frame.

Tested on x86-linux. I also tested this on alpha-osf after my updates
for the new value-based unwinding - but because I haven't been able
to run the testsuite on this platform for a while now, I used AdaCore's
GDB testsuite as the reference.

-- 
Joel

[-- Attachment #2: frame.c.diff --]
[-- Type: text/plain, Size: 1540 bytes --]

Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.240
diff -u -p -r1.240 frame.c
--- frame.c	3 May 2008 23:24:17 -0000	1.240
+++ frame.c	9 May 2008 02:21:25 -0000
@@ -1592,7 +1592,7 @@ get_frame_base_address (struct frame_inf
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_frame (fi->next);
+    fi->base = frame_base_find_by_frame (fi);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)
@@ -1608,7 +1608,7 @@ get_frame_locals_address (struct frame_i
     return 0;
   /* If there isn't a frame address method, find it.  */
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_frame (fi->next);
+    fi->base = frame_base_find_by_frame (fi);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)
@@ -1624,7 +1624,7 @@ get_frame_args_address (struct frame_inf
     return 0;
   /* If there isn't a frame address method, find it.  */
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_frame (fi->next);
+    fi->base = frame_base_find_by_frame (fi);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-09  3:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-09  4:04 [RFA] Fix calls to frame_base_find_by_frame in frame.c (?) Joel Brobecker
2008-05-09  4:06 ` Daniel Jacobowitz
2008-05-09  7:45   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox