From f9be56f5d44ecbfa9629dbf05b392a9018201da2 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 30 Mar 2011 17:19:07 +0000 Subject: [PATCH] Bug 341396: A process that has not been started should be considered as suspended in non-top mode too --- .../eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java index 0101fd4eb2d..0733e0d7f62 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java @@ -394,11 +394,16 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService implements IMIRunCo // Container case. The container is considered suspended as long // as one of its thread is suspended if (context instanceof IContainerDMContext) { + boolean hasThread = false; for (IMIExecutionDMContext threadContext : fThreadRunStates.keySet()) { if (DMContexts.isAncestorOf(threadContext, context)) { + hasThread = true; if (isSuspended(threadContext)) return true; } } + // If this container does not have any threads, it means it wasn't started + // yet, so we can consider it suspended + if (hasThread == false) return true; } // Default case