public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: Keith Seitz <kseitz@firetalk.com>
Cc: insight@sourceware.cygnus.com
Subject: Re: SIGINT handling for rdi target
Date: Thu, 24 Aug 2000 09:17:00 -0000	[thread overview]
Message-ID: <20000824111745.A9462@visi.com> (raw)
In-Reply-To: <39A54367.462E895C@firetalk.com>

On Thu, Aug 24, 2000 at 08:46:47AM -0700, Keith Seitz wrote:

> > I'll look into it.  I'm the one who submitted the patches to
> > gdb to make this target interruptible, so it's probably
> > something I did wrong.
> 
> It's not likely that you broke it, per se. I don't ever remember doing
> anything like this for RDI before. In any case, this should still work
> on unix (which uses an itimer), I should think...

I just tried it under Linux, and verified that sending a SIGINT
to gdb interrupts the target and doesn't lock up the GUI
unless I wait too long to acknowlege the popup dialog box and
end up with the watchdog timer on the target timing out.  Under
Cygwin, it sometimes locks up the GUI, and sometimes not.

[The lock-up when the target watchdog timer times out is
because The rdi library is sort of fragile. It doesn't
tolerate situations where it doesn't get an expected response
from the target. That's been annoying me for quite a while, but
not enough that I've actually fixed the problem.]

However, under both Cygwin and Linux the GUI is locked _until_
I send a SIGINT, so there's no way to actually click the stop
button.  Even if there were, I'm not sure it would do anything
useful.

The problem is that there's a routine down inside the rdi
library called angel_RDI_ExecuteOrStep.  When you do a "step"
or "cont" this routine ends up getting called, and it doesn't
return until the target stops or it gets a SIGINT. The rdi
library installs its own SIGINT handler which sets a flag to
tell angel_RDI_ExecuteOrStep() to interrupt the target, clean
up, and return.  This sigint handler is only active while the
target is executing.

The first problem is keeping the GUI alive while
angel_RDI_ExecuteOrStep() is waiting for the target to stop.

The next problem is getting target_stop() to set the same flag
that is set by the rdi sigint handler routine in order to tell 
angel_RDI_ExecuteOrStep() to stop the target and return.  I've
got to go look and see what target_stop() actually does.

-- 
Grant Edwards
grante@visi.com

       reply	other threads:[~2000-08-24  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20000823155500.A19850@visi.com>
     [not found] ` <39A51866.8752490A@firetalk.com>
     [not found]   ` <20000824104015.B9059@visi.com>
     [not found]     ` <39A54367.462E895C@firetalk.com>
2000-08-24  9:17       ` Grant Edwards [this message]
2000-08-24  9:33         ` Keith Seitz

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=20000824111745.A9462@visi.com \
    --to=grante@visi.com \
    --cc=insight@sourceware.cygnus.com \
    --cc=kseitz@firetalk.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).