This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/10929] Unable to set a function breakpoint in unnamed namespace


------- Additional Comments From swagiaal at redhat dot com  2009-11-11 20:01 -------
Hmm.. I cannot reproduce.

Here is what I get:

$ ./gdb/gdb ../../tests/break-anonymous -ex 'list' -ex 'b main' -ex 'r' -ex 'b
foo' -ex 'q'
GNU gdb (GDB) 7.0
Copyright (C) 2009 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /notnfs/swagiaal/src/tests/break-anonymous...done.
1	namespace {
2	  int foo() {
3	    int a = 5;
4	  }
5	};
6	
7	int main() {
8	  int a = foo();
9	  return a;
10	}
Breakpoint 1 at 0x400581: file break-anonymous.c, line 8.
[Thread debugging using libthread_db enabled]

Breakpoint 1, main () at break-anonymous.c:8
8	  int a = foo();
Current language:  auto
The current source language is "auto; currently c++".
Breakpoint 2 at 0x400570: file break-anonymous.c, line 3.


Maybe it is a compiler issue. Which compiler and which version are you using ?
Could you post the result of:
  readelf --debug-dump <your/test/program> 


-- 


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]