diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java index f1c34df49e4..1e0bb62484a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,7 @@ * Marc Khouzam (Ericsson) - New method to properly created ErrorThread (Bug 350837) * Jason Litton (Sage Electronic Engineering, LLC) - Use Dynamic Tracing option (Bug 379169) * 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; @@ -833,6 +834,7 @@ public abstract class AbstractMIControl extends AbstractDsfService clientMsg.append("Failed to execute MI command:\n"); //$NON-NLS-1$ clientMsg.append(origCommand.toString()); 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$ if (parameters != null) { try { diff --git a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF index b777a2a7a2c..bf1ea0c54e2 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF +++ b/dsf/org.eclipse.cdt.dsf.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-Vendor: %providerName 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-Localization: plugin Require-Bundle: org.eclipse.ui;bundle-version="3.5.0", diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java index 44f089339ca..2ecad94b5b1 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfResumeCommand.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,14 +8,15 @@ * Contributors: * Wind River Systems - initial API and implementation * 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; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.dsf.concurrent.DsfExecutor; import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor; 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.internal.ui.DsfUIPlugin; import org.eclipse.cdt.dsf.service.DsfServicesTracker; @@ -108,7 +109,13 @@ public class DsfResumeCommand implements IResumeHandler { return; } - multiRun.resume(getContexts(), new ImmediateRequestMonitor()); + multiRun.resume(getContexts(), new ImmediateRequestMonitor() { + @Override + protected void handleError() { + super.handleError(); + CDebugUtils.error(getStatus(), DsfResumeCommand.this); + } + }); } }); return false; @@ -117,7 +124,13 @@ public class DsfResumeCommand implements IResumeHandler { private void executeSingle(IDebugCommandRequest request) { fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) { @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); + } + }); } }); } diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java index 30a9f538e4e..2e8dfe01205 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfSuspendCommand.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,14 +8,15 @@ * Contributors: * Wind River Systems - initial API and implementation * 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; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.dsf.concurrent.DsfExecutor; import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor; 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.internal.ui.DsfUIPlugin; import org.eclipse.cdt.dsf.service.DsfServicesTracker; @@ -107,7 +108,13 @@ public class DsfSuspendCommand implements ISuspendHandler { return; } - multiRun.suspend(getContexts(), new ImmediateRequestMonitor()); + multiRun.suspend(getContexts(), new ImmediateRequestMonitor() { + @Override + protected void handleError() { + super.handleError(); + CDebugUtils.error(getStatus(), DsfSuspendCommand.this); + } + }); } }); return false; @@ -116,7 +123,13 @@ public class DsfSuspendCommand implements ISuspendHandler { private void executeSingle(IDebugCommandRequest request) { fExecutor.submit(new DsfCommandRunnable(fTracker, request.getElements()[0], request) { @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); + } + }); } }); } diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java index b0c601992e8..7476b2cfa7c 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/SteppingController.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * Wind River Systems - initial API and implementation + * John Dallaway - Report command execution error (Bug 539455) *******************************************************************************/ 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.ScheduledFuture; 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.DataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.DsfExecutor; @@ -453,6 +456,12 @@ public final class SteppingController { } super.handleFailure(); } + + @Override + protected void handleError() { + super.handleError(); + CDebugUtils.error(getStatus(), SteppingController.this); + } }); }