From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13843 invoked by alias); 28 Nov 2017 00:39:23 -0000 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 Received: (qmail 13830 invoked by uid 89); 28 Nov 2017 00:39:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=BAYES_00,GIT_PATCH_2,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=wow!, bored, Hx-languages-length:1883 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Nov 2017 00:39:21 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49F3C46279 for ; Tue, 28 Nov 2017 00:39:20 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1105E5D9C6; Tue, 28 Nov 2017 00:39:20 +0000 (UTC) Subject: Re: [PATCH 32/40] Make "break foo" find "A::foo", A::B::foo", etc. [C++ and wild matching] To: Pedro Alves , gdb-patches@sourceware.org References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-33-git-send-email-palves@redhat.com> <024edecc-7bfa-08a4-de46-3536297f0654@redhat.com> <943402c5-0bbb-8ff7-66e3-5522256fbc1e@redhat.com> <3692eedd-6f0f-2c6b-535c-2c5682dc938e@redhat.com> From: Keith Seitz Message-ID: Date: Tue, 28 Nov 2017 00:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <3692eedd-6f0f-2c6b-535c-2c5682dc938e@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00712.txt.bz2 On 11/24/2017 08:48 AM, Pedro Alves wrote: > > So I took your suggestion and ran with it. And in the end > I like it! See more below. Wow! Bored? ;-) > On 11/22/2017 04:48 PM, Pedro Alves wrote: > > ... well, I'll be d*mn+d... I gave your suggestion a try, and > I actually like it! If we make "-qualified" a flag instead of an > option with an argument, then usual case of: > > (gdb) b -q A::doit > > works the exact same. It's only when you specify source files > and labels that it makes a difference. So with your suggestion, > we get a lot of benefit (works with linespecs, which is the common > case, I guess) with only a mild downside (a little more typing in > the explicit location case). Yeah, linespecs are definitely still the primary interface to locations. I agree, a little more (or even a little more careful) typing for explicit locations is not much of a big deal. At least not to me. > Here's what the delta patch looks like. I left "-qualified" > as an explicit location option, rather than splitting the parsing > of "qualified" and the real explicit options, because this way > support for "-qualified" in the middle of other options > "-source filename.cc -qualified -function func" falls out > naturally. I hadn't thought of that. That's a reasonable approach. > gdb/ax-gdb.c | 3 +- > gdb/breakpoint.c | 23 +++++++------ > gdb/completer.c | 39 +++++++++++++++++---- > gdb/guile/scm-breakpoint.c | 6 ++-- > gdb/linespec.c | 31 +++++++++++------ > gdb/linespec.h | 3 +- > gdb/location.c | 86 ++++++++++++++++++++++++++++++---------------- > gdb/location.h | 35 ++++++++++++++----- > gdb/mi/mi-cmd-break.c | 3 +- > gdb/python/py-breakpoint.c | 3 +- > gdb/python/python.c | 3 +- > 11 files changed, 163 insertions(+), 72 deletions(-) Looks good! Thank you, Keith