From: Keith Seitz <keiths@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch 0/3] Re: [RFA] c++/11734 revisited (and c++/12273)
Date: Thu, 10 Feb 2011 21:45:00 -0000 [thread overview]
Message-ID: <4D545C68.3010102@redhat.com> (raw)
In-Reply-To: <20110206224548.GA5000@host1.dyn.jankratochvil.net>
I apologize to everyone, my Internet connectivity died on me last week,
and I've only just had service restored this morning...
Honestly, I wasn't trying to ignore anyone. [Although I would love to be
able to ignore linespec.c! :-)]
On 02/06/2011 02:45 PM, Jan Kratochvil wrote:
> I do not fully understand the reasons for part (b). The old code is not nice
> but IMO neither is the new code (already checked in by the physname patch) due to
> the linespec.c caller.
One of the intents behind the patchset was to make the code behave the
way it was documented. Forcing linespecs that would normally be handled
by decode_compound into decode_variable based on the existence of
overload information was (and still is) just plain wrong to me.
Mind you, that doesn't necessarily mean that decode_compound isn't evil
or superfluous.
> Moreover the new code has shown its regressions.
I'd like to make clear the meaning of the word "regression" in this
context. Are we experiencing some fallout in linespecs because of this?
Yes, we are. Are these bugs introduced by the patch? No. These are bugs
that have existed for many years, but since the code did not do what the
comments said it should do, these bugs lay hidden all this time inside
decode_compound. And you have discovered another one (more on this
later). And I found one more yesterday, too.
I did not set out to rewrite linespecs, just make them work with the
least amount of invasion. I don't like rewriting tons of fragile,
relatively undocumented code to fix a bug (even a non-trivial one)
unless it is known/understood a priori that a redesign/rewrite is
expected or wanted.
> If the code should be nice I tried archer-jankratochvil-linespec where
> linespec is based on the expressions. Noted by Daniel Jacobowitz before:
> http://sourceware.org/ml/gdb-patches/2009-11/msg00266.html
I would love to see us allocate time to someone to finish the work on
this approach. It would be a huge maintenance win -- even if it comes
with its own set of problems or regressions. O:-) [That's the cost of
progress IMO.]
> That is in general I would be either for futher not-nice fixing up the
> pre-physname code or for the expression way like archer-jankratochvil-linespec
> does. Still at the moment your patchset gives the best user experience, just
> it is a new untested code which does not make it nice anyway.
I'm not entirely sure if I need to respond to your other messages on
this topic -- I'm *way* out of context by now, but please ping me on IRC
or email if there is something specific you'd like me to address.
Returning to the bug you discovered ("regression"), I do want to mention
why decode_variable works and decode_compound does not. [Reminder: this
is demonstrated by your namespace addition to the pr11734.exp test case.]
The answer is actually really simple: deocde_variable calls
lookup_symbol with a valid block; decode_compound does not. Passing
"get_selected_block (0)" to lookup_symbol [more or less] fixes the
problems. [Follow-on patch to fix the fallout of that once I know what
direction I'm being asked to go with this.]
I have expanded the original pr11734.exp test case even further by
adding another namespace and class inside it, e.g., "A::B::MyClass", and
this exposed another place where lookup_symbol was not getting a valid
block to work with. Again, trivially fixed.
So, I'm not quite sure where I stand with this 11734/12273 (and other
related bugs)... What do you want me to do?
Keith
next prev parent reply other threads:[~2011-02-10 21:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 0:50 [RFA] c++/11734 revisited Keith Seitz
2010-12-09 4:02 ` Eli Zaretskii
2010-12-09 21:45 ` Tom Tromey
2010-12-09 21:52 ` Jan Kratochvil
2010-12-10 15:21 ` Keith Seitz
2010-12-14 20:03 ` Keith Seitz
2011-01-24 18:15 ` Jan Kratochvil
2011-01-26 23:14 ` Jan Kratochvil
2011-02-06 22:04 ` Jan Kratochvil
2011-02-06 22:45 ` [patch 0/3] Re: [RFA] c++/11734 revisited (and c++/12273) Jan Kratochvil
2011-02-08 21:42 ` Tom Tromey
2011-02-10 21:45 ` Keith Seitz [this message]
2011-02-17 18:37 ` Keith Seitz
2011-02-18 3:24 ` Keith Seitz
2011-02-21 11:41 ` Jan Kratochvil
2011-02-24 20:41 ` Keith Seitz
2011-02-27 21:18 ` Jan Kratochvil
2011-03-01 22:00 ` Keith Seitz
2011-03-14 7:52 ` Jan Kratochvil
2011-03-15 19:03 ` Keith Seitz
2011-03-16 8:28 ` Jan Kratochvil
2011-03-16 13:58 ` Tom Tromey
2011-03-16 23:20 ` Keith Seitz
2011-03-17 3:19 ` Joel Brobecker
2011-03-17 9:11 ` Jan Kratochvil
2011-03-17 13:21 ` Joel Brobecker
2011-02-06 22:46 ` [patch 3/3] Various linespec fixups [Re: [RFA] c++/11734 revisited] Jan Kratochvil
2011-02-06 22:46 ` [patch 1/3] revert physname part (b) " Jan Kratochvil
2011-02-06 22:46 ` [patch 2/3] Keith's psymtabs fix " Jan Kratochvil
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=4D545C68.3010102@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).