This is the mail archive of the gdb-patches@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]

Re: pr 11543 using-directive does not autocomplete


On 04/27/10 16:32, Jan Kratochvil wrote:
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:

I /thought/ that was too easy. :-)


Okay, I'll go hack on it some more,

Thanks,

Chris

------------------------------------------------------------------------------
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


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