This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/16874] Setting a breakpoint on function in anonymous namespace is unnecessarily awkward
- From: "rguenth at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 22 Sep 2014 07:51:11 +0000
- Subject: [Bug c++/16874] Setting a breakpoint on function in anonymous namespace is unnecessarily awkward
- Auto-submitted: auto-generated
- References: <bug-16874-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16874
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> ---
The workaround works to some extent, but tab-completion is still broken
and for
t1.C
-----
namespace { int foo (void) { return 0; } }
int bar(void);
int main() { return foo () + bar (); }
t2.C
-----
namespace { int foo2 (void) { return 1; } }
int bar () { return foo2 (); }
it doesn't allow me to set a breakpoint on t2.C::foo2 until I enter bar().
That is, using 'b *<name>' seems to do symbol lookup from the current
scope only.
For the GCC case the workaround doesn't work in practice for this reason.
b '(anonymous namespace)::foo2'
works from any context (but is quite awkward due to tab-completion being
broken).
--
You are receiving this mail because:
You are on the CC list for the bug.