This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use -qualified flag when setting temporary breakpoint in start command
- From: André Pönitz <apoenitz at t-online dot de>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org, Simon Marchi <simon dot marchi at efficios dot com>
- Date: Tue, 9 Apr 2019 19:12:56 +0200
- Subject: Re: [PATCH] Use -qualified flag when setting temporary breakpoint in start command
- References: <20190409025557.28846-1-simon.marchi@polymtl.ca>
On Mon, Apr 08, 2019 at 10:55:57PM -0400, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@efficios.com>
>
> 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'