Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 214418 Details for
Bug 330974
[run control] If the user selects multiple nodes in the debug view most debug commands are disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for all-stop recommended not to use
z.allstop.patch (text/plain), 9.61 KB, created by
Marc Khouzam
on 2012-04-23 15:51:21 EDT
(
hide
)
Description:
Patch for all-stop recommended not to use
Filename:
MIME Type:
Creator:
Marc Khouzam
Created:
2012-04-23 15:51:21 EDT
Size:
9.61 KB
patch
obsolete
>diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java >index 4b474bf..0711258 100644 >--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java >+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl.java >@@ -25,6 +25,7 @@ > import org.eclipse.cdt.dsf.datamodel.DMContexts; > import org.eclipse.cdt.dsf.datamodel.IDMContext; > import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext; >+import org.eclipse.cdt.dsf.debug.service.IMultiRunControl; > import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext; > import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext; > import org.eclipse.cdt.dsf.debug.service.IRunControl; >@@ -110,6 +111,7 @@ > register(new String[]{IRunControl.class.getName(), > IRunControl2.class.getName(), > IMIRunControl.class.getName(), >+ IMultiRunControl.class.getName(), > MIRunControl.class.getName(), > GDBRunControl.class.getName()}, new Hashtable<String,String>()); > requestMonitor.done(); >diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java >index eb6abfb..42f3c73 100644 >--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java >+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0.java >@@ -24,6 +24,7 @@ > import org.eclipse.cdt.dsf.datamodel.DMContexts; > import org.eclipse.cdt.dsf.datamodel.IDMContext; > import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext; >+import org.eclipse.cdt.dsf.debug.service.IMultiRunControl; > import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext; > import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext; > import org.eclipse.cdt.dsf.debug.service.IRunControl; >@@ -122,6 +123,7 @@ > register(new String[]{IRunControl.class.getName(), > IRunControl2.class.getName(), > IMIRunControl.class.getName(), >+ IMultiRunControl.class.getName(), > MIRunControl.class.getName(), > IReverseRunControl.class.getName()}, > new Hashtable<String,String>()); >diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java >index b150218..c34298d 100644 >--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java >+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java >@@ -39,6 +39,7 @@ > import org.eclipse.cdt.dsf.debug.service.IBreakpointsExtension.IBreakpointHitDMEvent; > import org.eclipse.cdt.dsf.debug.service.ICachingService; > import org.eclipse.cdt.dsf.debug.service.IDisassembly.IDisassemblyDMContext; >+import org.eclipse.cdt.dsf.debug.service.IMultiRunControl; > import org.eclipse.cdt.dsf.debug.service.IProcesses; > import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext; > import org.eclipse.cdt.dsf.debug.service.command.BufferedCommandControl; >@@ -93,7 +94,7 @@ > * state. > * @since 3.0 > */ >-public class MIRunControl extends AbstractDsfService implements IMIRunControl, ICachingService >+public class MIRunControl extends AbstractDsfService implements IMIRunControl, IMultiRunControl, ICachingService > { > private static class MIExecutionDMC extends AbstractDMContext implements IMIExecutionDMContext, IDisassemblyDMContext > { >@@ -1578,4 +1579,149 @@ > // we know GDB is accepting commands > return !fTerminated && fSuspended && !fResumePending; > } >+ >+ /////////////////////////////////////////////////////////////////////////// >+ // IMultiRunControl implementation >+ /////////////////////////////////////////////////////////////////////////// >+ >+ /////////////////////////////////////////////////////////////////////////// >+ // Multi-resume implementation: >+ // In all-stop mode, if one context can be resumed, then all can be resumed. >+ // There is no added value of supporting multi-select with all-stop but we do >+ // so to be more user-friendly. >+ // >+ // Note that if scheduler-locking is enabled in GDB (we don't officially >+ // support it in CDT yet), then which thread is resumed makes a difference >+ // in the behavior, as the other threads will stay stopped. In that case, >+ // a multi-selection makes no sense because there is no way of knowing >+ // which thread the user really wants to resume. >+ /////////////////////////////////////////////////////////////////////////// >+ >+ /** @since 4.1 */ >+ @Override >+ public void canResumeSome(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ assert contexts != null; >+ >+ if (contexts != null && contexts.length > 0) { >+ // In all-stop, if one context can resume, all of them can >+ canResume(contexts[0], rm); >+ } else { >+ rm.done(false); >+ } >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void canResumeAll(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ // In all-stop, if one context can resume, all of them can, so re-use the canResumeSome case. >+ canResumeSome(contexts, rm); >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void resume(IExecutionDMContext[] contexts, RequestMonitor rm) { >+ assert contexts != null; >+ >+ if (contexts != null && contexts.length > 0) { >+ // In all-stop, resuming one context will resume all of them >+ resume(contexts[0], rm); >+ } else { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_STATE, "Invalid contexts", null)); //$NON-NLS-1$ >+ } >+ } >+ >+ /////////////////////////////////////////////////////////////////////////// >+ // Multi-suspend implementation: >+ // In all-stop mode, if one context can be suspended, then all can be suspended. >+ // There is no added value of supporting multi-select with all-stop but we do >+ // so to be more user-friendly >+ /////////////////////////////////////////////////////////////////////////// >+ >+ /** @since 4.1 */ >+ @Override >+ public void canSuspendSome(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ assert contexts != null; >+ >+ // In all-stop, if one context can suspend, all of them can >+ if (contexts != null && contexts.length > 0) { >+ canSuspend(contexts[0], rm); >+ } else { >+ rm.done(false); >+ } >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void canSuspendAll(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ // In all-stop, if one context can suspend, all of them can, so re-use canSuspendSome >+ canSuspendSome(contexts, rm); >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void isSuspendedSome(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ assert contexts != null; >+ >+ // In all-stop, if one context is suspended, all of them are >+ if (contexts != null && contexts.length > 0) { >+ rm.done(isSuspended(contexts[0])); >+ } else { >+ rm.done(false); >+ } >+ >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void isSuspendedAll(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ // In all-stop, if one context is suspended, all of them are, so re-use isSuspendedSome >+ isSuspendedSome(contexts, rm); >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void suspend(IExecutionDMContext[] contexts, RequestMonitor rm) { >+ assert contexts != null; >+ >+ if (contexts != null && contexts.length > 0) { >+ // In all-stop, suspending one context will suspend all of them >+ suspend(contexts[0], rm); >+ } else { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_STATE, "Invalid contexts", null)); //$NON-NLS-1$ >+ } >+ } >+ >+ /////////////////////////////////////////////////////////////////////////// >+ // Multi-step implementation. Not implemented yet. See bug 330974. >+ /////////////////////////////////////////////////////////////////////////// >+ >+ /** @since 4.1 */ >+ @Override >+ public void canStepSome(IExecutionDMContext[] contexts, StepType stepType, DataRequestMonitor<Boolean> rm) { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented.", null)); //$NON-NLS-1$ >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void canStepAll(IExecutionDMContext[] contexts, StepType stepType, DataRequestMonitor<Boolean> rm) { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented.", null)); //$NON-NLS-1$ >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void isSteppingSome(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented.", null)); //$NON-NLS-1$ >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void isSteppingAll(IExecutionDMContext[] contexts, DataRequestMonitor<Boolean> rm) { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented.", null)); //$NON-NLS-1$ >+ } >+ >+ /** @since 4.1 */ >+ @Override >+ public void step(IExecutionDMContext[] contexts, StepType stepType, RequestMonitor rm) { >+ rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "Not implemented.", null)); //$NON-NLS-1$ >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
marc.khouzam
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 330974
:
214147
| 214418