From b4c146eeeda5a8049527996428152bf2baa70a29 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 4 May 2011 20:22:10 +0000 Subject: [PATCH] Bug 341406: "Connect to process" button in the debug view does nothing while target is running in all-stop --- .../eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java index bc49c5c775f..c4d8d637988 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java @@ -120,6 +120,15 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 { if (fBackend.getSessionType() == SessionType.REMOTE && !fBackend.getIsAttachSession()) { return false; } + + // Multi-process does not work for all-stop right now + IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class); + if (runControl != null && runControl.getRunMode() == MIRunMode.ALL_STOP) { + // Only one process is allowed in all-stop (for now) + return getNumConnected() == 0; + // NOTE: when we support multi-process in all-stop mode, + // we will need to interrupt the target to when doing the attach. + } return true; }