This is the mail archive of the 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]

handle_inferior_event, small cleanup, remove assumption

I tripped on this with some other patches that make the core
implement all-stop mode on top of a target running in non-stop
mode.  Presently, we always get here with inferior_ptid already
set to the event thread, but it looks best to get rid of the

Tested on x86_64-linux and applied.

Pedro Alves

2011-10-24  Pedro Alves  <>

	* infrun.c (handle_inferior_event): Don't assume inferior_ptid is
	already set when marking the event thread as not executing in
	non-stop mode.

 gdb/infrun.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: src/gdb/infrun.c
--- src.orig/gdb/infrun.c	2011-10-17 14:49:48.656725740 +0100
+++ src/gdb/infrun.c	2011-10-17 14:50:00.346725751 +0100
@@ -3239,7 +3239,7 @@ handle_inferior_event (struct execution_
     set_executing (minus_one_ptid, 0);
   else if (ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
 	   && ecs->ws.kind != TARGET_WAITKIND_EXITED)
-    set_executing (inferior_ptid, 0);
+    set_executing (ecs->ptid, 0);
   switch (infwait_state)

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