public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@cygnus.com>
To: Yuri Karlsbrun <yurik@cognigine.com>
Cc: <insight@sources.redhat.com>
Subject: Re: Stopping target in Insight
Date: Tue, 04 Sep 2001 12:07:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0109041025410.2403-100000@makita.cygnus.com> (raw)
In-Reply-To: <NFBBICLGIMKBFLEPFFJKMEJACAAA.yurik@cognigine.com>

On Fri, 31 Aug 2001, Yuri Karlsbrun wrote:

> I did gdb port for our processor. I had no problems with implementing signal
> handler for command line version of gdb, but I don't know how to make
> Insight's console react to CTRL-C or Main window react to hitting the "STOP"
> button. More general, how to make GUI react to X-events while gdb is
> running.

Hi,

Okay, this is actually a very, very complicated thing. It should be
trivial, but it is not.

There is a hook that can be called to allow the UI to update:
ui_loop_hook. This function (if non-null) can be called from your target's
wait routine. Care should be taken that it is not called too often,
though. (Yeah, this all sucks, but it is the best we can do with some
hosts/targets.)

ui_loop_hook will return non-zero if the UI (Insight in your case) wants
to detach from the target. If Control-C works from the command-line, then
you're pretty much done, since Insight will call the appropriate target
method to do the stop.

You cannot use Control-C in a gui: Control-C has always meant "copy" to a
gui. You must use the stop button.

There is a very complicated methodology that Insight uses right now to
deal with target_wait and stops. It is probably needlessly complicated
today, but three years ago, it was needed. If you really want the yicky
details, take a peek at the comments in gdbtk-hooks.c near x_event ().

Good luck.
Keith



      reply	other threads:[~2001-09-04 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-31 17:08 Yuri Karlsbrun
2001-09-04 12:07 ` Keith Seitz [this message]

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=Pine.GSO.4.33.0109041025410.2403-100000@makita.cygnus.com \
    --to=keiths@cygnus.com \
    --cc=insight@sources.redhat.com \
    --cc=yurik@cognigine.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).