Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Smith <psmith@gnu.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb@sourceware.org
Subject: Re: GDB syntax error if class members overlap C++ header file names
Date: Tue, 13 Feb 2018 16:52:00 -0000	[thread overview]
Message-ID: <1518540745.1130.14.camel@gnu.org> (raw)
In-Reply-To: <dd1db98b3b460fe3d9fe7ab39499a701@polymtl.ca>

On Tue, 2018-02-13 at 10:52 -0500, Simon Marchi wrote:
> On 2018-02-13 10:37, Paul Smith wrote:
> > Has anyone had any thoughts about
> > https://sourceware.org/bugzilla/show_bug.cgi?id=22231
> > 
> > This is a really unfortunate bug, because there are so many useful
> > symbol names which are also C++ header files!  Just ran into this
> > again with "queue".
> 
> Hi Paul,
> 
> This looks like an issue that has been fixed recently, but it's not
> in 8.1, only master.
> 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5
> 9498c305e6f1db2a1ed8d44cb58f0d24ec092fe
> 
> Can you verify if it works for you?

I ran applied SHA 59498c305e6f1db2a1ed8d44cb58f0d24ec092fe as a patch
to 8.1 (but had to toss the changelog diffs... yet another reason to
stop including them as source code artifacts...) and that does fix the
main problem... awesome!

There's still a weird error if there's no symbol in context; my first
example the the bug still prints "syntax error in expression, near `'"
rather than something more reasonable such as "No symbol "memory" in
current context".  That's probably still something that should be
fixed, but it's basically an error messaging issue.

However, if there's a "memory" symbol in the current context (either
implicitly as in we're in a method and the class has a "memory" member,
or using something like foo.memory) it will find and print the right
thing.

So that's excellent!  Thanks.


      reply	other threads:[~2018-02-13 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 15:37 Paul Smith
2018-02-13 15:52 ` Simon Marchi
2018-02-13 16:52   ` Paul Smith [this message]

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=1518540745.1130.14.camel@gnu.org \
    --to=psmith@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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