From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: dan@www.cgsoftware.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Improve completion of locations
Date: Sun, 06 May 2001 10:04:00 -0000 [thread overview]
Message-ID: <9003-Sun06May2001200416+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <Pine.LNX.4.33.0105061230090.31492-100000@www.cgsoftware.com>
> Date: Sun, 6 May 2001 12:38:00 -0400 (EDT)
> From: Daniel Berlin <dan@www.cgsoftware.com>
>
> At 4am in the morning, everything seems miserable.
> :)
I can imagine ;-)
> > Note that Readline has its own ideas about breaking user input into
> > ``words'', and it does that even before our completion functions are
> > called. So, in contrast to our code which parses the full location spec,
> > completion cannot be much smarter than it currently is, because Readline
> > doesn't give us a chance to be smarter. Most of the time I debugged this
> > code went into trying to get along with Readline's idiosyncrasies.
>
> Yeah, I figured as much.
>
> Still, wouldn't it be easier to just say something like:
>
> if (filename_spec_p(userstring))
> else if (symbol_location_spec_p(userstring))
Indeed, it would be great. But this kind of stuff will only be
possible if several functions in symtab.c and wherenot which do their
own ``parsing'' will all be rewritten to use those new functions you
suggest. If this is the plan, I'm with you all the way, I'm far from
happy wading through all that code each time I want to understand what
the heck is it doing, and inventing my own code to work around any of
its misfeatures.
Also, AFAICS there's no formal definition of the location syntax
accepted by GDB, so you'd probably need to set the rules as you go.
Which might be a Good Thing in and of itself.
Finally, if we want to solve this in a reliable way in the context of
completion, I think there's a real need to ask Readline for more hooks
than what it currently provides. One thing that is sorely needed is
the way for GDB to tell Readline to use the right word-break
characters _before_ it breaks the line into ``words'' and calls the
completer.
> We have like the same type of parsing going on in quite a few places, and
> it just all seems completley ad-hoc.
Yes. What's more, almost any more-or-less reasonable change you do in
that ad-hoc code won't change the end result except in a few marginal
and hard-to-come-by cases, so it is very hard to debug.
next prev parent reply other threads:[~2001-05-06 10:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-05 10:59 Eli Zaretskii
2001-05-05 11:26 ` Daniel Berlin
2001-05-05 23:15 ` Eli Zaretskii
2001-05-06 0:10 ` Daniel Berlin
2001-05-06 2:05 ` Eli Zaretskii
2001-05-06 9:38 ` Daniel Berlin
2001-05-06 10:04 ` Eli Zaretskii [this message]
2001-05-06 3:19 ` Eli Zaretskii
2001-05-08 13:32 ` Elena Zannoni
2001-05-09 3:46 ` Eli Zaretskii
2001-05-11 21:17 ` Elena Zannoni
2001-05-11 23:03 ` Eli Zaretskii
2001-05-14 13:39 ` Elena Zannoni
2001-05-25 1:39 ` Eli Zaretskii
2001-06-04 23:15 ` Eli Zaretskii
2001-06-05 6:10 ` Fernando Nasser
2001-06-05 10:58 ` Eli Zaretskii
2001-06-10 8:46 ` Fernando Nasser
2001-06-10 9:14 ` Daniel Berlin
2001-06-10 9:43 ` Fernando Nasser
2001-06-11 9:09 ` Eli Zaretskii
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=9003-Sun06May2001200416+0300-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=dan@www.cgsoftware.com \
--cc=gdb-patches@sources.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