From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9419 invoked by alias); 10 Apr 2019 18:22:13 -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 9401 invoked by uid 89); 10 Apr 2019 18:22:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=configurable, constructors, H*r:sk:mailout, H*RU:sk:mailout X-HELO: mailout10.t-online.de Received: from mailout10.t-online.de (HELO mailout10.t-online.de) (194.25.134.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Apr 2019 18:22:11 +0000 Received: from fwd16.aul.t-online.de (fwd16.aul.t-online.de [172.20.26.243]) by mailout10.t-online.de (Postfix) with SMTP id A224B41C87A2; Wed, 10 Apr 2019 20:22:07 +0200 (CEST) Received: from localhost (STIhkvZLwhvLYh5sjUOr-0o9uUx80edhTlWF5eKNHXp0frDHSgix+wvCPehvzuBgWd@[95.91.240.51]) by fwd16.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1hEHrI-0WlZKK0; Wed, 10 Apr 2019 20:22:04 +0200 Date: Wed, 10 Apr 2019 18:22:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Simon Marchi Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PP?] Re: [PATCH] Use -qualified flag when setting temporary breakpoint in start command Message-ID: <20190410172515.GA1895@klara.mpi.htwm.de> References: <20190409025557.28846-1-simon.marchi@polymtl.ca> <20190409171256.GA5702@klara.mpi.htwm.de> <4683d41dae3702a9f2b754f64a3e4bc2@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4683d41dae3702a9f2b754f64a3e4bc2@polymtl.ca> X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00192.txt.bz2 On Tue, Apr 09, 2019 at 06:02:09PM -0400, Simon Marchi wrote: > On 2019-04-09 13:12, André Pönitz wrote: > > I wonder whether there's still a chance to have a(n additional) way > > to specify the effect of -qualified using a syntax that is the same > > across GDB versions. > > > > I have pretty much the same effect like Simon for 'start' for a feature > > 'Break on abort()' in 'my' IDE, that post-8.1 triggers on any function > > called 'abort'. > > > > Even with the Python interface there seems to be no way to have > > a single way to set the breakpoint short of having Pre/Post81Breakpoint > > classes using different base constructors and try:/except...: > > to find the matching version. > > > > To be honest, I am tempted to call the whole pattern matching on > > function names a mis-feature. C++ name resolution is not really > > compatible with regexps, so at the very least when naming the > > global explicitly ('b ::abort') there should be no match on > > 'struct Foo { void abort() {} };' > > There is no pattern matching/regexp happening here. The wild matching > introduced in 8.1 just means that the identifier that you look up may be at > any level, under some namespace or class. Ok. Sorry for not having checked the implementation before writing the mail. I have some sympathy for the 'ignore namespaces' case as I am living in a world of user(!)-configurable namespaces myself, but I still do not see much benefit in treating 'some_class::bar()' and 'some_ns::bar()' "the same" under "default" circumstances. Ignoring the static some_class case these are pretty much always really different functions. > Unless I am missing something, I believe that 'b ::abort' should do what you > want, and the current behavior is simply buggy. Buggy or not, it's certainly intentionally changed user-visible behaviour without good way on the user side to distinguish between the versions. This makes maintaining GDB I cannot reasonbly say "without any way" as one apparently can distinguish the versions by trying to instantiate gdb.Breakpoint sub-classes with different constructors and tell from the failures on which side of the fence one lives, but that's, erm... Anyway, mileage varies, and I'll rest my case, and remain happy enough that this doesn't happen very often. Andre'