From 4ac8c4da1d26746d82e7c41e5eb2e9215d10e8a2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 28 Jul 2010 20:20:26 +0000 Subject: [PATCH] 2010-07-28 Oleg Nesterov * remote.c (readchar): Call pop_target in case of SERIAL_ERROR. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 19e9e06..6fca089 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-07-28 Oleg Nesterov + + * remote.c (readchar): Call pop_target in case of SERIAL_ERROR. + 2010-07-27 Tom Tromey * dwarf2read.c (dwarf2_const_value_data): Never sign extend. diff --git a/gdb/remote.c b/gdb/remote.c index e42e57f..d6c20f3 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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; -- 2.7.4