mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-30 03:33:37 +02:00
Cosmetics
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
69562ae63e
commit
e6e50c16fb
1 changed files with 26 additions and 29 deletions
|
@ -110,15 +110,13 @@ public class GdbReverseToggleCommand extends AbstractDebugCommand implements ICh
|
||||||
if (runControl != null) {
|
if (runControl != null) {
|
||||||
ReverseTraceMethod traceMethod = fTraceMethod;
|
ReverseTraceMethod traceMethod = fTraceMethod;
|
||||||
if (fTraceMethod == ReverseTraceMethod.HARDWARE_TRACE) {
|
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_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)) {
|
|
||||||
|
if (defaultValue.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_BRANCH_TRACE)) {
|
||||||
traceMethod = ReverseTraceMethod.BRANCH_TRACE; // Branch Trace
|
traceMethod = ReverseTraceMethod.BRANCH_TRACE; // Branch Trace
|
||||||
} else if (Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
|
} else if (defaultValue.equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
|
||||||
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE,
|
|
||||||
IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE,
|
|
||||||
null).equals(IGdbDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_PROCESSOR_TRACE)) {
|
|
||||||
traceMethod = ReverseTraceMethod.PROCESSOR_TRACE; // Processor Trace
|
traceMethod = ReverseTraceMethod.PROCESSOR_TRACE; // Processor Trace
|
||||||
} else {
|
} else {
|
||||||
traceMethod = ReverseTraceMethod.GDB_TRACE; // GDB Selected Option
|
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);
|
final IReverseRunControl runControl_old = fTracker.getService(IReverseRunControl.class);
|
||||||
if (runControl_old != null) {
|
if (runControl_old != null) {
|
||||||
if (fTraceMethod != ReverseTraceMethod.STOP_TRACE && fTraceMethod != ReverseTraceMethod.FULL_TRACE) {
|
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));
|
request.setStatus(new Status(IStatus.OK, GdbPlugin.PLUGIN_ID, 1, Messages.GdbReverseDebugging_HardwareTracingNotAvailable, null));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
runControl_old.isReverseModeEnabled(controlDmc,
|
runControl_old.isReverseModeEnabled(controlDmc, new DataRequestMonitor<Boolean>(fExecutor, rm) {
|
||||||
new DataRequestMonitor<Boolean>(fExecutor, rm) {
|
|
||||||
@Override
|
@Override
|
||||||
public void handleSuccess() {
|
public void handleSuccess() {
|
||||||
runControl_old.enableReverseMode(controlDmc, !getData(), rm);
|
runControl_old.enableReverseMode(controlDmc, !getData(), rm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue