prevent multiple attempts at closing remote connection.
authorNick Clifton <nickc@redhat.com>
Tue, 15 Sep 1998 21:03:26 +0000 (21:03 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 15 Sep 1998 21:03:26 +0000 (21:03 +0000)
gdb/ChangeLog
gdb/remote-rdi.c

index 5279d9f06d9d351c83483afa3ac57d6d14551964..3712db95ad513892ed82e2e286aa92394e34a307 100644 (file)
@@ -1,3 +1,8 @@
+Tue Sep 15 14:02:01 1998  Nick Clifton  <nickc@cygnus.com>
+
+       * remote-rdi.c: Prevent multiple attempts to close the remote
+       connection. 
+
 Tue Sep 15 10:24:17 1998  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * printcmd.c (examine_i_type): New static - type for instructions.
index 29119048c974d52c5b31c2663bb6d72e2fa9e683..6bfcb8bed50969e8de16e485065d12ef226f75f7 100644 (file)
@@ -181,6 +181,9 @@ mygets (arg, buffer, len)
   return fgets(buffer, len, stdin);
 }
 
+/* Prevent multiple calls to angel_RDI_close().  */
+static int closed_already = 1;
+
 /* Open a connection to a remote debugger.  NAME is the filename used
    for communication.  */
 
@@ -318,6 +321,8 @@ device is attached to the remote system (e.g. /dev/ttya).");
   }
 
   printf_filtered ("Connected to ARM RDI target.\n");
+
+  closed_already = 0;
 }
 
 /* Start an inferior process and set inferior_pid to its pid.
@@ -414,10 +419,14 @@ arm_rdi_close (quitting)
 {
   int rslt;
 
-  rslt = angel_RDI_close ();
-  if (rslt)
+  if (! closed_already)
     {
-      printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt));
+      rslt = angel_RDI_close ();
+      if (rslt)
+       {
+         printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt));
+       }
+      closed_already = 1;
     }
 }
 \f
This page took 0.026858 seconds and 4 git commands to generate.