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]

[commit] remote non-stop, add missing call to init_wait_for_inferior.


This was missing, resulting in weird behaviour when threads are found
stopped on the remote side, since a few inferior control globals
weren't initialized properly --- e.g., I tripped on the fact 
that waiton_ptid needs to be set to minus_one_ptid, but it was set
to null --- waiton_ptid is what is passed to target_wait.
(in all-stop, init_wait_for_inferior is called by start_remote).

Checked in.

-- 
Pedro Alves

2009-03-18  Pedro Alves  <pedro@codesourcery.com>

	* remte.c (remote_start_remote): Add missing call to
	init_wait_for_inferior in non-stop mode.

---
 gdb/remote.c |    2 ++
 1 file changed, 2 insertions(+)

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c	2009-03-17 20:20:32.000000000 +0000
+++ src/gdb/remote.c	2009-03-18 01:21:40.000000000 +0000
@@ -2802,6 +2802,8 @@ remote_start_remote (struct ui_out *uiou
       /* In non-stop mode, any cached wait status will be stored in
 	 the stop reply queue.  */
       gdb_assert (wait_status == NULL);
+
+      init_wait_for_inferior ();
     }
 
   /* If we connected to a live target, do some additional setup.  */


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