public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/10929] New: Unable to set a function breakpoint in unnamed namespace
@ 2009-11-09 15:40 egor at sun dot com
  2009-11-11 20:01 ` [Bug c++/10929] " swagiaal at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: egor at sun dot com @ 2009-11-09 15:40 UTC (permalink / raw)
  To: gdb-prs

try this code:

namespace {
    int foo() {
        int a = 5;
    }
};

int main() {
    int a = foo();
    return a;
}

in gdb 7.0:

(gdb) b main
Breakpoint 1 at 0x8050d48: file welcome.cc, line 8.
(gdb) r
Starting program:
/home/eu155513/NetBeansProjects/Welcome_74/dist/Debug/GNU-Solaris-x86/welcome_74 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]

Breakpoint 1, main () at welcome.cc:8
8	    int a = foo();
(gdb) b foo
Function "foo" not defined.
Make breakpoint pending on future shared library load? (y or [n]) 

in gdb 6.6:

(gdb) b main
Breakpoint 1 at 0x8050d48: file welcome.cc, line 8.
(gdb) r
Starting program:
/home/eu155513/NetBeansProjects/Welcome_74/dist/Debug/GNU-Solaris-x86/welcome_74 
warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"

Breakpoint 1, main () at welcome.cc:8
8	    int a = foo();
(gdb) b foo
Breakpoint 2 at 0x8050d22: file welcome.cc, line 3.
(gdb)

-- 
           Summary: Unable to set a function breakpoint in unnamed namespace
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: egor at sun dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10929

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2010-07-20 19:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09 15:40 [Bug c++/10929] New: Unable to set a function breakpoint in unnamed namespace egor at sun dot com
2009-11-11 20:01 ` [Bug c++/10929] " swagiaal at redhat dot com
2009-11-12 10:37 ` egor at sun dot com
2009-11-12 10:38 ` egor at sun dot com
2009-11-13 21:08 ` swagiaal at redhat dot com
2009-11-16 19:35 ` swagiaal at redhat dot com
2010-01-26 15:48 ` cvs-commit at gcc dot gnu dot org
2010-07-20 19:42 ` tromey 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).