This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/830: GDB doesn't know about namespace aliases
- From: carlton at math dot stanford dot edu
- To: gdb-gnats at sources dot redhat dot com
- Date: 15 Nov 2002 21:51:26 -0000
- Subject: gdb/830: GDB doesn't know about namespace aliases
- Reply-to: carlton at math dot stanford dot edu
>Number: 830
>Category: gdb
>Synopsis: GDB doesn't know about namespace aliases
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 15 13:58:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: carlton@math.stanford.edu
>Release: GNU gdb 2002-11-15-cvs
>Organization:
>Environment:
any
>Description:
GDB doesn't know about namespace aliases in C++.
>How-To-Repeat:
Compile this file:
namespace A {
int x = 1;
}
namespace B = A;
int main()
{
B::x;
return 0;
}
Then run GDB on it and try to print out B::x.
(gdb) b main
Breakpoint 1 at 0x80484a0: file aliases.cc, line 11.
(gdb) run
Starting program: /cartan/carlton/sync/gdb-backup/namespace/prs/aliases
Breakpoint 1, main () at aliases.cc:11
11 return 0;
(gdb) p B::x
No symbol "B" in current context.
(gdb) p 'B::x'
No symbol "B::x" in current context.
>Fix:
Having GCC generate the correct debugging info would be
a good first step.
>Release-Note:
>Audit-Trail:
>Unformatted: