This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch to allow interrupting rdi target with SIGINT
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: Re: Patch to allow interrupting rdi target with SIGINT
- From: Grant Edwards <grante at visi dot com>
- Date: Tue, 9 Nov 1999 15:01:02 -0600
- References: <19991109145906.A28986@visi.com>
On Tue, Nov 09, 1999 at 02:59:06PM -0600, Grant Edwards wrote:
> Attached is a patch against gdb-4.18 sources. This patch can be
> applied to 4.18 either before or after my previous rdi patches. The
> changes are listed below:
>
>
> gdb/rdi-share/ardi.c:
>
> Added code from Thomas Zenker that enables the user to interrupt
> target execution by sending SIGINT (usually control-C) to gdb.
Ok, this time I'll attach the patch file....
--- /home/grante/gdb-4.18/gdb/rdi-share/ardi.c Fri Oct 29 17:06:34 1999
+++ gdb/rdi-share/ardi.c Tue Nov 9 14:40:13 1999
@@ -392,6 +392,7 @@
#endif
static bool boot_interrupted = FALSE;
+static volatile bool interrupt_request = FALSE;
static void ardi_sigint_handler(int sig) {
#ifdef DEBUG
@@ -401,6 +402,7 @@
IGNORE(sig);
#endif
boot_interrupted = TRUE;
+ interrupt_request = TRUE;
#ifndef __unix
signal(SIGINT, ardi_sigint_handler);
#endif
@@ -1306,7 +1308,6 @@
return RDIError_NoError;
}
-static volatile bool interrupt_request = FALSE;
static void interrupt_target( void )
{
@@ -1397,6 +1398,7 @@
angel_DebugPrint("Waiting for program to finish...\n");
#endif
+ signal(SIGINT, ardi_sigint_handler);
while( executing )
{
if (interrupt_request)
@@ -1406,6 +1408,8 @@
}
Adp_AsynchronousProcessing( async_block_on_nothing );
}
+ signal(SIGINT, SIG_IGN);
+
#ifdef TEST_DC_APPL
Adp_Install_DC_Appl_Handler( NULL );