This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
handle_inferior_event, small cleanup, remove assumption
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 24 Oct 2011 15:08:15 +0100
- Subject: 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
assumption.
Tested on x86_64-linux and applied.
--
Pedro Alves
2011-10-24 Pedro Alves <pedro@codesourcery.com>
gdb/
* 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)
{