mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 539455: Report debug command errors via status handler
Change-Id: I4c3abbb660e426580ce8f836e6e19a897fbaeefe Signed-off-by: John Dallaway <john@dallaway.org.uk>
This commit is contained in:
parent
70a03a862e
commit
87cd426861
5 changed files with 48 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Wind River Systems and others.
|
* Copyright (c) 2006, 2018 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Marc Khouzam (Ericsson) - New method to properly created ErrorThread (Bug 350837)
|
* Marc Khouzam (Ericsson) - New method to properly created ErrorThread (Bug 350837)
|
||||||
* Jason Litton (Sage Electronic Engineering, LLC) - Use Dynamic Tracing option (Bug 379169)
|
* Jason Litton (Sage Electronic Engineering, LLC) - Use Dynamic Tracing option (Bug 379169)
|
||||||
* Jonah Graham (Kichwa Coders) - Bug 317173 - cleanup warnings
|
* Jonah Graham (Kichwa Coders) - Bug 317173 - cleanup warnings
|
||||||
|
* John Dallaway - Decode line breaks in status message (Bug 539455)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.mi.service.command;
|
package org.eclipse.cdt.dsf.mi.service.command;
|
||||||
|
|
||||||
|
@ -833,6 +834,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
||||||
clientMsg.append("Failed to execute MI command:\n"); //$NON-NLS-1$
|
clientMsg.append("Failed to execute MI command:\n"); //$NON-NLS-1$
|
||||||
clientMsg.append(origCommand.toString());
|
clientMsg.append(origCommand.toString());
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
|
message = message.replaceAll("\\\\n", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
clientMsg.append("Error message from debugger back end:\n"); //$NON-NLS-1$
|
clientMsg.append("Error message from debugger back end:\n"); //$NON-NLS-1$
|
||||||
if (parameters != null) {
|
if (parameters != null) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
|
||||||
Bundle-Version: 2.5.0.qualifier
|
Bundle-Version: 2.5.1.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
|
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
|
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2012 Wind River Systems and others.
|
* Copyright (c) 2006, 2018 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,14 +8,15 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
|
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
|
||||||
|
* John Dallaway - Report command execution error (Bug 539455)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.debug.ui.actions;
|
package org.eclipse.cdt.dsf.debug.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
|
||||||
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
|
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
|
||||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||||
|
@ -108,7 +109,13 @@ public class DsfResumeCommand implements IResumeHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiRun.resume(getContexts(), new ImmediateRequestMonitor());
|
multiRun.resume(getContexts(), new ImmediateRequestMonitor() {
|
||||||
|
@Override
|
||||||
|
protected void handleError() {
|
||||||
|
super.handleError();
|
||||||
|
CDebugUtils.error(getStatus(), DsfResumeCommand.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
@ -117,7 +124,13 @@ public class DsfResumeCommand implements IResumeHandler {
|
||||||
private void executeSingle(IDebugCommandRequest request) {
|
private void executeSingle(IDebugCommandRequest request) {
|
||||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||||
@Override public void doExecute() {
|
@Override public void doExecute() {
|
||||||
getRunControl().resume(getContext(), new RequestMonitor(fExecutor, null));
|
getRunControl().resume(getContext(), new ImmediateRequestMonitor() {
|
||||||
|
@Override
|
||||||
|
protected void handleError() {
|
||||||
|
super.handleError();
|
||||||
|
CDebugUtils.error(getStatus(), DsfResumeCommand.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2012 Wind River Systems and others.
|
* Copyright (c) 2006, 2018 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,14 +8,15 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
|
* Marc Khouzam (Ericsson) - Added support for multi-selection (Bug 330974)
|
||||||
|
* John Dallaway - Report command execution error (Bug 539455)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.debug.ui.actions;
|
package org.eclipse.cdt.dsf.debug.ui.actions;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
import org.eclipse.cdt.dsf.concurrent.Immutable;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
|
||||||
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
|
import org.eclipse.cdt.dsf.debug.service.IMultiRunControl;
|
||||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||||
|
@ -107,7 +108,13 @@ public class DsfSuspendCommand implements ISuspendHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiRun.suspend(getContexts(), new ImmediateRequestMonitor());
|
multiRun.suspend(getContexts(), new ImmediateRequestMonitor() {
|
||||||
|
@Override
|
||||||
|
protected void handleError() {
|
||||||
|
super.handleError();
|
||||||
|
CDebugUtils.error(getStatus(), DsfSuspendCommand.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
@ -116,7 +123,13 @@ public class DsfSuspendCommand implements ISuspendHandler {
|
||||||
private void executeSingle(IDebugCommandRequest request) {
|
private void executeSingle(IDebugCommandRequest request) {
|
||||||
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) {
|
||||||
@Override public void doExecute() {
|
@Override public void doExecute() {
|
||||||
getRunControl().suspend(getContext(), new RequestMonitor(fExecutor, null));
|
getRunControl().suspend(getContext(), new ImmediateRequestMonitor() {
|
||||||
|
@Override
|
||||||
|
protected void handleError() {
|
||||||
|
super.handleError();
|
||||||
|
CDebugUtils.error(getStatus(), DsfSuspendCommand.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2016 Wind River Systems and others.
|
* Copyright (c) 2006, 2018 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Wind River Systems - initial API and implementation
|
* Wind River Systems - initial API and implementation
|
||||||
|
* John Dallaway - Report command execution error (Bug 539455)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.debug.ui.viewmodel;
|
package org.eclipse.cdt.dsf.debug.ui.viewmodel;
|
||||||
|
|
||||||
|
@ -20,6 +21,8 @@ import java.util.Map;
|
||||||
import java.util.concurrent.RejectedExecutionException;
|
import java.util.concurrent.RejectedExecutionException;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
||||||
|
@ -453,6 +456,12 @@ public final class SteppingController {
|
||||||
}
|
}
|
||||||
super.handleFailure();
|
super.handleFailure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleError() {
|
||||||
|
super.handleError();
|
||||||
|
CDebugUtils.error(getStatus(), SteppingController.this);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue