From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8007 invoked by alias); 9 May 2008 02:24:37 -0000 Received: (qmail 7999 invoked by uid 22791); 9 May 2008 02:24:36 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 May 2008 02:24:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F391A2AAA59 for ; Thu, 8 May 2008 22:24:16 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id o4hxC83Fbjjr for ; Thu, 8 May 2008 22:24:16 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 97DA82AAA58 for ; Thu, 8 May 2008 22:24:16 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id F3E5EE7ACD; Thu, 8 May 2008 19:24:13 -0700 (PDT) Date: Fri, 09 May 2008 04:04:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA] Fix calls to frame_base_find_by_frame in frame.c (?) Message-ID: <20080509022413.GO7421@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DrWhICOqskFTAXiy" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00303.txt.bz2 --DrWhICOqskFTAXiy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 864 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 * 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 --DrWhICOqskFTAXiy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="frame.c.diff" Content-length: 1540 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) --DrWhICOqskFTAXiy--