public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16874] New: Can't break on function in anonymous namespace
@ 2014-04-25  8:06 rguenth at gcc dot gnu.org
  2014-04-25  9:10 ` [Bug c++/16874] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-25  8:06 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-07-22 14:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25  8:06 [Bug c++/16874] New: Can't break on function in anonymous namespace rguenth at gcc dot gnu.org
2014-04-25  9:10 ` [Bug c++/16874] " rguenth at gcc dot gnu.org
2014-07-29 21:04 ` dmalcolm at redhat dot com
2014-08-06 14:12 ` [Bug c++/16874] Setting a breakpoint on function in anonymous namespace is unnecessarily awkward dmalcolm at redhat dot com
2014-09-13  8:10 ` markus at trippelsdorf dot de
2014-09-19 14:55 ` patrick at parcs dot ath.cx
2014-09-19 15:22 ` markus at trippelsdorf dot de
2014-09-19 15:26 ` patrick at parcs dot ath.cx
2014-09-22  7:51 ` rguenth at gcc dot gnu.org
2014-11-26  4:32 ` patrick at parcs dot ath.cx
2015-08-13  6:54 ` markus at trippelsdorf dot de
2015-08-26  1:19 ` patrick at parcs dot ath.cx
2020-07-22 14:38 ` palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).