]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/rdi-share/ardi.c
import gdb-2000-01-05 snapshot
[thirdparty/binutils-gdb.git] / gdb / rdi-share / ardi.c
index f61f7242f737dad157a24c2a70d86083984d811f..d1dc191ff4ed74265fc85e88e5031ae41cebf2d1 100644 (file)
 #undef uint
 
 
-#include "endian.h"
+#include "angel_endian.h"
 #include "ardi.h"
 #include "buffers.h"
 #include "channels.h"
 #include "hostchan.h"
 #include "host.h"
-#include "bytesex.h"
+#include "angel_bytesex.h"
 #include "dbg_cp.h"
 #include "adp.h"
 #include "hsys.h"
@@ -392,6 +392,7 @@ static void (*old_handler)();
 #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 @@ static void ardi_sigint_handler(int sig) {
     IGNORE(sig);
 #endif
     boot_interrupted = TRUE;
+    interrupt_request = TRUE;
 #ifndef __unix
     signal(SIGINT, ardi_sigint_handler);
 #endif
@@ -1300,13 +1302,12 @@ static int HandleStoppedMessage(Packet *packet, void *stateptr) {
     stopped_info->stopped_status = RDIError_NoError;
     break;
   default:
-    stopped_info->stopped_status = RDIError_NoError;
+    stopped_info->stopped_status = RDIError_Error;
     break;
   }
   return RDIError_NoError;
 }
 
-static volatile bool interrupt_request = FALSE;
 
 static void interrupt_target( void )
 {
@@ -1397,6 +1398,7 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
   angel_DebugPrint("Waiting for program to finish...\n");
 #endif
 
+  signal(SIGINT, ardi_sigint_handler);
   while( executing )
   {
       if (interrupt_request)
@@ -1406,6 +1408,8 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
       }
       Adp_AsynchronousProcessing( async_block_on_nothing );
   }
+  signal(SIGINT, SIG_IGN);
+
 
 #ifdef TEST_DC_APPL
   Adp_Install_DC_Appl_Handler( NULL );