2010-07-28 Oleg Nesterov <oleg@redhat.com>
authorTom Tromey <tromey@redhat.com>
Wed, 28 Jul 2010 20:20:26 +0000 (20:20 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 28 Jul 2010 20:20:26 +0000 (20:20 +0000)
* remote.c (readchar): Call pop_target in case of SERIAL_ERROR.

gdb/ChangeLog
gdb/remote.c

index 19e9e061d70e18bf3067b79a7d271f0e9fbbec05..6fca089516a2d2ac3547faea5ed9843a2616eb89 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-28  Oleg Nesterov  <oleg@redhat.com>
+
+       * remote.c (readchar): Call pop_target in case of SERIAL_ERROR.
+
 2010-07-27  Tom Tromey  <tromey@redhat.com>
 
        * dwarf2read.c (dwarf2_const_value_data): Never sign extend.
index e42e57f33511c63bc98be101386f15d1fa67779a..d6c20f343f202aee4c75443142187aa1b02a6d1b 100644 (file)
@@ -6667,7 +6667,8 @@ readchar (int timeout)
       error (_("Remote connection closed"));
       /* no return */
     case SERIAL_ERROR:
-      perror_with_name (_("Remote communication error"));
+      pop_target ();
+      perror_with_name (_("Remote communication error.  Target disconnected."));
       /* no return */
     case SERIAL_TIMEOUT:
       break;