1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 03:53:21 +02:00

Cosmetics

Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2016-03-06 16:56:01 -05:00
parent bf52a46a9d
commit 1f3ff86ea0

View file

@ -20,6 +20,7 @@ import org.eclipse.cdt.debug.core.model.IChangeReverseMethodHandler.ReverseTrace
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;
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants; import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor; import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext; import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
@ -71,7 +72,7 @@ public class StartOrRestartProcessSequence_7_10 extends StartOrRestartProcessSeq
@Override @Override
@Execute @Execute
public void stepInitializeBaseSequence(final RequestMonitor rm) { public void stepInitializeBaseSequence(final RequestMonitor rm) {
super.stepInitializeBaseSequence(new RequestMonitor (getExecutor(), rm) { super.stepInitializeBaseSequence(new ImmediateRequestMonitor(rm) {
@Override @Override
protected void handleSuccess() { protected void handleSuccess() {
DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), getContainerContext().getSessionId()); DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), getContainerContext().getSessionId());
@ -83,28 +84,26 @@ public class StartOrRestartProcessSequence_7_10 extends StartOrRestartProcessSeq
// Here we check for the reverse mode to be used for launching the reverse // Here we check for the reverse mode to be used for launching the reverse
// debugging service. // debugging service.
String fReverseModeString = CDebugUtils.getAttribute(fAttributes, String reverseMode = CDebugUtils.getAttribute(fAttributes,
IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE_MODE, IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_DEFAULT); IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_DEFAULT);
if (fReverseModeString.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_HARDWARE)) {
if (Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID, if (reverseMode.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_HARDWARE)) {
String hwTracePref = Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE, IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE, IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE, null);
null).equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_BRANCH_TRACE)) {
fReverseMode = ReverseTraceMethod.BRANCH_TRACE; // Branch Trace if (hwTracePref.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_BRANCH_TRACE)) {
} else if (Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID, fReverseMode = ReverseTraceMethod.BRANCH_TRACE;
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE, } else if (hwTracePref.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE, fReverseMode = ReverseTraceMethod.PROCESSOR_TRACE;
null).equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
fReverseMode = ReverseTraceMethod.PROCESSOR_TRACE; // Processor Trace
} else { } else {
fReverseMode = ReverseTraceMethod.GDB_TRACE; // GDB Selected Option fReverseMode = ReverseTraceMethod.GDB_TRACE;
} }
} } else if (reverseMode.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_SOFTWARE)) {
else if (fReverseModeString.equals(IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_MODE_SOFTWARE)) { fReverseMode = ReverseTraceMethod.FULL_TRACE;
fReverseMode = ReverseTraceMethod.FULL_TRACE; // Full Trace
} else { } else {
rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Invalid Trace Method Selected", null)); //$NON-NLS-1$ rm.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR, "Unexpected reverse debugging type: " + reverseMode, null)); //$NON-NLS-1$
} }
} }