From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59295 invoked by alias); 9 Apr 2019 18:09:54 -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 59131 invoked by uid 89); 9 Apr 2019 18:09:53 -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=H*r:encrypted, constructors, H*r:sk:mailout, H*RU:sk:mailout X-HELO: mailout08.t-online.de Received: from mailout08.t-online.de (HELO mailout08.t-online.de) (194.25.134.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Apr 2019 18:09:52 +0000 Received: from fwd08.aul.t-online.de (fwd08.aul.t-online.de [172.20.26.151]) by mailout08.t-online.de (Postfix) with SMTP id 05D8E41D08EC; Tue, 9 Apr 2019 20:09:48 +0200 (CEST) Received: from localhost (Z1SMP-Z1QhH7Pm859wS1nRZTl7m6J5sHk5aSFEWy1sQyWRrg0r5U00BY3tD8WtdZ7-@[95.91.210.191]) by fwd08.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1hDvBr-0QcAUa0; Tue, 9 Apr 2019 20:09:47 +0200 Date: Tue, 09 Apr 2019 18:09:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Simon Marchi Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH] Use -qualified flag when setting temporary breakpoint in start command Message-ID: <20190409171256.GA5702@klara.mpi.htwm.de> References: <20190409025557.28846-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409025557.28846-1-simon.marchi@polymtl.ca> X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00156.txt.bz2 On Mon, Apr 08, 2019 at 10:55:57PM -0400, Simon Marchi wrote: > From: Simon Marchi > > When using the "start" command, GDB puts a temporary breakpoint on the > "main" symbol (we literally invoke the tbreak command). However, since > it does wild matching by default, it also puts a breakpoint on any C++ > method or "main" function in a namespace. For example, when debugging > GDB, it creates a total of 24 locations: 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() {} };' Andre'