This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/16874] New: Can't break on function in anonymous namespace
- From: "rguenth at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Apr 2014 08:06:33 +0000
- Subject: [Bug c++/16874] New: Can't break on function in anonymous namespace
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16874
Bug ID: 16874
Summary: Can't break on function in anonymous namespace
Product: gdb
Version: 7.7
Status: NEW
Severity: critical
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: rguenth at gcc dot gnu.org
namespace { int foo (void) { return 0; } } int main() { return foo (); }
> gdb ./a.out
GNU gdb (GDB; devel:gcc) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
warning: /etc/gdbinit.d/gdb-heap.py: No such file or directory
Reading symbols from ./a.out...done.
(gdb) b foo
Function "foo" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) start
Temporary breakpoint 1 at 0x4005ec: file t.C, line 1.
Starting program: /tmp/a.out
Temporary breakpoint 1, main () at t.C:1
1 namespace { int foo (void) { return 0; } } int main() { return foo ();
}
(gdb) b foo
Function "foo" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
so it doesn't work, not from toplevel context before starting the program
nor from a context within the TU that contains the anonymous namespace.
Breaks debugging of GCC big times - try to break on
cfgexpand.c:pass_expand::execute - we want to be able to do that from a
context that is not necessarily local to that TU.
--
You are receiving this mail because:
You are on the CC list for the bug.