From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19266 invoked by alias); 13 Jun 2011 20:46:43 -0000 Received: (qmail 19239 invoked by uid 22791); 13 Jun 2011 20:46:42 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 20:46:27 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5DKkR99007626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Jun 2011 16:46:27 -0400 Received: from host1.jankratochvil.net (ovpn-113-23.phx2.redhat.com [10.3.113.23]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5DKkPv8003871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Jun 2011 16:46:26 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p5DKkOeN006236; Mon, 13 Jun 2011 22:46:24 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p5DKkNiO006229; Mon, 13 Jun 2011 22:46:23 +0200 Date: Mon, 13 Jun 2011 20:46:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: Regression: Re: [PATCH] Fix some i386 unwinder inconcistencies Message-ID: <20110613204622.GA31796@host1.jankratochvil.net> References: <201106122057.p5CKvUEa030437@glazunov.sibelius.xs4all.nl> <20110613104911.GA1965@host1.jankratochvil.net> <201106131537.p5DFb1cn023164@glazunov.sibelius.xs4all.nl> <20110613161114.GA18588@host1.jankratochvil.net> <201106131910.p5DJASWu022014@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201106131910.p5DJASWu022014@glazunov.sibelius.xs4all.nl> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2011-06/txt/msg00180.txt.bz2 On Mon, 13 Jun 2011 21:10:28 +0200, Mark Kettenis wrote: > > In both cases on Fedora it stops at the same place: > > 0x080483e0 in func () at ./gdb.base/watchpoint-cond-gone.c:28^M > > Are you sure? If that's the case, there must be debug info that tells > GDB that the watchpoint goes out of scope. It stops because the original frame changes and in watchpoint_check within_current_scope becomes 0. This is because code_addr is different but your patch fixed code_addr so it no longer gets trapped. You should also have provided a testcase showing a PASS->FAIL on the epilogue code_addr fix. > Smells like there is a > flaw in the watchpoint code where it notices that the watchpoint goes > out of scope, but still tries to evaluate the watchpoint condition. BTW I do not say how many flaws are in GDB, there are many. But so far the functionality worked and now it does not. So either we find a simple fix soon enough or one should revert the patch. Cross-comparison of various known regressions get complicated. > There should be debug info to tell us exactly when a certain variable > goes out of scope, and the breakpoint/watchpoint code should use it. For -O0 -g code the debug info is not perfect per instruction - this is why for example the prologues need to be skipped. > In absence of that debug info, assuming that the watchpoint goes out > of scope when the function returns, combined with the > in_function_epilogue_p() check will have to do the job. Yes but you broke a functionality depending on existing bugs so you should have also fixed these associated problems not visible before. > > Also for the epilogue unwinder you would need to somehow fix: > > 1441 /* This restriction could be lifted if other unwinders are known to > > 1442 compute the frame base in a way compatible with the DWARF > > 1443 unwinder. */ > > 1444 if (! frame_unwinder_is (this_frame, &dwarf2_frame_unwind)) > > 1445 error (_("can't compute CFA for this frame")); > > All unwinders are supposed to return a frame base that is "compatible" > amongst unwinders, including the DWARF one. Now that may be tricky if > compilers don't agree on what the frame base (CFA) is. But we should > get this right for GCC, and that's all I care about. If you'd ask me, > that check should be removed. I agree, CFA is computed for the same address in all unwinders I have seen so far. Thanks, Jan