This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Oleg Nesterov] PATCH? gdb remote.c: readchar() should pop_target() if SERIAL_ERROR?


>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> Talking in terms of Linux kernel internals, eh?

Yeah, see the discussion on the archer list...

Pedro> ... thus, I have no problems with this.  Could you tweak the
Pedro> string to say something like:
Pedro>  "Remote communication error.  Target disconnected."
Pedro> so that user is informed we're no longer talking to the
Pedro> target?.

Pedro> Okay with that change.

Thank you.  Here is the patch I am committing.
I'm putting it in 7.2 as well.

Tom

2010-07-28  Oleg Nesterov  <oleg@redhat.com>

	* remote.c (readchar): Call pop_target in case of SERIAL_ERROR.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.420
diff -u -r1.420 remote.c
--- remote.c	28 Jul 2010 18:04:19 -0000	1.420
+++ remote.c	28 Jul 2010 20:19:02 -0000
@@ -6667,7 +6667,8 @@
       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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]