Summary: | GDB doesn't know about namespace aliases | ||
---|---|---|---|
Product: | gdb | Reporter: | David Carlton <carlton> |
Component: | c++ | Assignee: | Keith Seitz <keiths> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | carlton, ccoutant, dje, gdb-prs, keiths, tromey |
Priority: | P3 | ||
Version: | unknown | ||
Target Milestone: | 7.7 | ||
See Also: | https://sourceware.org/bugzilla/show_bug.cgi?id=10541 | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 11211 |
Description
David Carlton
2002-11-15 21:58:01 UTC
Fix: Having GCC generate the correct debugging info would be a good first step. From: David Carlton <carlton@kealia.com> To: gdb-gnats@sources.redhat.com Cc: Subject: Re: gdb/830: GDB doesn't know about namespace aliases Date: Wed, 17 Mar 2004 12:16:06 -0800 On 15 Nov 2002 21:51:26 -0000, carlton@math.Stanford.EDU said: > Having GCC generate the correct debugging info would be > a good first step. I believe GCC does now generate the appropriate debugging info. (I think GCC 3.4, maybe GCC 3.5 instead.) Subject: Bug 7935 CVSROOT: /cvs/src Module name: src Changes by: swagiaal@sourceware.org 2010-02-05 19:03:42 Modified files: gdb : ChangeLog cp-namespace.c cp-support.h dwarf2read.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.cp: nsusing.exp Log message: 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com> PR c++/7935: * gdb.cp/namespace-using.exp: Removed kfail; bug has been fixed. 2010-02-05 Sami Wagiaalla <swagiaal@redhat.com> PR c++/7935: * cp-support.h: Added char* alias element to using_direct data struct. (cp_add_using): Added char* alias argument. (cp_add_using_directive): Ditto. * cp-namespace.c: Updated with the above changes. (cp_lookup_symbol_imports): Check for aliases. * dwarf2read.c (read_import_statement): Figure out local alias for the import and pass it on to cp_add_using. (read_namespace): Pass alias argument to cp_add_using. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11330&r2=1.11331 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/cp-namespace.c.diff?cvsroot=src&r1=1.33&r2=1.34 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/cp-support.h.diff?cvsroot=src&r1=1.32&r2=1.33 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/dwarf2read.c.diff?cvsroot=src&r1=1.354&r2=1.355 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2121&r2=1.2122 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/nsusing.exp.diff?cvsroot=src&r1=1.2&r2=1.3 Sami checked in the fix. Here's another testcase. namespace foo { int x = 42; void baz () {} } namespace bar = foo; int main () { bar::baz (); return 0; } printing bar::x works, but setting a breakpoint on bar::baz() doesn't work. *** Bug 13384 has been marked as a duplicate of this bug. *** This is closely related to c++/10541, for which I have just committed a patch, so I am now closing this bug. [NOTE: When I commited the patch, I had the wrong bug# in the commit, so it didn't get attached here. Please see c++/10541 for links to patches.] |