From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17487 invoked by alias); 22 Sep 2014 07:51:15 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 17449 invoked by uid 48); 22 Sep 2014 07:51:13 -0000 From: "rguenth at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug c++/16874] Setting a breakpoint on function in anonymous namespace is unnecessarily awkward Date: Mon, 22 Sep 2014 07:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00719.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16874 --- Comment #8 from Richard Guenther --- 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 *' 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.