From: Jan Vrany <jan.vrany@fit.cvut.cz>
To: Joel Brobecker <brobecker@adacore.com>,
Jonah Graham <jonah@kichwacoders.com>
Cc: "Tom Tromey" <tom@tromey.com>,
"gdb@sourceware.org" <gdb@sourceware.org>,
"André Pönitz" <apoenitz@t-online.de>
Subject: Re: MI3 and async notifications
Date: Mon, 17 Jun 2019 20:58:00 -0000 [thread overview]
Message-ID: <a6128e1d7f56d0f5cfcb21c3cb88d8f73c10883a.camel@fit.cvut.cz> (raw)
In-Reply-To: <20190617204515.GB6859@adacore.com>
On Mon, 2019-06-17 at 16:45 -0400, Joel Brobecker wrote:
> > > Jonah, I was about to ask the same. I understand that you need to know
> > > which breakpoint has been inserted by given command, but this
> > > if we respond with something like
> > >
> > > 1-break-insert main
> > > =breakpoint-created,bkpt={number="1",type=...}
> > > 1^done,bkpt-number=1
> > >
> > > then you just search for breakpoint with that id, no? Given that MI
> > > guarantees that =breakpoint-created arrives before ^done reply to command.
> > > Am I missing something?
> > >
> >
> > No you aren't missing anything. That would be a perfectly acceptable
> > solution for CDT.
> >
> > There would still be some other new logic needed for CDT, we would
> > still have to store all the =breakpoint-created if there is a
> > -break-insert active and then process all of them when the ^done is
> > received. However that seems fairly reasonable.
>
> Do we even need the bkpt-number=1 attribute in the "done" command?
> The notification includes that information, so the GUI should have
> enough info from there to determine which UI element to update, right?
>
I think so. Imagine you have a UI with breakpoint list and there's
an "Add Breakpoint" button. When "Add Breakpoint" is pressed, user
fills location, press "OK", new breakpoint is added and
*UI pre-selects just added breakpoint*. This is IMO sensible UI behavior.
Now, when you press "OK" to add the breakpoint on a location, behind the scenes
frontend issues -break-insert command and waits for ^done confirmation.
But as Jonah mentioned, another breakpoint could be inserted meanwhile so
you'd get something like this on MI channel.
10-break-insert main
=breakpoint-created,bkpt={number="1",type=...<some unrelated breakpoint from CLI or script>}
=breakpoint-created,bkpt={number="2",type=...<the breakpoint on main you just requested>}
=breakpoint-created,bkpt={number="3",type=...<some unrelated breakpoint from CLI or script>}
10^done
Now, if ^done response would not contain bkpt-number=2 attribute, how would you know which
is the breakpoint you need to pre-select in the UI?
Jan
next prev parent reply other threads:[~2019-06-17 20:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 21:19 Jan Vrany
2019-06-10 23:23 ` Jonah Graham
2019-06-11 8:50 ` Jan Vrany
2019-06-11 13:37 ` Jonah Graham
2019-07-05 20:00 ` Pedro Alves
2019-07-05 21:58 ` Jonah Graham
2019-06-15 14:34 ` Tom Tromey
2019-06-17 10:53 ` Jan Vrany
2019-06-17 12:11 ` Jonah Graham
2019-06-17 12:14 ` Joel Brobecker
2019-06-17 12:26 ` Jonah Graham
2019-06-17 12:56 ` Joel Brobecker
2019-06-17 13:12 ` Jan Vrany
2019-06-17 13:23 ` Jonah Graham
2019-06-17 20:45 ` Joel Brobecker
2019-06-17 20:58 ` Jan Vrany [this message]
2019-06-17 21:50 ` Jonah Graham
2019-06-17 13:12 ` Jonah Graham
2019-06-17 19:52 ` André Pönitz
2019-06-18 3:14 ` Simon Marchi
2019-06-18 20:38 ` Jan Vrany
2019-06-19 15:29 ` Simon Marchi
2019-06-19 20:58 ` Jan Vrany
2019-06-20 15:31 ` Simon Marchi
2019-06-20 20:46 ` Jan Vrany
2019-07-05 19:35 ` 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=a6128e1d7f56d0f5cfcb21c3cb88d8f73c10883a.camel@fit.cvut.cz \
--to=jan.vrany@fit.cvut.cz \
--cc=apoenitz@t-online.de \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=jonah@kichwacoders.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).