From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13814 invoked by alias); 20 Nov 2010 09:36:12 -0000 Received: (qmail 13747 invoked by uid 22791); 20 Nov 2010 09:36:11 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Nov 2010 09:36:07 +0000 From: "chantry.xavier at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/12156] cannot break on static functions with gcc flto (link time optimization) X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chantry.xavier at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 21 Nov 2010 18:08:00 -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 X-SW-Source: 2010-q4/txt/msg00156.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12156 --- Comment #2 from Xavier 2010-11-20 09:36:04 UTC --- (In reply to comment #1) > Try the hint that gdb suggests: > > Hint: try 'foo.2043 or 'foo.2043 > > So: break 'foo.2043' > > I think this could be better, so I'm leaving the PR open. > I don't remember if I tried this or not before, I just remember I was a bit confused by this message. Anyway 'foo.2043 expands to 'foo.2043', but the behavior is exactly the same. (gdb) break 'foo.2043 Can't find member of namespace, class, struct, or union named "foo.2043" Hint: try 'foo.2043 or 'foo.2043 (Note leading single quote.) Make breakpoint pending on future shared library load? (y or [n]) > Also, I think this is an LTO bug. It seems to me that it should emit > debuginfo naming the symbol as "foo". Shall I report it to gcc bugtracker then? I was wondering if this was simply a bug and if there was not a reason for this naming. In gcc man page about -flto, there is : Link time optimization does not play well with generating debugging information. Combining -flto or -fwhopr with -g is experimental. Without -flto, I don't need to build with -g to get symbol names, I can break on any functions. I only need -g if I want to get the source, see the parameters of functions, etc. So I wonder if this warning message captures the 'foo.2043' problem. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.