On Tue, 2014-07-29 at 16:44 -0400, David Malcolm wrote:
> A complaint I heard at Cauldron with the C++ification of GCC passes is
> that it's become much more difficult to set breakpoints on the execute
> hooks of a pass, now that the passes are classes within anonymous
> namespaces.
> 
> When this was first done, the execute methods were trivial
> implementations that called into the existing named functions, which are
> still easy to put a breakpoint on by name (assuming you know the name of
> the function), but some of these have now been converted so that the
> "execute" method is the body of the pass.
> 
> I did some experimentation, on this box with
> gdb-7.6.50.20130731-19.fc20.x86_64 and gcc trunk r212913 (the latter
> from a week ago).
> 
> You *can* set a breakpoint by name on such an execute method, but it's
> tedious to type:
> (gdb) break '(anonymous namespace)::pass_expand::execute'
> Breakpoint 7 at 0x655220: file ../../src/gcc/cfgexpand.c, line 
> 
> ...since tab-completion doesn't work well:
> 
> (gdb) break '(a<TAB>
> does tab complete to:
> (gdb) break '(anonymous namespace)::
> 
> but typing anything else then hitting tab returns back to:
> (gdb) break '(anonymous namespace)::
> 
> Is anyone else seeing this?

FWIW, this appears to be filed against gdb as:
https://sourceware.org/bugzilla/show_bug.cgi?id=16874

[...snip discussion of workaround...]

Reply via email to