This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SIGINT handling for rdi target


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]