From: Bob Rossi <bob_rossi@cox.net>
To: gdb@sourceware.org
Subject: Re: asynchronous MI output commands
Date: Sun, 07 May 2006 20:42:00 -0000 [thread overview]
Message-ID: <20060507004518.GM25114@brasko.net> (raw)
In-Reply-To: <20060506203741.GA29439@nevyn.them.org>
> > I was hoping to tell the front end if the command was asynchronous or
> > not. There is a use in knowing if the command is asynchronous or not.
> > First of, if the command is asynchronous then I don't have to probe the
> > parse tree to determine if it represents the results to say,
> > -file-list-exec-source-file or some other commands. I know when building
> > the ADT for the FE that it's an asynchronous command, and that limits
> > the amount of probing in the parse tree I have to do.
>
> That's not the difference between synchronous and asynchronous, in MI:
> think of it instead as the difference between synchronous and
> everything else. A synchronous response from MI corresponds to a
> front-end command. Everything else corresponds to other state changes,
> which may be related to some command or not, in a less than obvious
> way.
OK, with that information, I see it is impossible to tell just from
looking at the MI output, to determine if the command is synchronous
or not. Look below for a solution to this problem for me.
> You can easily categorize a ^done or ^error response as synchronous.
> Other responses are more difficult to associate with a command, because
> they weren't directly issued as the response to a command.
>
> > It could output
> >
> > -file-list-exec-source-file
> > %-file-list-exec-source-file
> > ^done,line="26",file="test.c",fullname="/home/bob/cvs/cgdb/cgdb.mi/builddir/test.c"
> > (gdb)
>
> Accomplishing what? This is synchronous. It's a response to the
> previously issued command. The front end knows exactly what its
> previously issued command was, I hope.
Hmmm. That's interesting, I was hoping to not need to know what the
input command was in order to parse and build an ADT for the output. In
general, I think it would be appropriate if the MI output described
itself well enough that no other information was needed to understand
it, including the MI intput command.
I think I could accomplish this task, as well as understand what is
synchronous and asynchronous by adding a little bit of output to each
synchronous command like shown above. Showing the MI command that GDB
is responding to in the MI output would do just the trick. Would a
simple patch that changed the output like this be welcome?
from
result-record ==>
[ token ] "^" result-class ( "," result )* nl
to something like
result-record ==>
[ token ] mi-input-command "^" result-class ( "," result )* nl
The above is just a simple suggestion to show the goal. I'm not sure if
that would be the best place to change the code. I'd like to do it in a
way that didn't break the MI output syntax.
Thanks,
Bob Rossi
next prev parent reply other threads:[~2006-05-07 0:44 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-06 1:26 Bob Rossi
2006-05-06 1:59 ` Daniel Jacobowitz
2006-05-06 2:48 ` Bob Rossi
2006-05-06 3:37 ` Nick Roberts
2006-05-06 15:20 ` Bob Rossi
2006-05-06 4:06 ` Daniel Jacobowitz
2006-05-06 4:05 ` Daniel Jacobowitz
2006-05-06 11:53 ` Bob Rossi
2006-05-06 12:06 ` Bob Rossi
2006-05-06 3:14 ` Bob Rossi
2006-05-06 4:04 ` Nick Roberts
2006-05-06 11:49 ` Daniel Jacobowitz
2006-05-06 11:50 ` Bob Rossi
2006-05-06 16:52 ` Daniel Jacobowitz
2006-05-06 19:45 ` Bob Rossi
2006-05-06 20:37 ` Daniel Jacobowitz
2006-05-07 0:44 ` Bob Rossi
2006-05-07 20:35 ` Daniel Jacobowitz
2006-05-07 20:42 ` Bob Rossi [this message]
2006-05-07 22:01 ` Daniel Jacobowitz
2006-05-08 1:22 ` Bob Rossi
2006-05-08 2:03 ` Daniel Jacobowitz
2006-05-09 21:48 ` Bob Rossi
2006-05-08 6:38 ` Nick Roberts
2006-05-08 11:28 ` Bob Rossi
2006-05-08 1:26 ` Bob Rossi
2006-05-06 11:51 ` Bob Rossi
2006-05-06 3:27 ` Nick Roberts
2006-05-06 16:40 ` Bob Rossi
[not found] <1147034156.28828.ezmlm@sourceware.org>
2006-05-07 21:27 ` Bjarke Viksoe
2006-05-07 21:41 ` Daniel Jacobowitz
2006-05-10 12:43 ` Vladimir Prus
2006-05-07 22:30 Bjarke Viksoe
2006-05-07 22:50 ` Daniel Jacobowitz
2006-05-08 0:36 ` Bjarke Viksoe
2006-05-08 1:52 ` Daniel Jacobowitz
2006-05-09 9:46 Alain Magloire
2006-05-10 22:15 Alain Magloire
2006-05-11 3:41 ` Bob Rossi
2006-05-11 8:58 ` Vladimir Prus
2006-05-11 10:48 ` Bob Rossi
2006-05-11 10:52 ` Vladimir Prus
2006-05-11 11:14 ` Bob Rossi
2006-05-11 12:50 ` Vladimir Prus
2006-05-11 14:50 ` Bob Rossi
2006-05-11 15:02 Alain Magloire
2006-05-11 15:42 ` Bob Rossi
2006-05-11 16:40 ` Jim Ingham
2006-05-11 17:03 ` Daniel Jacobowitz
2006-05-11 17:35 ` Jim Ingham
2006-05-11 19:24 ` Bob Rossi
2006-05-11 19:25 ` Jim Ingham
2006-05-12 0:19 Alain Magloire
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=20060507004518.GM25114@brasko.net \
--to=bob_rossi@cox.net \
--cc=gdb@sourceware.org \
/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