This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/12156] cannot break on static functions with gccflto (link time optimization)
- From: "chantry.xavier at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 20 Nov 2010 09:36:06 +0000
- Subject: [Bug breakpoints/12156] cannot break on static functions with gccflto (link time optimization)
- Auto-submitted: auto-generated
- References: <bug-12156-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12156
--- Comment #2 from Xavier <chantry.xavier at gmail dot com> 2010-11-20 09:36:04 UTC ---
(In reply to comment #1)
> Try the hint that gdb suggests:
>
> Hint: try 'foo.2043<TAB> or 'foo.2043<ESC-?>
>
> 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<TAB> 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<TAB> or 'foo.2043<ESC-?>
(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.