From: Jan Vrany <jan.vrany@fit.cvut.cz>
To: Pedro Alves <palves@redhat.com>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: [PATCH v2 0/2] MI: Add new command -complete
Date: Thu, 28 Feb 2019 10:18:00 -0000 [thread overview]
Message-ID: <08b77764c3236cf652d981b3df1e78c185f6673e.camel@fit.cvut.cz> (raw)
In-Reply-To: <f4bd9fd7-ff54-3ac2-e6e3-30a67e0233d8@redhat.com>
Hello,
On Wed, 2019-02-27 at 20:41 +0000, Pedro Alves wrote:
> I'm totally not against this new command at all, but I have to say that I'd be
> much more thrilled if someone just spent the time to make separate CLI/MI
> channels work on Windows too. The channel doesn't _have_ to be a PTY.
I know. That was my initial idea just to use named pipes year or two back
when I started to support Windows. However:
1) Completion CLI is AFAIK implemented using readline which has problems
working over pipes. Actually, I never got CLI working satisfactorily
on Windows even when I just run GDB "normally" from Windows command shell (`cmd.exe`),
let alone over pipes or alike.
2) Even if it would work, there are still other usecases which working readline
and separate CLI/MI channel on Windows would not support. For example:
(a) at the moment we use "my" frontend [1], [2] running on developers laptop
connecting over ssh to a GDB that runs on remote RISC-V machine. Essentially,
instead of lauching gdb locally (on dev's machine) like:
gdb path/to/binary
we do
ssh unleashed gdb -i=mi2 path/to/binary
In this case, opening a secondary MI channel is very problematic.
-complete command gives me at least a way to implement completion which
we found very important. There are still some quirks with that, sure,
like when you run `pi` or `shell` commands it completely ruins the MI
channel (this is a bug have not yet looked at let alone fixed but it is
on my very long list).
(b) another frontend feature asked was to provide a kind of "workspace" for GDB commands,
This is essentially a text editor in which you write ad-hoc commands (possibly
with comments) and execute them by selecting portion of a text and pressing a button
(or with a shortcut). -complete command would allow me to implement completion
in such "workspace"
(I know, this may sound like a weird UI, but this is essentially what a Smalltalk workspace
is but for GDB commands. So far users of this frontend are mainly - me including -
a small bunch of old smalltalkers working on virtual machines)
[1]: https://bitbucket.org/janvrany/jv-vdb/src/default/
[2]: https://bitbucket.org/janvrany/jv-libgdbs/src/default/
[3]: https://bitbucket.org/janvrany/jv-vdb/src/default/doc/Invoking.md
>
> On 02/26/2019 07:49 PM, Tom Tromey wrote:
> > > > > > > "Jan" == Jan Vrany <jan.vrany@fit.cvut.cz> writes:
> >
> > Jan> Are there any other GDB/MI users to comment on this? What would you
> > Jan> prefer?
> >
> > Given the lack of response, I think you should just say which you
> > prefer. If you think it would be better the "other" way, go for it.
> > Or if you'd rather the patches you already have, let me know.
>
> Jan, please consider the wildmatching case. E.g., when debugging GDB itself:
>
> (gdb) b push_bac<TAB>
> Display all 102 possibilities? (y or n)
> debug_names::offset_vec_tmpl<unsigned int>::push_back_reorder(unsigned long)
> debug_names::offset_vec_tmpl<unsigned long>::push_back_reorder(unsigned long)
> std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)
> ...
>
> The frontend needs to complete "b push_bac" -> "b push_back", and present
> the matches.
>
> But the least common denominator is not at the start of the matches
> strings. How will a frontend compute the LCD from the matches list alone?
I see. I was not aware of this behavior, thanks for pointing this out! I'll address that
in next iterations.
Thanks a lot!
Jan
next prev parent reply other threads:[~2019-02-28 10:18 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 22:30 [PATCH] " Jan Vrany
2019-01-16 9:21 ` Jan Vrany
[not found] ` <87imynm3ia.fsf@tromey.com>
2019-01-17 21:01 ` Jan Vrany
2019-01-28 12:41 ` [PATCH v2 0/2] " Jan Vrany
2019-01-28 12:41 ` [PATCH v2 1/2] MI: extract command completion logic from complete_command() Jan Vrany
2019-02-27 20:41 ` Pedro Alves
[not found] ` <9ddd13d90ac5d77067f5690743149be8a2dcdd1a.camel@fit.cvut.cz>
2019-02-13 9:24 ` [PATCH v2 0/2] MI: Add new command -complete Jan Vrany
2019-02-19 7:33 ` Jan Vrany
2019-02-20 21:20 ` Tom Tromey
2019-02-21 16:05 ` Jan Vrany
2019-02-26 19:49 ` Tom Tromey
2019-02-27 10:41 ` Jan Vrany
2019-02-27 20:41 ` Pedro Alves
2019-02-28 10:18 ` Jan Vrany [this message]
2019-03-05 20:53 ` Pedro Alves
2019-03-06 15:09 ` Jan Vrany
2019-03-06 15:45 ` Eli Zaretskii
2019-03-06 16:37 ` Jan Vrany
2019-03-06 17:36 ` Eli Zaretskii
2019-03-04 14:52 ` [PATCH v3 2/2] " Jan Vrany
2019-03-04 17:35 ` Eli Zaretskii
2019-04-03 19:23 ` Pedro Alves
2019-03-04 14:52 ` [PATCH v3 0/2] " Jan Vrany
2019-03-04 14:52 ` [PATCH v3 1/2] MI: extract command completion logic from complete_command() Jan Vrany
2019-04-18 11:59 ` [PATCH v4 " Jan Vrany
2019-04-18 11:59 ` [PATCH v4 2/2] MI: Add new command -complete Jan Vrany
2019-04-18 12:51 ` Eli Zaretskii
2019-04-18 14:15 ` Pedro Alves
2019-04-18 14:55 ` Jan Vrany
2019-04-18 16:14 ` Pedro Alves
2019-05-16 11:27 ` Jan Vrany
2019-05-16 17:31 ` Tom Tromey
2019-04-18 11:59 ` [PATCH v4 0/2] " Jan Vrany
2019-04-18 14:59 ` [PATCH v5 1/2] MI: extract command completion logic from complete_command() Jan Vrany
2019-04-18 14:59 ` [PATCH v5 2/2] MI: Add new command -complete Jan Vrany
2019-04-18 15:23 ` Eli Zaretskii
2019-04-18 14:59 ` [PATCH v5 0/2] " Jan Vrany
2019-05-30 13:49 ` [PATCH v3 2/5] Use classes to represent MI Command instead of structures Jan Vrany
2019-06-18 19:38 ` Pedro Alves
2019-05-30 13:49 ` [PATCH v3 4/5] mi/python: Allow redefinition of python MI commands Jan Vrany
2019-06-18 20:03 ` Pedro Alves
2019-05-30 13:49 ` [PATCH v3 3/5] Create MI commands using python Jan Vrany
2019-06-18 19:43 ` Pedro Alves
2019-05-30 13:49 ` [PATCH v3 0/5] " Jan Vrany
2019-06-10 12:20 ` Jan Vrany
2019-05-30 13:49 ` [PATCH v3 1/5] Use std::map for MI commands in mi-cmds.c Jan Vrany
2019-05-30 14:19 ` [PATCH v3 5/5] mi/python: Add tests for python-defined MI commands Jan Vrany
2019-06-18 20:11 ` Pedro Alves
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=08b77764c3236cf652d981b3df1e78c185f6673e.camel@fit.cvut.cz \
--to=jan.vrany@fit.cvut.cz \
--cc=gdb-patches@sourceware.org \
--cc=gdb@sourceware.org \
--cc=palves@redhat.com \
--cc=tom@tromey.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