Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Bob Rossi <bob_rossi@cox.net>
Cc: Alain Magloire <alain@qnx.com>,  gdb@sources.redhat.com
Subject: Re: asynchronous MI output commands
Date: Thu, 11 May 2006 08:58:00 -0000	[thread overview]
Message-ID: <200605111008.15930.ghost@cs.msu.su> (raw)
In-Reply-To: <20060511023711.GB3727@brasko.net>

On Thursday 11 May 2006 06:37, Bob Rossi wrote:

> > > It's hard to believe that response from MI can be useful without
> > > knowing the
> > > last issued command. Say, response from -data-evaluate-expression is
> > > useless if you don't know what part of frontend wants that data --
> > > evaluating expression is used in many use cases. So, you need to
> > > associate extra data with commands anyway.
> >
> > I agree, the example that comes to my mind is "next", "step", "finish",
> > "continue" etc ...  To do some optimization front-ends will probably need
> > to know the last command issue (for example clearing all the variable
> > state in a variable view for "continue").
>
> I see the point, however, how do you know if the user typed continue? I
> allow the user to have access to the console, and by doing so, I can't
> make any assumptions on what GDB is doing.

The "continue" command always produces

  *stopped

response and that's mostly enough for frontend.



>
> > Maybe I'm mistaken but I have the impression, looking at the thread, some
> > folks are confusing OOB and synchronous response that comes after issuing
> > a command.
>
> I'm hopefull not confusing them, but maybe. For synchronous commands, I
> just think it's a little ugly that you need the MI input command to
> determine what an MI output command is.

What do you mean by "determine what an MI output command is"? You certainly 
can parse the response into DOM-like tree without knowing the output command.
If you want to create C data structures for each response, then yes, you'd 
need to know the exact type of the last command. But then, I'm not sure why 
you want to use C data structures. In KDevelop, the DOM is fully dynamic and 
that works just fine, for example:

    const GDBMI::Value& children = r["children"];

    for (unsigned i = 0; i < children.size(); ++i)
    {
        QString exp = children[i]["exp"].literal();


If you have specific structures for each response this won't be very much 
simpler.

> For asynchronous commands, there is simply no way to know what you are
> looking at AFAIK. 

What exactly do you want to know that's not obtained from parse tree?


- Volodya

 


  reply	other threads:[~2006-05-11  6:08 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 22:15 Alain Magloire
2006-05-11  3:41 ` Bob Rossi
2006-05-11  8:58   ` Vladimir Prus [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2006-05-12  0:19 Alain Magloire
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-09  9:46 Alain Magloire
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
     [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-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
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

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=200605111008.15930.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=alain@qnx.com \
    --cc=bob_rossi@cox.net \
    --cc=gdb@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