From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: Keith Seitz Cc: insight@sourceware.cygnus.com Subject: Re: SIGINT handling for rdi target Date: Thu, 24 Aug 2000 09:17:00 -0000 Message-id: <20000824111745.A9462@visi.com> References: <20000823155500.A19850@visi.com> <39A51866.8752490A@firetalk.com> <20000824104015.B9059@visi.com> <39A54367.462E895C@firetalk.com> X-SW-Source: 2000-q3/msg00207.html 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