1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-29 19:23:38 +02:00

Cosmetics

Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2016-02-27 07:46:50 -05:00
parent 69562ae63e
commit e6e50c16fb

View file

@ -110,15 +110,13 @@ public class GdbReverseToggleCommand extends AbstractDebugCommand implements ICh
if (runControl != null) {
ReverseTraceMethod traceMethod = fTraceMethod;
if (fTraceMethod == ReverseTraceMethod.HARDWARE_TRACE) {
if (Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
String defaultValue = Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE,
null).equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_BRANCH_TRACE)) {
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE, null);
if (defaultValue.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_BRANCH_TRACE)) {
traceMethod = ReverseTraceMethod.BRANCH_TRACE; // Branch Trace
} else if (Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE,
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE,
null).equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
} else if (defaultValue.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
traceMethod = ReverseTraceMethod.PROCESSOR_TRACE; // Processor Trace
} else {
traceMethod = ReverseTraceMethod.GDB_TRACE; // GDB Selected Option
@ -142,12 +140,11 @@ public class GdbReverseToggleCommand extends AbstractDebugCommand implements ICh
final IReverseRunControl runControl_old = fTracker.getService(IReverseRunControl.class);
if (runControl_old != null) {
if (fTraceMethod != ReverseTraceMethod.STOP_TRACE && fTraceMethod != ReverseTraceMethod.FULL_TRACE) {
runControl_old.enableReverseMode(controlDmc, false, rm); // Swtich Off tracing
runControl_old.enableReverseMode(controlDmc, false, rm); // Switch Off tracing
request.setStatus(new Status(IStatus.OK, GdbPlugin.PLUGIN_ID, 1, Messages.GdbReverseDebugging_HardwareTracingNotAvailable, null));
return;
}
runControl_old.isReverseModeEnabled(controlDmc,
new DataRequestMonitor<Boolean>(fExecutor, rm) {
runControl_old.isReverseModeEnabled(controlDmc, new DataRequestMonitor<Boolean>(fExecutor, rm) {
@Override
public void handleSuccess() {
runControl_old.enableReverseMode(controlDmc, !getData(), rm);