This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: pr 11543 using-directive does not autocomplete
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Chris Moller <cmoller at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 27 Apr 2010 22:32:08 +0200
- Subject: Re: pr 11543 using-directive does not autocomplete
- References: <4BD725BC.2090709@redhat.com>
On Tue, 27 Apr 2010 19:58:20 +0200, Chris Moller wrote:
> Attached patch fixes this, but here's a question: Is it possible to
> have multiple name qualifications like "A::B::whatever"?
Yes.
Unfortunately your patch has a regression even for single-namespace case:
------------------------------------------------------------------------------
namespace A
{
int variableq = 1;
namespace B
{
int variabler = 2;
}
}
int
main (void)
{
return A::variableq + A::B::variabler;
}
------------------------------------------------------------------------------
(gdb) p var<tab>
->
(gdb) p variableq
No symbol "variableq" in current context.
In this case current FSF GDB HEAD behavior is the only correct one.
The completion patch must follow the existing / non-existing "using namespace"
directives. The patch must be integrated with `struct using_direct' lists
tracked by Sami Wagiaalla's using_directive infrastructure.
Thanks for picking this up.
Thanks,
Jan