mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 344892: Deadlock when trying to attach to more than one process on a remote target
This commit is contained in:
parent
e4320d05fc
commit
bcd45d7218
1 changed files with 10 additions and 13 deletions
|
@ -51,7 +51,7 @@ import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
|
|
||||||
public class GdbConnectCommand implements IConnect {
|
public class GdbConnectCommand implements IConnect {
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ public class GdbConnectCommand implements IConnect {
|
||||||
|
|
||||||
// Need a job to free the executor while we prompt the user for a binary path
|
// Need a job to free the executor while we prompt the user for a binary path
|
||||||
// Bug 344892
|
// Bug 344892
|
||||||
private class PromptAndAttachToProcessJob extends Job {
|
private class PromptAndAttachToProcessJob extends UIJob {
|
||||||
private final String fPid;
|
private final String fPid;
|
||||||
private final RequestMonitor fRm;
|
private final RequestMonitor fRm;
|
||||||
|
|
||||||
|
@ -158,18 +158,15 @@ public class GdbConnectCommand implements IConnect {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
final String[] binaryPath = new String[1];
|
final String[] binaryPath = new String[1];
|
||||||
binaryPath[0] = null;
|
binaryPath[0] = null;
|
||||||
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
Shell shell = Display.getCurrent().getActiveShell();
|
Shell shell = Display.getCurrent().getActiveShell();
|
||||||
if (shell != null) {
|
if (shell != null) {
|
||||||
FileDialog fd = new FileDialog(shell, SWT.NONE);
|
FileDialog fd = new FileDialog(shell, SWT.NONE);
|
||||||
binaryPath[0] = fd.open();
|
binaryPath[0] = fd.open();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
fExecutor.execute(new DsfRunnable() {
|
fExecutor.execute(new DsfRunnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue