From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11071 invoked by alias); 5 Nov 2007 20:06:24 -0000 Received: (qmail 11036 invoked by uid 22791); 5 Nov 2007 20:06:21 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 05 Nov 2007 20:06:17 +0000 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id lA5K69Xc011075 for ; Mon, 5 Nov 2007 20:06:10 GMT Received: from ug-out-1314.google.com (ugcm2.prod.google.com [10.66.114.2]) by zps36.corp.google.com with ESMTP id lA5K5sxC002896 for ; Mon, 5 Nov 2007 12:06:08 -0800 Received: by ug-out-1314.google.com with SMTP id m2so1055915ugc for ; Mon, 05 Nov 2007 12:06:08 -0800 (PST) Received: by 10.66.219.11 with SMTP id r11mr748405ugg.1194293168182; Mon, 05 Nov 2007 12:06:08 -0800 (PST) Received: by 10.67.21.14 with HTTP; Mon, 5 Nov 2007 12:06:08 -0800 (PST) Message-ID: Date: Mon, 05 Nov 2007 20:06:00 -0000 From: "Douglas Evans" To: gdb-patches@sourceware.org Subject: Re: RFA: patch to fix multi-breakpoint enable/disable handling of inline functions In-Reply-To: <20071022212517.GA23401@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071016001816.F059B1C7E69@localhost> <20071022212517.GA23401@caradoc.them.org> 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: 2007-11/txt/msg00079.txt.bz2 On Oct 22, 2007 2:25 PM, Daniel Jacobowitz wrote: > On Mon, Oct 22, 2007 at 02:22:31PM -0700, Douglas Evans wrote: > > Ping. > > > > I've split the patch into two parts, separating out the tweaks to > > mb-templates.exp,mb-ctor.exp (I'll send this in a separate message). > > I also fixed a few typos. The revised patch is attached. > > > > Ok to check in? > > I've been hoping Vladimir would look at this - Vladimir? > > If he doesn't have time I'll try to figure it out. The bug is that transferring enable/disable status from the old breakpoint list to the new one (which is done each time the program is run) gets the wrong results for static inline functions with multi-breakpoints. In my testcase 1.1 is enabled and 1.2 is disabled, but when the program is run 1.1 becomes disabled and 1.2 becomes enabled. The code uses strcmp to distinguish the functions but clearly that can't work in this case. The patch adds code to recognize this case of ambiguous function names and when detected uses the pc address instead. Using the pc address is less preferable to strcmp because if the user changes the program, functions can move, but in this case strcmp doesn't work at all. OTOH the patch is simple and gets the right answer most of the time. More complex solutions are possible - I'd still add this patch until then, but that's just my $0.02.