diff options
author | Marc Khouzam | 2011-07-22 12:08:42 +0000 |
---|---|---|
committer | Marc Khouzam | 2011-07-22 12:08:42 +0000 |
commit | a1229e9c3558671cfbe406222ea78ad14ccbcdc3 (patch) | |
tree | 479f94b69a1cd9147f771755164dafb5bfb14510 /dsf-gdb | |
parent | 0dc841b995b7910eefb2f3e84e771aef7349bd00 (diff) | |
download | org.eclipse.cdt-a1229e9c3558671cfbe406222ea78ad14ccbcdc3.tar.gz org.eclipse.cdt-a1229e9c3558671cfbe406222ea78ad14ccbcdc3.tar.xz org.eclipse.cdt-a1229e9c3558671cfbe406222ea78ad14ccbcdc3.zip |
Bug 350365: Cannot use the servicesTracker outside the executor
Diffstat (limited to 'dsf-gdb')
-rw-r--r-- | dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java index 4b15eca37a0..b310a147487 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java @@ -189,22 +189,6 @@ public class GdbConnectCommand implements IConnect { @Override public IStatus runInUIThread(IProgressMonitor monitor) { - - // If this is the very first attach of a remote session, check if the user - // specified the binary in the launch. If so, let's add it to our map to - // avoid having to prompt the user for that binary. - // This would be particularly annoying since we didn't use to have - // to do that before we supported multi-process. - // Bug 350365 - if (fProcessNameToBinaryMap.isEmpty()) { - IGDBBackend backend = fTracker.getService(IGDBBackend.class); - if (backend != null) { - IPath binaryPath = backend.getProgramPath(); - if (binaryPath != null && !binaryPath.isEmpty()) { - fProcessNameToBinaryMap.put(binaryPath.lastSegment(), binaryPath.toOSString()); - } - } - } // Have we already see the binary for a process with this name? String binaryPath = fProcessNameToBinaryMap.get(fProcName); @@ -438,6 +422,21 @@ public class GdbConnectCommand implements IConnect { if (backend.getSessionType() == SessionType.REMOTE) { // For remote attach, we must set the binary first so we need to prompt the user. + + // If this is the very first attach of a remote session, check if the user + // specified the binary in the launch. If so, let's add it to our map to + // avoid having to prompt the user for that binary. + // This would be particularly annoying since we didn't use to have + // to do that before we supported multi-process. + // Must do this here to be in the executor + // Bug 350365 + if (fProcessNameToBinaryMap.isEmpty()) { + IPath binaryPath = backend.getProgramPath(); + if (binaryPath != null && !binaryPath.isEmpty()) { + fProcessNameToBinaryMap.put(binaryPath.lastSegment(), binaryPath.toOSString()); + } + } + // Because the prompt is a very long operation, we need to run outside the // executor, so we don't lock it. // Bug 344892 |