From: Nick Roberts <nickrob@snap.net.nz>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [MI/RFC] Emit ^running via observer.
Date: Sat, 28 Jun 2008 10:16:00 -0000 [thread overview]
Message-ID: <18534.1805.519374.851454@kahikatea.snap.net.nz> (raw)
In-Reply-To: <200806280949.09304.vladimir@codesourcery.com>
> > Async mode decouples the output from the input. This allows a CLI command
> > that executes the inferior to (indirectly) generate MI output. That's why
> > I was interested in async mode and that's what this test is for. The work
> > has actually been done for more general reasons, such as non-stop mode. I
> > think the MI output is just a fortunate side-effect.
>
> Err, async mode does one thing -- allows commands to be processed while
> inferiour is still running. Unless you explicitly make use of this
> functionality, there's no difference from sync mode. (Of course, there's a
> bunch of checks for target_can_async_p in GDB code, so some difference in
> output is possible, but in theory there should be none). I don't know what
> you mean by decoupling output from the input -- for example, then *running
> notification is emitted for CLI just fine, and this does not require async
> mode.
This is my understanding:
*running is presumably an observer that is only set in MI and fires whenever
execution (re)starts. It doesn't depend on the (immediate) interpreter. In
sync mode when a CLI command starts execution, GDB waits for it to stop before
switching back to MI and returning to the event loop. In async mode it
doesn't, and when inferior_event_handler runs after execution has stopped,
GDB has already switched back to MI and so prints MI output.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2008-06-28 9:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 22:01 Vladimir Prus
2008-06-20 6:53 ` Nick Roberts
2008-06-25 15:04 ` Vladimir Prus
2008-06-26 13:33 ` Nick Roberts
2008-06-26 18:54 ` Vladimir Prus
2008-06-26 19:34 ` Daniel Jacobowitz
2008-06-28 11:34 ` Vladimir Prus
2008-06-28 16:35 ` Vladimir Prus
2008-06-27 6:58 ` Nick Roberts
2008-06-27 11:58 ` Vladimir Prus
2008-06-28 5:49 ` Nick Roberts
2008-06-28 9:41 ` Vladimir Prus
2008-06-28 10:16 ` Nick Roberts [this message]
2008-06-28 10:44 ` Vladimir Prus
2008-06-29 2:40 ` Nick Roberts
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=18534.1805.519374.851454@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.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