Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Cc: jan.kratochvil@redhat.com
Subject: Re: [RFA] Fix PR gdb/11702, printing of static const member variables
Date: Sun, 27 Jun 2010 18:35:00 -0000	[thread overview]
Message-ID: <AANLkTinHigl1PNltdS8sgwlqYzYB9ba7WJk9dDPda1Rs@mail.gmail.com> (raw)
In-Reply-To: <20100627182442.AF5CA84613@ruffy.mtv.corp.google.com>

On Sun, Jun 27, 2010 at 11:24 AM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> This patch fixes http://sourceware.org/bugzilla/show_bug.cgi?id=11702
>
> [...]
>
> There is one outstanding issue.
> "info var static_const_member" should work, I *think*.
> Is that true?
> If so, then more work needs to be done (or even a different approach,
> but the current patch seems reasonable).
>
> symtab.c:search_symbols has this:
>
>              if (file_matches (real_symtab->filename, files, nfiles)
>                  && ((regexp == NULL
>                       || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0)
>                      && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF
>                           && SYMBOL_CLASS (sym) != LOC_UNRESOLVED
>                           && SYMBOL_CLASS (sym) != LOC_BLOCK
>>>>>                       && SYMBOL_CLASS (sym) != LOC_CONST)
>                          || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)
>                          || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF))))
>
>
> This prevents static const members from being found using the current
> implementation.  Why do we care about LOC_CONST here?
> [And, if we do, this also needs to check LOC_CONST_BYTES ...]

Sigh.
The LOC_CONST here is used to catch enums.
Maybe another symbol table cleanup is to not put enum values in
VARIABLES_DOMAIN.


  reply	other threads:[~2010-06-27 18:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-27 18:25 Doug Evans
2010-06-27 18:35 ` Doug Evans [this message]
2010-06-27 18:40   ` Doug Evans
2010-06-27 23:07     ` Doug Evans
2010-06-28 17:06     ` Tom Tromey
2010-06-28 11:02 ` Jan Kratochvil
2010-06-28 18:26   ` Doug Evans
2010-06-28 19:10     ` Jan Kratochvil
2010-06-29  9:12       ` Jan Kratochvil
2010-06-29 17:07   ` Doug Evans

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=AANLkTinHigl1PNltdS8sgwlqYzYB9ba7WJk9dDPda1Rs@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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