Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Chris Moller <cmoller@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: pr 11543 using-directive does not autocomplete
Date: Tue, 27 Apr 2010 20:32:00 -0000	[thread overview]
Message-ID: <20100427203207.GA12825@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <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


  reply	other threads:[~2010-04-27 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 17:58 Chris Moller
2010-04-27 20:32 ` Jan Kratochvil [this message]
2010-04-27 20:42   ` Chris Moller
2010-04-27 21:10   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100427203207.GA12825@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=cmoller@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox