public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Stopping target in Insight
@ 2001-08-31 17:08 Yuri Karlsbrun
  2001-09-04 12:07 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Yuri Karlsbrun @ 2001-08-31 17:08 UTC (permalink / raw)
  To: insight

Hi,
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.

Thanks in advance,

Yuri Karlsbrun
Cognigine Corp.,
6120 Stevenson Blvd., Fremont, CA 94538
(510)743-4963 direct phone
(510)743-4910 fax

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stopping target in Insight
  2001-08-31 17:08 Stopping target in Insight Yuri Karlsbrun
@ 2001-09-04 12:07 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2001-09-04 12:07 UTC (permalink / raw)
  To: Yuri Karlsbrun; +Cc: insight

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-04 12:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-31 17:08 Stopping target in Insight Yuri Karlsbrun
2001-09-04 12:07 ` Keith Seitz

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).