From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Re: MI: "^running" issues
Date: Thu, 06 Sep 2007 18:34:00 -0000 [thread overview]
Message-ID: <fbpflc$kd2$1@sea.gmane.org> (raw)
In-Reply-To: <9B94A61F-90AD-426F-BD4D-B8ED6B9A5AF4@apple.com>
Jim Ingham wrote:
> We got the asynchronous mode working for the Mac OS X target in the
> Apple gdb sources. It definitely took a bunch of work beyond what is
> in the current FSF sources to get all the details working (things like
> breakpoint commands that restart the target and command files and some
> other bits like that needed attending to...) It wasn't deadly hard to
> do, though.
>
> We use it mostly so that Xcode can query the target's state at any
> point - basically a backstop when it looks like maybe the UI and gdb
> have gotten out of sync. That way you can always unambiguously get
> the tri-state answer - the target's stopped; the target's running;
> gdb's gone south. This is actually pretty useful to have around,
> though in a perfect world would not be necessary...
I see. So, the problem is that in real world those "^running" and
"*stopped" are not necessary always output when needed, so you can
get out of sync?
> We also use -exec-interrupt. It's certainly true that you can achieve
> the same thing by sending ^C to the target, but it's much more regular
> to do everything you're doing with the target through the same control
> channel. And of course, this moves to gdb the knowledge of any
> funniness with interrupting a running program - which is where it
> belongs.
Hmm, if you send ^C to gdb, then gdb can handle interrupting the program
just fine.
> Another stronger reason why async was originally done was the
> experience of merging gdb with Tcl/Tk for the Insight debugger. One
> of the big reasons for the instability of that project is that when
> the target is running, gdb is blocked, so if you want to service other
> events - like window system events in the case of Insight - you've got
> no good way to do that. We ended up having to run a timer and try to
> service events in the timer interrupt - a dubious practice at best.
>
> It's possible to run the interpreter in a separate thread, and let it
> and gdb communicate through some side channel. But most interpreters
> have some mechanism for handling events, and it is much cleaner to
> have gdb be just another event source.
I presume this is only relevant when gdb is combined with some other
code in the same process? Last time I've asked about this, I was
told that it not supported, because gdb does fancy things with signals,
or something like that.
- Volodya
next prev parent reply other threads:[~2007-09-06 18:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-04 12:53 Vladimir Prus
2007-09-05 5:24 ` Nick Roberts
2007-09-05 5:39 ` Vladimir Prus
2007-09-05 6:25 ` Nick Roberts
2007-09-05 17:27 ` Eli Zaretskii
2007-09-05 18:42 ` Vladimir Prus
2007-09-06 6:46 ` Eli Zaretskii
2007-09-06 7:20 ` Vladimir Prus
2007-09-06 8:12 ` Fabian Cenedese
2007-09-06 8:24 ` Mark Kettenis
2007-09-06 11:39 ` Nick Roberts
2007-09-06 21:18 ` Vladimir Prus
2007-09-06 14:38 ` Bob Rossi
2007-09-06 15:06 ` Vladimir Prus
2007-09-06 19:34 ` Eli Zaretskii
2007-09-06 19:38 ` Vladimir Prus
2007-09-07 9:04 ` Eli Zaretskii
2007-09-07 9:15 ` Nick Roberts
2007-09-07 10:59 ` Vladimir Prus
2007-09-07 18:06 ` Eli Zaretskii
2007-09-07 18:18 ` Daniel Jacobowitz
2007-09-07 18:24 ` Eli Zaretskii
2007-09-08 0:30 ` Daniel Jacobowitz
2007-09-08 3:45 ` Nick Roberts
2007-09-08 7:21 ` Daniel Jacobowitz
2007-09-09 20:10 ` Nick Roberts
2007-09-07 8:11 ` Nick Roberts
2007-09-06 15:03 ` Jim Blandy
2007-09-06 18:08 ` Jim Ingham
2007-09-06 18:34 ` Vladimir Prus [this message]
2007-09-06 18:41 ` Jim Ingham
2007-09-06 18:48 ` Vladimir Prus
2007-09-07 5:54 ` André Pönitz
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='fbpflc$kd2$1@sea.gmane.org' \
--to=ghost@cs.msu.su \
--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