From: Simon Marchi <simon.marchi@polymtl.ca>
To: Bob Rossi <bob@brasko.net>
Cc: Marc Khouzam <marc.khouzam@ericsson.com>, gdb@sourceware.org
Subject: Re: GDB/MI questions
Date: Thu, 19 Jan 2017 16:15:00 -0000 [thread overview]
Message-ID: <a236fdfb14ff5042cdc64f9f187fb5f9@polymtl.ca> (raw)
In-Reply-To: <20170119160318.GD6289@xubuntu.brasko.net>
On 2017-01-19 11:03, Bob Rossi wrote:
> On Thu, Jan 19, 2017 at 10:47:21AM -0500, Simon Marchi wrote:
>> On 2017-01-19 10:11, Bob Rossi wrote:
>> >I'm just trying to provide the same functionality I did when I was using
>> >annotations. This was one of the noted differences.
>> >
>> >Since the MI differs in this area, I've done as you suggested and
>> >that works well. I guess I'll see if there are any downsides here.
>> >
>> >Thanks,
>> >Bob Rossi
>>
>> From experience (I'd like to be proven wrong), it will be very
>> difficult to
>> accurately re-create the gdb console "experience" when using MI. The
>> commands that should or should not repeat is just one example.
>> Consider
>> history, tab completion, readline bindings (e.g. ctrl-R), pagination,
>> etc.
>> How does that work with the MI version of cgdb?
>
> CGDB links to readline so the interaction is all very similar.
I'm curious how completion works currently (with annotations) for
example. When the user presses tab, does readline call a callback that
you specified in CGDB in order to get the completion candidates? Then,
you get that information from gdb and return it? If so, how do you get
it? The "complete" command?
If it already works fine like that, then I guess it can work
>> If I understand correctly how annotations work, when the user types,
>> they
>> are interacting directly with gdb. So when they press tab to get a
>> completion, it's handled by gdb. With MI, the user interacts with the
>> front-end, which in turns talk to gdb. So the front-end would have to
>> re-implement all those features.
>
> Yes, CGDB has supported tab completion for a long time.
>
>> This is why gdb has this "new-ui" command that Pedro mentioned.
>> Instead of
>> trying to emulate a gdb console, the front-end can start GDB in
>> standard
>> console mode (redirecting its i/o to an embedded terminal emulator)
>> and open
>> a channel on the side with new-ui for MI commands. This way, when
>> using the
>> console, the user interacts directly with gdb, and gets the real
>> console
>> experience.
>
> I might give that a try. However, since CGDB already has great terminal
> emulation, it's not a huge deal. The other downside is, CGDB works with
> lots of GDB's. Using this feature leaves behind many GDBs. Or I'd have
> to support two modes. Yuck.
You are right, that's the downside of newer stuff...
next prev parent reply other threads:[~2017-01-19 16:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170119031445.GA24616@xubuntu.brasko.net>
2017-01-19 14:31 ` Marc Khouzam
2017-01-19 14:52 ` Bob Rossi
2017-01-19 15:06 ` Pedro Alves
2017-01-19 15:11 ` Bob Rossi
2017-01-19 15:24 ` Marc Khouzam
2017-01-19 15:40 ` Jan Vrany
2017-01-19 16:17 ` Pedro Alves
2017-01-19 15:47 ` Simon Marchi
2017-01-19 16:03 ` Bob Rossi
2017-01-19 16:15 ` Simon Marchi [this message]
2017-01-19 16:27 ` Bob Rossi
2017-01-19 16:33 ` Pedro Alves
2017-01-19 14:43 ` 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=a236fdfb14ff5042cdc64f9f187fb5f9@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=bob@brasko.net \
--cc=gdb@sourceware.org \
--cc=marc.khouzam@ericsson.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