From d1b0dbacf41cedf2ddcdb92257dad6914bfa030e Mon Sep 17 00:00:00 2001 From: John Cortell Date: Thu, 25 Feb 2010 22:04:16 +0000 Subject: [PATCH] Cleanup. Rename SyncUtil methods. Methods should start with a lowercase letter. Also having every method start with "Sync" is pointless. --- .../cdt/tests/dsf/gdb/framework/SyncUtil.java | 62 ++-- .../dsf/gdb/tests/MIBreakpointsTest.java | 107 +++---- .../dsf/gdb/tests/MIDisassemblyTest.java | 6 +- .../dsf/gdb/tests/MIExpressionsTest.java | 280 +++++++++--------- .../cdt/tests/dsf/gdb/tests/MIMemoryTest.java | 218 +++++++------- .../tests/dsf/gdb/tests/MIRegistersTest.java | 24 +- .../tests/dsf/gdb/tests/MIRunControlTest.java | 14 +- 7 files changed, 356 insertions(+), 355 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java index 6a161860241..68e0d0e63ef 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java @@ -89,19 +89,19 @@ public class SyncUtil { tracker.dispose(); } - public static MIStoppedEvent SyncStep(final StepType stepType, int numSteps) throws Throwable { + public static MIStoppedEvent step(final StepType stepType, int numSteps) throws Throwable { MIStoppedEvent retVal = null; for (int i=0; i eventWaitor = new ServiceEventWaitor( @@ -132,7 +132,7 @@ public class SyncUtil { return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER); } - public static MIStoppedEvent SyncRunToLine(final IExecutionDMContext dmc, final String fileName, final String lineNo, + public static MIStoppedEvent runToLine(final IExecutionDMContext dmc, final String fileName, final String lineNo, final boolean skipBreakpoints) throws Throwable { final ServiceEventWaitor eventWaitor = @@ -155,21 +155,21 @@ public class SyncUtil { return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER); } - public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo, + public static MIStoppedEvent runToLine(final String fileName, final String lineNo, final boolean skipBreakpoints) throws Throwable { - return SyncRunToLine(fGdbContainerDmc, fileName, lineNo, skipBreakpoints); + return runToLine(fGdbContainerDmc, fileName, lineNo, skipBreakpoints); } - public static MIStoppedEvent SyncRunToLine(final String fileName, final String lineNo) throws Throwable { - return SyncRunToLine(fGdbContainerDmc, fileName, lineNo, false); + public static MIStoppedEvent runToLine(final String fileName, final String lineNo) throws Throwable { + return runToLine(fGdbContainerDmc, fileName, lineNo, false); } - public static int SyncAddBreakpoint(final String location) throws Throwable { - return SyncAddBreakpoint(location, true); + public static int addBreakpoint(final String location) throws Throwable { + return addBreakpoint(location, true); } - public static int SyncAddBreakpoint(final String location, boolean temporary) + public static int addBreakpoint(final String location, boolean temporary) throws Throwable { final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -197,7 +197,7 @@ public class SyncUtil { } - public static int[] SyncGetBreakpointList() throws Throwable { + public static int[] getBreakpointList() throws Throwable { final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -225,11 +225,11 @@ public class SyncUtil { return result; } - public static void SyncDeleteBreakpoint(int breakpointIndex) throws Throwable { - SyncDeleteBreakpoint(new int[] {breakpointIndex}); + public static void deleteBreakpoint(int breakpointIndex) throws Throwable { + deleteBreakpoint(new int[] {breakpointIndex}); } - public static void SyncDeleteBreakpoint(int[] breakpointIndices) throws Throwable { + public static void deleteBreakpoint(int[] breakpointIndices) throws Throwable { final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -254,7 +254,7 @@ public class SyncUtil { } - public static MIStoppedEvent SyncResumeUntilStopped(final IExecutionDMContext dmc) throws Throwable { + public static MIStoppedEvent resumeUntilStopped(final IExecutionDMContext dmc) throws Throwable { final ServiceEventWaitor eventWaitor = new ServiceEventWaitor( fSession, @@ -274,11 +274,11 @@ public class SyncUtil { return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER); } - public static MIStoppedEvent SyncResumeUntilStopped() throws Throwable { - return SyncResumeUntilStopped(fGdbContainerDmc); + public static MIStoppedEvent resumeUntilStopped() throws Throwable { + return resumeUntilStopped(fGdbContainerDmc); } - public static MIRunningEvent SyncResume(final IExecutionDMContext dmc) throws Throwable { + public static MIRunningEvent resume(final IExecutionDMContext dmc) throws Throwable { final ServiceEventWaitor eventWaitor = new ServiceEventWaitor( fSession, @@ -298,11 +298,11 @@ public class SyncUtil { return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER); } - public static MIRunningEvent SyncResume() throws Throwable { - return SyncResume(fGdbContainerDmc); + public static MIRunningEvent resume() throws Throwable { + return resume(fGdbContainerDmc); } - public static MIStoppedEvent SyncWaitForStop() throws Throwable { + public static MIStoppedEvent waitForStop() throws Throwable { final ServiceEventWaitor eventWaitor = new ServiceEventWaitor( fSession, @@ -312,15 +312,15 @@ public class SyncUtil { return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER); } - public static MIStoppedEvent SyncRunToLocation(final String location) throws Throwable { + public static MIStoppedEvent runToLocation(final String location) throws Throwable { // Set a temporary breakpoint and run to it. // Note that if there were other breakpoints set ahead of this one, // they will stop execution earlier than planned - SyncAddBreakpoint(location, true); - return SyncResumeUntilStopped(); + addBreakpoint(location, true); + return resumeUntilStopped(); } - public static IFrameDMContext SyncGetStackFrame(final IExecutionDMContext execCtx, final int level) throws Throwable { + public static IFrameDMContext getStackFrame(final IExecutionDMContext execCtx, final int level) throws Throwable { class StackFrameQuery extends Query { @Override protected void execute(final DataRequestMonitor rm) { @@ -343,7 +343,7 @@ public class SyncUtil { return sfQuery.get(); } - public static IExpressionDMContext SyncCreateExpression(final IDMContext parentCtx, final String expression) + public static IExpressionDMContext createExpression(final IDMContext parentCtx, final String expression) throws Throwable { Callable callable = new Callable() { public IExpressionDMContext call() throws Exception { @@ -353,7 +353,7 @@ public class SyncUtil { return fSession.getExecutor().submit(callable).get(); } - public static FormattedValueDMContext SyncGetFormattedValue( + public static FormattedValueDMContext getFormattedValue( final IFormattedValues service, final IFormattedDataDMContext dmc, final String formatId) throws Throwable { Callable callable = new Callable() { @@ -364,7 +364,7 @@ public class SyncUtil { return fSession.getExecutor().submit(callable).get(); } - public static IMIExecutionDMContext SyncCreateExecutionContext(final IContainerDMContext parentCtx, final int threadId) + public static IMIExecutionDMContext createExecutionContext(final IContainerDMContext parentCtx, final int threadId) throws Throwable { Callable callable = new Callable() { public IMIExecutionDMContext call() throws Exception { diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java index d6a077ee1a6..1e6f8333bcd 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java @@ -130,7 +130,8 @@ public class MIBreakpointsTest extends BaseTestCase { // Target application 'special' locations private final int LINE_NUMBER_1 = 20; private final int LINE_NUMBER_2 = 21; - private final int LINE_NUMBER_3 = 27; + @SuppressWarnings("unused") + private final int LINE_NUMBER_3 = 27; private final int LINE_NUMBER_4 = 36; private final int LINE_NUMBER_5 = 49; private final int LINE_NUMBER_6 = 50; @@ -345,8 +346,8 @@ public class MIBreakpointsTest extends BaseTestCase { assert (fExpressionService != null); // Get a stack context (temporary - should be an MIcontainerDMC) - final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(ctx, expression); - final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService, + final IExpressionDMContext expressionDMC = SyncUtil.createExpression(ctx, expression); + final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService, expressionDMC, IFormattedValues.DECIMAL_FORMAT); // Create the DataRequestMonitor which will store the operation result in the wait object @@ -1192,14 +1193,14 @@ public class MIBreakpointsTest extends BaseTestCase { breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); // Install the breakpoint MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint); assertTrue(fWait.getMessage(), fWait.isOK()); // Wait for breakpoint to hit - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(2); @@ -1376,14 +1377,14 @@ public class MIBreakpointsTest extends BaseTestCase { watchpoint.put(WRITE_TAG, true); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); // Install watchpoint IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint); assertTrue(fWait.getMessage(), fWait.isOK()); // Wait for breakpoint to hit - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure that right BreakpointEvents were received waitForBreakpointEvent(2); @@ -1668,13 +1669,13 @@ public class MIBreakpointsTest extends BaseTestCase { assertTrue(fWait.getMessage(), fWait.isOK()); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); // Remove the first breakpoint removeBreakpoint(ref); assertTrue(fWait.getMessage(), fWait.isOK()); - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(4); @@ -1894,12 +1895,12 @@ public class MIBreakpointsTest extends BaseTestCase { delta.put(CONDITION_TAG, CONDITION_5); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); //Update the condition updateBreakpoint(ref, delta); assertTrue(fWait.getMessage(), fWait.isOK()); - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure that right BreakpointEvents were received waitForBreakpointEvent(2); @@ -1935,8 +1936,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -1990,8 +1991,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -2046,8 +2047,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -2261,13 +2262,13 @@ public class MIBreakpointsTest extends BaseTestCase { delta.put(IGNORE_COUNT_TAG, 0); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); //Update the count updateBreakpoint(ref, delta); assertTrue(fWait.getMessage(), fWait.isOK()); - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure that right BreakpointEvents were received waitForBreakpointEvent(2); @@ -2353,7 +2354,7 @@ public class MIBreakpointsTest extends BaseTestCase { !breakpoint1.isEnabled() && breakpoint2.isEnabled()); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the BreakpointEvent was received waitForBreakpointEvent(1); @@ -2402,13 +2403,13 @@ public class MIBreakpointsTest extends BaseTestCase { delta.put(IS_ENABLED_TAG, false); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); // Disable the breakpoint updateBreakpoint(ref, delta); assertTrue(fWait.getMessage(), fWait.isOK()); - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure that right BreakpointEvents were received waitForBreakpointEvent(2); @@ -2490,7 +2491,7 @@ public class MIBreakpointsTest extends BaseTestCase { !breakpoint1.isEnabled() && breakpoint2.isEnabled()); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the BreakpointEvent was received waitForBreakpointEvent(1); @@ -2523,7 +2524,7 @@ public class MIBreakpointsTest extends BaseTestCase { breakpoint1.isEnabled() && breakpoint2.isEnabled()); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the BreakpointEvent was received waitForBreakpointEvent(1); @@ -2568,13 +2569,13 @@ public class MIBreakpointsTest extends BaseTestCase { delta.put(IS_ENABLED_TAG, true); // Run the program - SyncUtil.SyncResume(); + SyncUtil.resume(); // Enable the breakpoint updateBreakpoint(ref, delta); assertTrue(fWait.getMessage(), fWait.isOK()); - MIStoppedEvent event = SyncUtil.SyncWaitForStop(); + MIStoppedEvent event = SyncUtil.waitForStop(); // Ensure that right BreakpointEvents were received waitForBreakpointEvent(2); @@ -2622,7 +2623,7 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2662,7 +2663,7 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2705,8 +2706,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2766,8 +2767,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2814,8 +2815,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2875,8 +2876,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2921,8 +2922,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -2967,8 +2968,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -3014,8 +3015,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -3046,8 +3047,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -3083,8 +3084,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -3116,8 +3117,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -3153,8 +3154,8 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); @@ -3187,8 +3188,8 @@ public class MIBreakpointsTest extends BaseTestCase { if (fileName.contains(" ")) { //$NON-NLS-1$ fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$ } - SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true); - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true); + SyncUtil.resumeUntilStopped(); clearEventCounters(); // Create a write watchpoint @@ -3213,7 +3214,7 @@ public class MIBreakpointsTest extends BaseTestCase { clearEventCounters(); // Run until the breakpoint is hit and the event generated - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); // Ensure the correct BreakpointEvent was received waitForBreakpointEvent(1); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java index f2a540d4589..2a29b5ffe21 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java @@ -138,11 +138,11 @@ public class MIDisassemblyTest extends BaseTestCase { private IAddress evaluateExpression(String expression) throws Throwable { MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Create the expression and format contexts - final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(frameDmc, expression); - final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT); + final IExpressionDMContext expressionDMC = SyncUtil.createExpression(frameDmc, expression); + final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT); // Create the DataRequestMonitor which will store the operation result in the wait object final DataRequestMonitor drm = diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java index a983e90bcfc..50b93fa6d94 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java @@ -123,7 +123,7 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testLiteralIntegerExpressions() throws Throwable { - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testLocals"); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testLocals"); // Create a map of expressions and their expected values. Map tests = new HashMap(); @@ -138,7 +138,7 @@ public class MIExpressionsTest extends BaseTestCase { tests.put("10 + -15", new String[] { "0xFFFFFFFB", "037777777773", "11111111111111111111111111111011", "-5", "-5", "-5" }); - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); } /** @@ -146,7 +146,7 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testLiteralFloatingPointExpressions() throws Throwable { - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testLocals"); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testLocals"); // Create a map of expressions and their expected values. Map tests = new HashMap(); @@ -158,7 +158,7 @@ public class MIExpressionsTest extends BaseTestCase { tests.put("-100.0 / -3.0", new String[] { "0x21", "041", "100001", "33", "33.333333333333336", "33.333333333333336" }); tests.put("100.0 / 0.5", new String[] { "0xc8", "0310", "11001000", "200", "200", "200" }); - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); } /** @@ -168,8 +168,8 @@ public class MIExpressionsTest extends BaseTestCase { @Test public void testLocalVariables() throws Throwable { // Run to the point where all local variables are initialized - SyncUtil.SyncRunToLocation("testLocals"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 16); + SyncUtil.runToLocation("testLocals"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 16); // Create a map of expressions to expected values. Map tests1 = new HashMap(); @@ -196,12 +196,12 @@ public class MIExpressionsTest extends BaseTestCase { // "1001000110100", "4660", "0x1234" }); tests1.put("lBoolPtr2", new String[] { "0x123ABCDE", "02216536336", "10010001110101011110011011110", "305839326", "0x123ABCDE", "0x123ABCDE" }); - executeExpressionSubTests(tests1, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests1, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); // Step into the method and stop until all new local variables are // initialized - SyncUtil.SyncStep(StepType.STEP_INTO); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 5); + SyncUtil.step(StepType.STEP_INTO); + stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 5); // Create a map of expressions to expected values. Map tests2 = new HashMap(); @@ -215,15 +215,15 @@ public class MIExpressionsTest extends BaseTestCase { "2882396451", "0xABCDE123","0xABCDE123" }); // check variables at current stack frame - executeExpressionSubTests(tests2, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests2, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); // check previous stack frame - executeExpressionSubTests(tests1, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 1)); + executeExpressionSubTests(tests1, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 1)); // Now return from the method and check that we see the // original variables. We must use the right context to restore the right stack frame - stoppedEvent = SyncUtil.SyncStep(stoppedEvent.getDMContext(), StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(stoppedEvent.getDMContext(), StepType.STEP_RETURN); - executeExpressionSubTests(tests1, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests1, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); } /** @@ -233,9 +233,9 @@ public class MIExpressionsTest extends BaseTestCase { @Ignore("Sublocks do not work with GDB") @Test public void testSubBlock() throws Throwable { - SyncUtil.SyncRunToLocation("testSubblock"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testSubblock"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); Map tests = new HashMap(); @@ -245,7 +245,7 @@ public class MIExpressionsTest extends BaseTestCase { executeExpressionSubTests(tests, frameDmc); // Now enter a subblock with the same variable names - SyncUtil.SyncStep(StepType.STEP_OVER, 2); + SyncUtil.step(StepType.STEP_OVER, 2); tests = new HashMap(); @@ -255,7 +255,7 @@ public class MIExpressionsTest extends BaseTestCase { executeExpressionSubTests(tests, frameDmc); // Now step to change the b variable - SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.step(StepType.STEP_OVER, 1); tests = new HashMap(); @@ -266,7 +266,7 @@ public class MIExpressionsTest extends BaseTestCase { // Now exit the sub-block and check that we see the original a but the // same b - SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.step(StepType.STEP_OVER, 1); tests = new HashMap(); @@ -283,11 +283,11 @@ public class MIExpressionsTest extends BaseTestCase { public void testChildren() throws Throwable { // Get the children of some variables - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testChildren"); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testChildren"); doTestChildren(stoppedEvent); // Now do a step and get the children again, to test the internal cache - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); doTestChildren(stoppedEvent); } @@ -296,11 +296,11 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testWriteVariable() throws Throwable { - SyncUtil.SyncRunToLocation("testWrite"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testWrite"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]"); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); + final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]"); writeAndCheck(exprDmc, "987", IFormattedValues.DECIMAL_FORMAT, "987"); writeAndCheck(exprDmc, "16", IFormattedValues.HEX_FORMAT, "22"); @@ -382,11 +382,11 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testWriteErrorFormat() throws Throwable { - SyncUtil.SyncRunToLocation("testWrite"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testWrite"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); - IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]"); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); + IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]"); writeAndCheckError(exprDmc, "goodbye", IFormattedValues.DECIMAL_FORMAT); writeAndCheckError(exprDmc, "abggg", IFormattedValues.HEX_FORMAT); @@ -395,7 +395,7 @@ public class MIExpressionsTest extends BaseTestCase { writeAndCheckError(exprDmc, "hello", IFormattedValues.NATURAL_FORMAT); writeAndCheckError(exprDmc, "1", "ThisFormatDoesNotExist"); - IExpressionDMContext notWritableExprDmc = SyncUtil.SyncCreateExpression(frameDmc, "10+5"); + IExpressionDMContext notWritableExprDmc = SyncUtil.createExpression(frameDmc, "10+5"); writeAndCheckError(notWritableExprDmc, "1", IFormattedValues.NATURAL_FORMAT); } @@ -438,10 +438,10 @@ public class MIExpressionsTest extends BaseTestCase { // Next we test that we can read the value more than once // of the same variable object at the exact same time - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -507,15 +507,15 @@ public class MIExpressionsTest extends BaseTestCase { // Next we test that we can retrieve children while reading the value // and vice-versa - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); // First we get the expected value of the array pointer. - final IExpressionDMContext addrDmc = SyncUtil.SyncCreateExpression(frameDmc, "&a"); + final IExpressionDMContext addrDmc = SyncUtil.createExpression(frameDmc, "&a"); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -629,15 +629,15 @@ public class MIExpressionsTest extends BaseTestCase { // Next we test that we can retrieve children count while reading the // value and vice-versa - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); // First we get the expected value of the array pointer. - final IExpressionDMContext addrDmc = SyncUtil.SyncCreateExpression(frameDmc, "&a"); + final IExpressionDMContext addrDmc = SyncUtil.createExpression(frameDmc, "&a"); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -744,12 +744,12 @@ public class MIExpressionsTest extends BaseTestCase { // at // the same time and vice-versa - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]"); + final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]"); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -833,12 +833,12 @@ public class MIExpressionsTest extends BaseTestCase { // go through at any time and we don't exactly know when it will // change the value we are reading. - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]"); + final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]"); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -969,12 +969,12 @@ public class MIExpressionsTest extends BaseTestCase { // Test the cache by changing a value but triggering a read before the // write clears the cache - SyncUtil.SyncRunToLocation("testConcurrent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.runToLocation("testConcurrent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]"); + final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]"); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1113,14 +1113,14 @@ public class MIExpressionsTest extends BaseTestCase { @Test public void testExprAddress() throws Throwable { - SyncUtil.SyncRunToLocation("testAddress"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2); + SyncUtil.runToLocation("testAddress"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a"); + final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a"); - final IExpressionDMContext exprDmc2 = SyncUtil.SyncCreateExpression(frameDmc, "a_ptr"); + final IExpressionDMContext exprDmc2 = SyncUtil.createExpression(frameDmc, "a_ptr"); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1166,7 +1166,7 @@ public class MIExpressionsTest extends BaseTestCase { public void testGlobalVariables() throws Throwable { // Step to a stack level of 2 to be able to test differen stack frames - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("locals2"); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("locals2"); // Create a map of expressions to expected values. Map tests = new HashMap(); @@ -1196,9 +1196,9 @@ public class MIExpressionsTest extends BaseTestCase { "313249263", "0x12ABCDEF", "0x12ABCDEF" }); // Try different stack frames - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0)); - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 1)); - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 2)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 1)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 2)); } /** @@ -1208,24 +1208,24 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testNamingSameDepth() throws Throwable { - SyncUtil.SyncRunToLocation("testName1"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testName1"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); Map tests = new HashMap(); tests.put("a", new String[] { "0x1", "01", "1", "1", "1", "1" }); executeExpressionSubTests(tests, frameDmc); - SyncUtil.SyncRunToLocation("testName2"); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 1); - frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testName2"); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 1); + frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); tests = new HashMap(); tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" }); executeExpressionSubTests(tests, frameDmc); - SyncUtil.SyncRunToLocation("testName1"); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 1); - frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testName1"); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 1); + frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); tests = new HashMap(); tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" }); executeExpressionSubTests(tests, frameDmc); @@ -1237,24 +1237,24 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testNamingSameMethod() throws Throwable { - SyncUtil.SyncRunToLocation("testSameName"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testSameName"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); Map tests = new HashMap(); tests.put("a", new String[] { "0x1", "01", "1", "1", "1" , "1" }); executeExpressionSubTests(tests, frameDmc); - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2); - frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2); + frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); tests = new HashMap(); tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" }); executeExpressionSubTests(tests, frameDmc); - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2); - frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2); + frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); tests = new HashMap(); tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" }); executeExpressionSubTests(tests, frameDmc); @@ -1268,8 +1268,8 @@ public class MIExpressionsTest extends BaseTestCase { public void testThreadContext() throws Throwable { // Step to a stack level of 2 to be able to test differen stack frames - SyncUtil.SyncRunToLocation("locals2"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER); + SyncUtil.runToLocation("locals2"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER); // Create a map of expressions to expected values. Map tests = new HashMap(); @@ -1277,7 +1277,7 @@ public class MIExpressionsTest extends BaseTestCase { // First make sure we have a different value on the other stack frame and that we select // a frame that is not the top frame tests.put("lIntVar", new String[] { "0x3039", "030071", "11000000111001", "12345", "12345", "12345" }); - executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 1)); + executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 1)); // Now check that we get the same values as the top stack when selecting the thread only tests = new HashMap(); @@ -1291,9 +1291,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testChildNamingSameMethod() throws Throwable { - SyncUtil.SyncRunToLocation("testSameName"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testSameName"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1346,9 +1346,9 @@ public class MIExpressionsTest extends BaseTestCase { assertTrue(wait.getMessage(), wait.isOK()); wait.waitReset(); - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -1398,9 +1398,9 @@ public class MIExpressionsTest extends BaseTestCase { assertTrue(wait.getMessage(), wait.isOK()); wait.waitReset(); - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4); - final IFrameDMContext frameDmc3 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4); + final IFrameDMContext frameDmc3 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -1458,21 +1458,21 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testUpdatingChildren() throws Throwable { - SyncUtil.SyncRunToLocation("testUpdateChildren"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testUpdateChildren"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); doUpdateTest(frameDmc, 0); // Re-run the test to test out-of-scope update again - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 3); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 3); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); doUpdateTest(frameDmc2, 100); // Re-run the test within a different method test out-of-scope updates - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 3); - final IFrameDMContext frameDmc3 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 3); + final IFrameDMContext frameDmc3 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); doUpdateTest(frameDmc3, 200); } @@ -1554,8 +1554,8 @@ public class MIExpressionsTest extends BaseTestCase { // Now step to change the value of a.z.x and a.z.y and verify the changed values. // This will confirm that the parent "a" will have been properly updated // It is a better test to do it for two children because it tests concurrent update requests - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -1636,9 +1636,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testDeleteChildren() throws Throwable { - SyncUtil.SyncRunToLocation("testDeleteChildren"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testDeleteChildren"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1773,9 +1773,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testUpdateGDBBug() throws Throwable { - SyncUtil.SyncRunToLocation("testUpdateGDBBug"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testUpdateGDBBug"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1812,8 +1812,8 @@ public class MIExpressionsTest extends BaseTestCase { wait.waitReset(); // Now step to change the value of "a" and ask for it again - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -1872,9 +1872,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testUpdateIssue() throws Throwable { - SyncUtil.SyncRunToLocation("testUpdateIssue"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testUpdateIssue"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -1932,8 +1932,8 @@ public class MIExpressionsTest extends BaseTestCase { wait.waitReset(); // Now step to change the value of "a" and ask for it again but in the natural format - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -1991,9 +1991,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testUpdateIssue2() throws Throwable { - SyncUtil.SyncRunToLocation("testUpdateIssue2"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testUpdateIssue2"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2068,7 +2068,7 @@ public class MIExpressionsTest extends BaseTestCase { wait.waitReset(); // Now step to change the value of "a" in natural but it remains the same in decimal - SyncUtil.SyncStep(StepType.STEP_OVER, 1); + SyncUtil.step(StepType.STEP_OVER, 1); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -2109,9 +2109,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testConcurrentReadAndUpdateChild() throws Throwable { - SyncUtil.SyncRunToLocation("testConcurrentReadAndUpdateChild"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testConcurrentReadAndUpdateChild"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2224,10 +2224,10 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test(timeout=5000) public void testConcurrentUpdateOutOfScopeChildThenParent() throws Throwable { - SyncUtil.SyncRunToLocation("testConcurrentUpdateOutOfScopeChildThenParent"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2); + SyncUtil.runToLocation("testConcurrentUpdateOutOfScopeChildThenParent"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2277,8 +2277,8 @@ public class MIExpressionsTest extends BaseTestCase { assertTrue(wait.getMessage(), wait.isOK()); wait.waitReset(); - SyncUtil.SyncStep(StepType.STEP_RETURN); - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2); + SyncUtil.step(StepType.STEP_RETURN); + stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2); // Now step to another method to make the previous variable objects out-of-scope // then first request the child and then the parent. We want to test this order @@ -2367,9 +2367,9 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testUpdateOfPointer() throws Throwable { - SyncUtil.SyncRunToLocation("testUpdateOfPointer"); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 3); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.runToLocation("testUpdateOfPointer"); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 3); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final String firstValue = "1"; final String secondValue = "2"; @@ -2486,8 +2486,8 @@ public class MIExpressionsTest extends BaseTestCase { wait.waitReset(); // Now step to change the values of all the children - stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2); - final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2); + final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); fExpService.getExecutor().submit(new Runnable() { public void run() { @@ -2606,8 +2606,8 @@ public class MIExpressionsTest extends BaseTestCase { */ @Test public void testCanWrite() throws Throwable { - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testCanWrite"); - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2672,8 +2672,8 @@ public class MIExpressionsTest extends BaseTestCase { @Ignore("Only works in versions later than GDB6.7") @Test public void testCanWriteLValue() throws Throwable { - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testCanWrite"); // Re-use test - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); // Re-use test + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2742,7 +2742,7 @@ public class MIExpressionsTest extends BaseTestCase { // Get an IExpressionDMContext object representing the expression to // be evaluated. - final IExpressionDMContext exprDMC = SyncUtil.SyncCreateExpression(dmc, expressionToEvaluate); + final IExpressionDMContext exprDMC = SyncUtil.createExpression(dmc, expressionToEvaluate); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); @@ -2882,9 +2882,9 @@ public class MIExpressionsTest extends BaseTestCase { private void doTestChildren(MIStoppedEvent stoppedEvent) throws Throwable { - final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); - final IExpressionDMContext exprDMC = SyncUtil.SyncCreateExpression(frameDmc, "f"); + final IExpressionDMContext exprDMC = SyncUtil.createExpression(frameDmc, "f"); IExpressionDMContext[] children = getChildren(exprDMC, new String[] {"bar", "bar2", "a", "b", "c"}); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java index 8b31f15bf56..68ccdaf57dc 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java @@ -212,8 +212,8 @@ public class MIMemoryTest extends BaseTestCase { private IAddress evaluateExpression(IDMContext ctx, String expression) throws Throwable { // Create the expression and format contexts - final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(ctx, expression); - final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT); + final IExpressionDMContext expressionDMC = SyncUtil.createExpression(ctx, expression); + final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT); // Create the DataRequestMonitor which will store the operation result in the wait object final DataRequestMonitor drm = @@ -443,10 +443,10 @@ public class MIMemoryTest extends BaseTestCase { public void readWithNullContext() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters IMemoryDMContext dmc = null; @@ -476,9 +476,9 @@ public class MIMemoryTest extends BaseTestCase { public void readWithInvalidAddress() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Setup call parameters long offset = 0; @@ -509,10 +509,10 @@ public class MIMemoryTest extends BaseTestCase { public void readWithInvalidWordSize() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -547,10 +547,10 @@ public class MIMemoryTest extends BaseTestCase { public void readWithInvalidCount() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -579,10 +579,10 @@ public class MIMemoryTest extends BaseTestCase { public void readCharVaryingBaseAddress() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -603,9 +603,9 @@ public class MIMemoryTest extends BaseTestCase { } // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Verify that all bytes are set for (int i = 0; i < BLOCK_SIZE; i++) { @@ -631,10 +631,10 @@ public class MIMemoryTest extends BaseTestCase { public void readCharVaryingOffset() throws Throwable { // Run to the point where the array is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters int word_size = 1; @@ -653,9 +653,9 @@ public class MIMemoryTest extends BaseTestCase { } // Run to the point where the array is set - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Verify that all bytes are set for (int offset = 0; offset < BLOCK_SIZE; offset++) { @@ -680,10 +680,10 @@ public class MIMemoryTest extends BaseTestCase { public void readCharArray() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -705,9 +705,9 @@ public class MIMemoryTest extends BaseTestCase { } // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Get the memory block fWait.waitReset(); @@ -738,10 +738,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeWithNullContext() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -771,9 +771,9 @@ public class MIMemoryTest extends BaseTestCase { public void writeWithInvalidAddress() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Setup call parameters long offset = 0; @@ -803,10 +803,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeWithInvalidWordSize() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -842,10 +842,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeWithInvalidCount() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -875,10 +875,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeWithInvalidBuffer() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -908,10 +908,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeCharVaryingAddress() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -972,10 +972,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeCharVaryingOffset() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); int word_size = 1; int count = BLOCK_SIZE; @@ -1032,10 +1032,10 @@ public class MIMemoryTest extends BaseTestCase { public void writeCharArray() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1094,10 +1094,10 @@ public class MIMemoryTest extends BaseTestCase { public void fillWithNullContext() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1127,9 +1127,9 @@ public class MIMemoryTest extends BaseTestCase { public void fillWithInvalidAddress() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - SyncUtil.SyncStep(StepType.STEP_RETURN); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + SyncUtil.step(StepType.STEP_RETURN); // Setup call parameters long offset = 0; @@ -1159,10 +1159,10 @@ public class MIMemoryTest extends BaseTestCase { public void fillWithInvalidWordSize() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1198,10 +1198,10 @@ public class MIMemoryTest extends BaseTestCase { public void fillWithInvalidCount() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1231,10 +1231,10 @@ public class MIMemoryTest extends BaseTestCase { public void fillWithInvalidPattern() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1264,10 +1264,10 @@ public class MIMemoryTest extends BaseTestCase { public void writePatternVaryingAddress() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1325,10 +1325,10 @@ public class MIMemoryTest extends BaseTestCase { public void writePatternVaryingOffset() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1386,10 +1386,10 @@ public class MIMemoryTest extends BaseTestCase { public void writePatternCountTimes() throws Throwable { // Run to the point where the variable is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1444,10 +1444,10 @@ public class MIMemoryTest extends BaseTestCase { public void asynchronousReadWrite() throws Throwable { // Run to the point where the array is zeroed - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters int word_size = 1; @@ -1507,10 +1507,10 @@ public class MIMemoryTest extends BaseTestCase { public void memoryCacheRead() throws Throwable { // Run to the point where the variable is initialized - SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true); - SyncUtil.SyncResumeUntilStopped(); - MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true); + SyncUtil.resumeUntilStopped(); + MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); // Setup call parameters long offset = 0; @@ -1532,7 +1532,7 @@ public class MIMemoryTest extends BaseTestCase { } // Clear the cache - SyncUtil.SyncStep(StepType.STEP_OVER); + SyncUtil.step(StepType.STEP_OVER); // Get a first block fWait.waitReset(); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java index 0d4df9247a4..66dea40b639 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java @@ -210,7 +210,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void getRegistersLength() throws Throwable { MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final IRegisterDMContext[] regDMCs = getRegisters(frameDmc); assertTrue("The number of registers should have been " + NUMBER_OF_REGISTERS + " instead of " + regDMCs.length, @@ -221,7 +221,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void getRegisters() throws Throwable { MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final IRegisterDMContext[] regDMCs = getRegisters(frameDmc); List regNames = Arrays.asList("eax","ecx","edx","ebx","esp","ebp","esi","edi","eip","eflags","cs","ss","ds","es","fs","gs","st0","st1","st2","st3","st4","st5","st6","st7","fctrl","fstat","ftag","fiseg","fioff","foseg","fooff","fop","xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7","mxcsr","orig_eax","mm0","mm1","mm2","mm3","mm4","mm5","mm6","mm7"); @@ -295,7 +295,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void getModelDataForRegisterDataValueInDifferentNumberFormats() throws Throwable { MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); String val = getModelDataForRegisterDataValue(frameDmc, IFormattedValues.NATURAL_FORMAT, 0); REGISTER_VALUE = val; assertTrue("Register Value is not in NATURAL format " , Integer.parseInt(val)== Integer.parseInt(REGISTER_VALUE)); @@ -316,12 +316,12 @@ public class MIRegistersTest extends BaseTestCase { @Test public void compareRegisterForMultipleExecutionContexts() throws Throwable { - MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLine(SRC_NAME, "22"); + MIStoppedEvent stoppedEvent = SyncUtil.runToLine(SRC_NAME, "22"); IContainerDMContext containerDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(), IContainerDMContext.class); // Get execution context to thread 2 - IExecutionDMContext execDmc = SyncUtil.SyncCreateExecutionContext(containerDmc, 2); - IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(execDmc, 0); + IExecutionDMContext execDmc = SyncUtil.createExecutionContext(containerDmc, 2); + IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(execDmc, 0); String thread2RegVal0 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 0); String thread2RegVal1 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 1); @@ -331,8 +331,8 @@ public class MIRegistersTest extends BaseTestCase { String thread2RegVal5 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 5); // Get execution context to thread 1 - execDmc = SyncUtil.SyncCreateExecutionContext(containerDmc, 2); - IFrameDMContext frameDmc1 = SyncUtil.SyncGetStackFrame(execDmc, 0); + execDmc = SyncUtil.createExecutionContext(containerDmc, 2); + IFrameDMContext frameDmc1 = SyncUtil.getStackFrame(execDmc, 0); getModelDataForRegisterDataValue(frameDmc1, IFormattedValues.NATURAL_FORMAT, 0); // Re-set the execution context to 2 and Fetch from the Cache @@ -381,7 +381,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void writeRegisterNaturalFormat() throws Throwable{ MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); String regValue = "10"; int regIndex = 3; writeRegister(frameDmc, 3, regValue, IFormattedValues.NATURAL_FORMAT); @@ -392,7 +392,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void writeRegisterHEXFormat() throws Throwable{ MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); String regValue = "0x10"; int regIndex = 3; writeRegister(frameDmc, 3, regValue, IFormattedValues.HEX_FORMAT); @@ -404,7 +404,7 @@ public class MIRegistersTest extends BaseTestCase { @Ignore public void writeRegisterBinaryFormat() throws Throwable{ MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); //String regValue = "0100101001"; String regValue = "10"; int regIndex = 3; @@ -416,7 +416,7 @@ public class MIRegistersTest extends BaseTestCase { @Test public void writeRegisterOctalFormat() throws Throwable{ MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); - IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0); + IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); //String regValue = "10"; String regValue = "012"; int regIndex = 3; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java index e58278cc151..6550cac6f1f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java @@ -190,7 +190,7 @@ public class MIRunControlTest extends BaseTestCase { /* * Run till line for 2 threads to be created */ - SyncUtil.SyncRunToLine(fContainerDmc, SOURCE_NAME, "22", true); + SyncUtil.runToLine(fContainerDmc, SOURCE_NAME, "22", true); } catch(Throwable t){ Assert.fail("Exception in SyncUtil.SyncRunToLine: " + t.getMessage()); @@ -294,7 +294,7 @@ public class MIRunControlTest extends BaseTestCase { /* * Run till step returns */ - final MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER); + final MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER); final DataRequestMonitor rm = new DataRequestMonitor(fRunCtrl.getExecutor(), null) { @@ -338,12 +338,12 @@ public class MIRunControlTest extends BaseTestCase { /* * Add a breakpoint */ - SyncUtil.SyncAddBreakpoint(SOURCE_NAME + ":21", false); + SyncUtil.addBreakpoint(SOURCE_NAME + ":21", false); /* * Resume till the breakpoint is hit */ - final MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped(); + final MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped(); final DataRequestMonitor rm = new DataRequestMonitor(fRunCtrl.getExecutor(), null) { @@ -384,11 +384,11 @@ public class MIRunControlTest extends BaseTestCase { /* * Add a breakpoint */ - SyncUtil.SyncAddBreakpoint(SOURCE_NAME + ":21", false); + SyncUtil.addBreakpoint(SOURCE_NAME + ":21", false); /* * Resume till the breakpoint is hit */ - SyncUtil.SyncResumeUntilStopped(); + SyncUtil.resumeUntilStopped(); final DataRequestMonitor rm = new DataRequestMonitor(fRunCtrl.getExecutor(), null) { @@ -459,7 +459,7 @@ public class MIRunControlTest extends BaseTestCase { * Step to fire ContainerSuspendEvent */ try { - SyncUtil.SyncStep(StepType.STEP_OVER); + SyncUtil.step(StepType.STEP_OVER); } catch (Throwable e) { Assert.fail("Exception in SyncUtil.SyncStep: " + e.getMessage()); }