[commit] gdbserver async I/O simplifications

Daniel Jacobowitz drow@false.org
Fri Dec 7 14:01:00 GMT 2007


On Fri, Dec 07, 2007 at 08:00:55AM +0100, Markus Deuling wrote:
> Hi Daniel,
> 
> Daniel Jacobowitz schrieb:
> > For the patch I'm working on, I needed asynchronous I/O to be disabled
> > during start_inferior and it was ending up enabled.  This version is
> > considerably simpler, and does not have that problem.  Async I/O can
> > and should be enabled once we have received a packet that will take a
> > long time, and must be disabled before we reply to GDB about it.
> > Tested on x86_64-linux and committed.
> 
> it seems own_buf is missing in gdbserver/server.c (myresume). This fixes the 
> build
> but I havent tested it. Its just what I applied to my dev tree.
> 
> ChangeLog:
> 
> 	* gdbserver/server.c (myresume): Add own_buf variable.

I have apparently failed to test the patch I thought I was testing.
Fix checked in as below; tested, this time.

-- 
Daniel Jacobowitz
CodeSourcery

2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>

	* server.c (myresume): Add own_buf argument.
	(main): Update calls.

Index: server.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
retrieving revision 1.60
diff -u -p -r1.60 server.c
--- server.c	7 Dec 2007 01:41:29 -0000	1.60
+++ server.c	7 Dec 2007 13:47:09 -0000
@@ -800,7 +800,7 @@ handle_v_requests (char *own_buf, char *
 }
 
 void
-myresume (int step, int *signalp, char *statusp)
+myresume (char *own_buf, int step, int *signalp, char *statusp)
 {
   struct thread_resume resume_info[2];
   int n = 0;
@@ -1084,7 +1084,7 @@ main (int argc, char *argv[])
 		signal = target_signal_to_host (sig);
 	      else
 		signal = 0;
-	      myresume (0, &signal, &status);
+	      myresume (own_buf, 0, &signal, &status);
 	      break;
 	    case 'S':
 	      convert_ascii_to_int (own_buf + 1, &sig, 1);
@@ -1092,15 +1092,15 @@ main (int argc, char *argv[])
 		signal = target_signal_to_host (sig);
 	      else
 		signal = 0;
-	      myresume (1, &signal, &status);
+	      myresume (own_buf, 1, &signal, &status);
 	      break;
 	    case 'c':
 	      signal = 0;
-	      myresume (0, &signal, &status);
+	      myresume (own_buf, 0, &signal, &status);
 	      break;
 	    case 's':
 	      signal = 0;
-	      myresume (1, &signal, &status);
+	      myresume (own_buf, 1, &signal, &status);
 	      break;
 	    case 'Z':
 	      {



More information about the Gdb-patches mailing list