mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Cleanup. Rename SyncUtil methods. Methods should start with a lowercase letter. Also having every method start with "Sync" is pointless.
This commit is contained in:
parent
4735712764
commit
d1b0dbacf4
7 changed files with 356 additions and 355 deletions
|
@ -89,19 +89,19 @@ public class SyncUtil {
|
||||||
tracker.dispose();
|
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;
|
MIStoppedEvent retVal = null;
|
||||||
for (int i=0; i<numSteps; i++) {
|
for (int i=0; i<numSteps; i++) {
|
||||||
retVal = SyncStep(stepType);
|
retVal = step(stepType);
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncStep(final StepType stepType) throws Throwable {
|
public static MIStoppedEvent step(final StepType stepType) throws Throwable {
|
||||||
return SyncStep(fGdbContainerDmc, stepType);
|
return step(fGdbContainerDmc, stepType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncStep(final IExecutionDMContext dmc, final StepType stepType) throws Throwable {
|
public static MIStoppedEvent step(final IExecutionDMContext dmc, final StepType stepType) throws Throwable {
|
||||||
|
|
||||||
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
||||||
new ServiceEventWaitor<MIStoppedEvent>(
|
new ServiceEventWaitor<MIStoppedEvent>(
|
||||||
|
@ -132,7 +132,7 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
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 boolean skipBreakpoints) throws Throwable {
|
||||||
|
|
||||||
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
||||||
|
@ -155,21 +155,21 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
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 {
|
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 {
|
public static MIStoppedEvent runToLine(final String fileName, final String lineNo) throws Throwable {
|
||||||
return SyncRunToLine(fGdbContainerDmc, fileName, lineNo, false);
|
return runToLine(fGdbContainerDmc, fileName, lineNo, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int SyncAddBreakpoint(final String location) throws Throwable {
|
public static int addBreakpoint(final String location) throws Throwable {
|
||||||
return SyncAddBreakpoint(location, true);
|
return addBreakpoint(location, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int SyncAddBreakpoint(final String location, boolean temporary)
|
public static int addBreakpoint(final String location, boolean temporary)
|
||||||
throws Throwable {
|
throws Throwable {
|
||||||
|
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -225,11 +225,11 @@ public class SyncUtil {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SyncDeleteBreakpoint(int breakpointIndex) throws Throwable {
|
public static void deleteBreakpoint(int breakpointIndex) throws Throwable {
|
||||||
SyncDeleteBreakpoint(new int[] {breakpointIndex});
|
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();
|
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<MIStoppedEvent> eventWaitor =
|
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
||||||
new ServiceEventWaitor<MIStoppedEvent>(
|
new ServiceEventWaitor<MIStoppedEvent>(
|
||||||
fSession,
|
fSession,
|
||||||
|
@ -274,11 +274,11 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncResumeUntilStopped() throws Throwable {
|
public static MIStoppedEvent resumeUntilStopped() throws Throwable {
|
||||||
return SyncResumeUntilStopped(fGdbContainerDmc);
|
return resumeUntilStopped(fGdbContainerDmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIRunningEvent SyncResume(final IExecutionDMContext dmc) throws Throwable {
|
public static MIRunningEvent resume(final IExecutionDMContext dmc) throws Throwable {
|
||||||
final ServiceEventWaitor<MIRunningEvent> eventWaitor =
|
final ServiceEventWaitor<MIRunningEvent> eventWaitor =
|
||||||
new ServiceEventWaitor<MIRunningEvent>(
|
new ServiceEventWaitor<MIRunningEvent>(
|
||||||
fSession,
|
fSession,
|
||||||
|
@ -298,11 +298,11 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIRunningEvent SyncResume() throws Throwable {
|
public static MIRunningEvent resume() throws Throwable {
|
||||||
return SyncResume(fGdbContainerDmc);
|
return resume(fGdbContainerDmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent SyncWaitForStop() throws Throwable {
|
public static MIStoppedEvent waitForStop() throws Throwable {
|
||||||
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
||||||
new ServiceEventWaitor<MIStoppedEvent>(
|
new ServiceEventWaitor<MIStoppedEvent>(
|
||||||
fSession,
|
fSession,
|
||||||
|
@ -312,15 +312,15 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(ServiceEventWaitor.WAIT_FOREVER);
|
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.
|
// Set a temporary breakpoint and run to it.
|
||||||
// Note that if there were other breakpoints set ahead of this one,
|
// Note that if there were other breakpoints set ahead of this one,
|
||||||
// they will stop execution earlier than planned
|
// they will stop execution earlier than planned
|
||||||
SyncAddBreakpoint(location, true);
|
addBreakpoint(location, true);
|
||||||
return SyncResumeUntilStopped();
|
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<IFrameDMContext> {
|
class StackFrameQuery extends Query<IFrameDMContext> {
|
||||||
@Override
|
@Override
|
||||||
protected void execute(final DataRequestMonitor<IFrameDMContext> rm) {
|
protected void execute(final DataRequestMonitor<IFrameDMContext> rm) {
|
||||||
|
@ -343,7 +343,7 @@ public class SyncUtil {
|
||||||
return sfQuery.get();
|
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 {
|
throws Throwable {
|
||||||
Callable<IExpressionDMContext> callable = new Callable<IExpressionDMContext>() {
|
Callable<IExpressionDMContext> callable = new Callable<IExpressionDMContext>() {
|
||||||
public IExpressionDMContext call() throws Exception {
|
public IExpressionDMContext call() throws Exception {
|
||||||
|
@ -353,7 +353,7 @@ public class SyncUtil {
|
||||||
return fSession.getExecutor().submit(callable).get();
|
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
|
final IFormattedValues service, final IFormattedDataDMContext dmc, final String formatId) throws Throwable
|
||||||
{
|
{
|
||||||
Callable<FormattedValueDMContext> callable = new Callable<FormattedValueDMContext>() {
|
Callable<FormattedValueDMContext> callable = new Callable<FormattedValueDMContext>() {
|
||||||
|
@ -364,7 +364,7 @@ public class SyncUtil {
|
||||||
return fSession.getExecutor().submit(callable).get();
|
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 {
|
throws Throwable {
|
||||||
Callable<IMIExecutionDMContext> callable = new Callable<IMIExecutionDMContext>() {
|
Callable<IMIExecutionDMContext> callable = new Callable<IMIExecutionDMContext>() {
|
||||||
public IMIExecutionDMContext call() throws Exception {
|
public IMIExecutionDMContext call() throws Exception {
|
||||||
|
|
|
@ -130,7 +130,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Target application 'special' locations
|
// Target application 'special' locations
|
||||||
private final int LINE_NUMBER_1 = 20;
|
private final int LINE_NUMBER_1 = 20;
|
||||||
private final int LINE_NUMBER_2 = 21;
|
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_4 = 36;
|
||||||
private final int LINE_NUMBER_5 = 49;
|
private final int LINE_NUMBER_5 = 49;
|
||||||
private final int LINE_NUMBER_6 = 50;
|
private final int LINE_NUMBER_6 = 50;
|
||||||
|
@ -345,8 +346,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
assert (fExpressionService != null);
|
assert (fExpressionService != null);
|
||||||
|
|
||||||
// Get a stack context (temporary - should be an MIcontainerDMC)
|
// Get a stack context (temporary - should be an MIcontainerDMC)
|
||||||
final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(ctx, expression);
|
final IExpressionDMContext expressionDMC = SyncUtil.createExpression(ctx, expression);
|
||||||
final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService,
|
final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService,
|
||||||
expressionDMC, IFormattedValues.DECIMAL_FORMAT);
|
expressionDMC, IFormattedValues.DECIMAL_FORMAT);
|
||||||
|
|
||||||
// Create the DataRequestMonitor which will store the operation result in the wait object
|
// 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);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Wait for breakpoint to hit
|
// Wait for breakpoint to hit
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -1376,14 +1377,14 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
watchpoint.put(WRITE_TAG, true);
|
watchpoint.put(WRITE_TAG, true);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
// Install watchpoint
|
// Install watchpoint
|
||||||
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
IBreakpointDMContext ref = insertBreakpoint(fBreakpointsDmc, watchpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Wait for breakpoint to hit
|
// Wait for breakpoint to hit
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -1668,13 +1669,13 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
// Remove the first breakpoint
|
// Remove the first breakpoint
|
||||||
removeBreakpoint(ref);
|
removeBreakpoint(ref);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(4);
|
waitForBreakpointEvent(4);
|
||||||
|
@ -1894,12 +1895,12 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
delta.put(CONDITION_TAG, CONDITION_5);
|
delta.put(CONDITION_TAG, CONDITION_5);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
//Update the condition
|
//Update the condition
|
||||||
updateBreakpoint(ref, delta);
|
updateBreakpoint(ref, delta);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -1935,8 +1936,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -1990,8 +1991,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -2046,8 +2047,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_1, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -2261,13 +2262,13 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
delta.put(IGNORE_COUNT_TAG, 0);
|
delta.put(IGNORE_COUNT_TAG, 0);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
//Update the count
|
//Update the count
|
||||||
updateBreakpoint(ref, delta);
|
updateBreakpoint(ref, delta);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -2353,7 +2354,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
!breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
!breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the BreakpointEvent was received
|
// Ensure the BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2402,13 +2403,13 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
delta.put(IS_ENABLED_TAG, false);
|
delta.put(IS_ENABLED_TAG, false);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
// Disable the breakpoint
|
// Disable the breakpoint
|
||||||
updateBreakpoint(ref, delta);
|
updateBreakpoint(ref, delta);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -2490,7 +2491,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
!breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
!breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the BreakpointEvent was received
|
// Ensure the BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2523,7 +2524,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
breakpoint1.isEnabled() && breakpoint2.isEnabled());
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the BreakpointEvent was received
|
// Ensure the BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2568,13 +2569,13 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
delta.put(IS_ENABLED_TAG, true);
|
delta.put(IS_ENABLED_TAG, true);
|
||||||
|
|
||||||
// Run the program
|
// Run the program
|
||||||
SyncUtil.SyncResume();
|
SyncUtil.resume();
|
||||||
|
|
||||||
// Enable the breakpoint
|
// Enable the breakpoint
|
||||||
updateBreakpoint(ref, delta);
|
updateBreakpoint(ref, delta);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
||||||
MIStoppedEvent event = SyncUtil.SyncWaitForStop();
|
MIStoppedEvent event = SyncUtil.waitForStop();
|
||||||
|
|
||||||
// Ensure that right BreakpointEvents were received
|
// Ensure that right BreakpointEvents were received
|
||||||
waitForBreakpointEvent(2);
|
waitForBreakpointEvent(2);
|
||||||
|
@ -2622,7 +2623,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2662,7 +2663,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2705,8 +2706,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2766,8 +2767,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2814,8 +2815,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2875,8 +2876,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2921,8 +2922,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -2967,8 +2968,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -3014,8 +3015,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -3046,8 +3047,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -3083,8 +3084,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -3116,8 +3117,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -3153,8 +3154,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
@ -3187,8 +3188,8 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
if (fileName.contains(" ")) { //$NON-NLS-1$
|
if (fileName.contains(" ")) { //$NON-NLS-1$
|
||||||
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
fileName = "\"" + fileName + "\""; //$NON-NLS-1$//$NON-NLS-2$
|
||||||
}
|
}
|
||||||
SyncUtil.SyncAddBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
SyncUtil.addBreakpoint(fileName + ":" + LINE_NUMBER_4, true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Create a write watchpoint
|
// Create a write watchpoint
|
||||||
|
@ -3213,7 +3214,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
|
||||||
// Run until the breakpoint is hit and the event generated
|
// Run until the breakpoint is hit and the event generated
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
// Ensure the correct BreakpointEvent was received
|
// Ensure the correct BreakpointEvent was received
|
||||||
waitForBreakpointEvent(1);
|
waitForBreakpointEvent(1);
|
||||||
|
|
|
@ -138,11 +138,11 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
private IAddress evaluateExpression(String expression) throws Throwable
|
private IAddress evaluateExpression(String expression) throws Throwable
|
||||||
{
|
{
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Create the expression and format contexts
|
// Create the expression and format contexts
|
||||||
final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(frameDmc, expression);
|
final IExpressionDMContext expressionDMC = SyncUtil.createExpression(frameDmc, expression);
|
||||||
final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT);
|
final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT);
|
||||||
|
|
||||||
// Create the DataRequestMonitor which will store the operation result in the wait object
|
// Create the DataRequestMonitor which will store the operation result in the wait object
|
||||||
final DataRequestMonitor<FormattedValueDMData> drm =
|
final DataRequestMonitor<FormattedValueDMData> drm =
|
||||||
|
|
|
@ -123,7 +123,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testLiteralIntegerExpressions() throws Throwable {
|
public void testLiteralIntegerExpressions() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testLocals");
|
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testLocals");
|
||||||
|
|
||||||
// Create a map of expressions and their expected values.
|
// Create a map of expressions and their expected values.
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
|
@ -138,7 +138,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
tests.put("10 + -15", new String[] { "0xFFFFFFFB", "037777777773", "11111111111111111111111111111011", "-5",
|
tests.put("10 + -15", new String[] { "0xFFFFFFFB", "037777777773", "11111111111111111111111111111011", "-5",
|
||||||
"-5", "-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
|
@Test
|
||||||
public void testLiteralFloatingPointExpressions() throws Throwable {
|
public void testLiteralFloatingPointExpressions() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testLocals");
|
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testLocals");
|
||||||
|
|
||||||
// Create a map of expressions and their expected values.
|
// Create a map of expressions and their expected values.
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
|
@ -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 / -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" });
|
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
|
@Test
|
||||||
public void testLocalVariables() throws Throwable {
|
public void testLocalVariables() throws Throwable {
|
||||||
// Run to the point where all local variables are initialized
|
// Run to the point where all local variables are initialized
|
||||||
SyncUtil.SyncRunToLocation("testLocals");
|
SyncUtil.runToLocation("testLocals");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 16);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 16);
|
||||||
|
|
||||||
// Create a map of expressions to expected values.
|
// Create a map of expressions to expected values.
|
||||||
Map<String, String[]> tests1 = new HashMap<String, String[]>();
|
Map<String, String[]> tests1 = new HashMap<String, String[]>();
|
||||||
|
@ -196,12 +196,12 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
// "1001000110100", "4660", "0x1234" });
|
// "1001000110100", "4660", "0x1234" });
|
||||||
tests1.put("lBoolPtr2", new String[] { "0x123ABCDE", "02216536336", "10010001110101011110011011110", "305839326", "0x123ABCDE", "0x123ABCDE" });
|
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
|
// Step into the method and stop until all new local variables are
|
||||||
// initialized
|
// initialized
|
||||||
SyncUtil.SyncStep(StepType.STEP_INTO);
|
SyncUtil.step(StepType.STEP_INTO);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 5);
|
stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 5);
|
||||||
|
|
||||||
// Create a map of expressions to expected values.
|
// Create a map of expressions to expected values.
|
||||||
Map<String, String[]> tests2 = new HashMap<String, String[]>();
|
Map<String, String[]> tests2 = new HashMap<String, String[]>();
|
||||||
|
@ -215,15 +215,15 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
"2882396451", "0xABCDE123","0xABCDE123" });
|
"2882396451", "0xABCDE123","0xABCDE123" });
|
||||||
|
|
||||||
// check variables at current stack frame
|
// check variables at current stack frame
|
||||||
executeExpressionSubTests(tests2, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0));
|
executeExpressionSubTests(tests2, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0));
|
||||||
// check previous stack frame
|
// 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
|
// 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
|
// 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")
|
@Ignore("Sublocks do not work with GDB")
|
||||||
@Test
|
@Test
|
||||||
public void testSubBlock() throws Throwable {
|
public void testSubBlock() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testSubblock");
|
SyncUtil.runToLocation("testSubblock");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
// Now enter a subblock with the same variable names
|
// Now enter a subblock with the same variable names
|
||||||
SyncUtil.SyncStep(StepType.STEP_OVER, 2);
|
SyncUtil.step(StepType.STEP_OVER, 2);
|
||||||
|
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
// Now step to change the b variable
|
// Now step to change the b variable
|
||||||
SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
|
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Now exit the sub-block and check that we see the original a but the
|
// Now exit the sub-block and check that we see the original a but the
|
||||||
// same b
|
// same b
|
||||||
SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
|
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
|
|
||||||
|
@ -283,11 +283,11 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
public void testChildren() throws Throwable {
|
public void testChildren() throws Throwable {
|
||||||
|
|
||||||
// Get the children of some variables
|
// Get the children of some variables
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testChildren");
|
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testChildren");
|
||||||
doTestChildren(stoppedEvent);
|
doTestChildren(stoppedEvent);
|
||||||
|
|
||||||
// Now do a step and get the children again, to test the internal cache
|
// 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);
|
doTestChildren(stoppedEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,11 +296,11 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWriteVariable() throws Throwable {
|
public void testWriteVariable() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testWrite");
|
SyncUtil.runToLocation("testWrite");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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 IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]");
|
final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]");
|
||||||
|
|
||||||
writeAndCheck(exprDmc, "987", IFormattedValues.DECIMAL_FORMAT, "987");
|
writeAndCheck(exprDmc, "987", IFormattedValues.DECIMAL_FORMAT, "987");
|
||||||
writeAndCheck(exprDmc, "16", IFormattedValues.HEX_FORMAT, "22");
|
writeAndCheck(exprDmc, "16", IFormattedValues.HEX_FORMAT, "22");
|
||||||
|
@ -382,11 +382,11 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testWriteErrorFormat() throws Throwable {
|
public void testWriteErrorFormat() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testWrite");
|
SyncUtil.runToLocation("testWrite");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
|
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
IExpressionDMContext exprDmc = SyncUtil.SyncCreateExpression(frameDmc, "a[1]");
|
IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "a[1]");
|
||||||
|
|
||||||
writeAndCheckError(exprDmc, "goodbye", IFormattedValues.DECIMAL_FORMAT);
|
writeAndCheckError(exprDmc, "goodbye", IFormattedValues.DECIMAL_FORMAT);
|
||||||
writeAndCheckError(exprDmc, "abggg", IFormattedValues.HEX_FORMAT);
|
writeAndCheckError(exprDmc, "abggg", IFormattedValues.HEX_FORMAT);
|
||||||
|
@ -395,7 +395,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
writeAndCheckError(exprDmc, "hello", IFormattedValues.NATURAL_FORMAT);
|
writeAndCheckError(exprDmc, "hello", IFormattedValues.NATURAL_FORMAT);
|
||||||
writeAndCheckError(exprDmc, "1", "ThisFormatDoesNotExist");
|
writeAndCheckError(exprDmc, "1", "ThisFormatDoesNotExist");
|
||||||
|
|
||||||
IExpressionDMContext notWritableExprDmc = SyncUtil.SyncCreateExpression(frameDmc, "10+5");
|
IExpressionDMContext notWritableExprDmc = SyncUtil.createExpression(frameDmc, "10+5");
|
||||||
writeAndCheckError(notWritableExprDmc, "1", IFormattedValues.NATURAL_FORMAT);
|
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
|
// Next we test that we can read the value more than once
|
||||||
// of the same variable object at the exact same time
|
// of the same variable object at the exact same time
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
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
|
// Next we test that we can retrieve children while reading the value
|
||||||
// and vice-versa
|
// and vice-versa
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
// First we get the expected value of the array pointer.
|
// 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() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -629,15 +629,15 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
// Next we test that we can retrieve children count while reading the
|
// Next we test that we can retrieve children count while reading the
|
||||||
// value and vice-versa
|
// value and vice-versa
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
// First we get the expected value of the array pointer.
|
// 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() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -744,12 +744,12 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
// at
|
// at
|
||||||
// the same time and vice-versa
|
// the same time and vice-versa
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
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
|
// go through at any time and we don't exactly know when it will
|
||||||
// change the value we are reading.
|
// change the value we are reading.
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
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
|
// Test the cache by changing a value but triggering a read before the
|
||||||
// write clears the cache
|
// write clears the cache
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testConcurrent");
|
SyncUtil.runToLocation("testConcurrent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1113,14 +1113,14 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void testExprAddress() throws Throwable {
|
public void testExprAddress() throws Throwable {
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testAddress");
|
SyncUtil.runToLocation("testAddress");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1166,7 +1166,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
public void testGlobalVariables() throws Throwable {
|
public void testGlobalVariables() throws Throwable {
|
||||||
|
|
||||||
// Step to a stack level of 2 to be able to test differen stack frames
|
// 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.
|
// Create a map of expressions to expected values.
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
|
@ -1196,9 +1196,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
"313249263", "0x12ABCDEF", "0x12ABCDEF" });
|
"313249263", "0x12ABCDEF", "0x12ABCDEF" });
|
||||||
|
|
||||||
// Try different stack frames
|
// Try different stack frames
|
||||||
executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0));
|
executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0));
|
||||||
executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 1));
|
executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 1));
|
||||||
executeExpressionSubTests(tests, SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 2));
|
executeExpressionSubTests(tests, SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1208,24 +1208,24 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNamingSameDepth() throws Throwable {
|
public void testNamingSameDepth() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testName1");
|
SyncUtil.runToLocation("testName1");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x1", "01", "1", "1", "1", "1" });
|
tests.put("a", new String[] { "0x1", "01", "1", "1", "1", "1" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testName2");
|
SyncUtil.runToLocation("testName2");
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 1);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 1);
|
||||||
frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" });
|
tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
SyncUtil.SyncRunToLocation("testName1");
|
SyncUtil.runToLocation("testName1");
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 1);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 1);
|
||||||
frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" });
|
tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
@ -1237,24 +1237,24 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testNamingSameMethod() throws Throwable {
|
public void testNamingSameMethod() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testSameName");
|
SyncUtil.runToLocation("testSameName");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x1", "01", "1", "1", "1" , "1" });
|
tests.put("a", new String[] { "0x1", "01", "1", "1", "1" , "1" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2);
|
||||||
frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" });
|
tests.put("a", new String[] { "0x2", "02", "10", "2", "2", "2" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2);
|
||||||
frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" });
|
tests.put("a", new String[] { "0x3", "03", "11", "3", "3", "3" });
|
||||||
executeExpressionSubTests(tests, frameDmc);
|
executeExpressionSubTests(tests, frameDmc);
|
||||||
|
@ -1268,8 +1268,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
public void testThreadContext() throws Throwable {
|
public void testThreadContext() throws Throwable {
|
||||||
|
|
||||||
// Step to a stack level of 2 to be able to test differen stack frames
|
// Step to a stack level of 2 to be able to test differen stack frames
|
||||||
SyncUtil.SyncRunToLocation("locals2");
|
SyncUtil.runToLocation("locals2");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER);
|
||||||
|
|
||||||
// Create a map of expressions to expected values.
|
// Create a map of expressions to expected values.
|
||||||
Map<String, String[]> tests = new HashMap<String, String[]>();
|
Map<String, String[]> tests = new HashMap<String, String[]>();
|
||||||
|
@ -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
|
// 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
|
// a frame that is not the top frame
|
||||||
tests.put("lIntVar", new String[] { "0x3039", "030071", "11000000111001", "12345", "12345", "12345" });
|
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
|
// Now check that we get the same values as the top stack when selecting the thread only
|
||||||
tests = new HashMap<String, String[]>();
|
tests = new HashMap<String, String[]>();
|
||||||
|
@ -1291,9 +1291,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testChildNamingSameMethod() throws Throwable {
|
public void testChildNamingSameMethod() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testSameName");
|
SyncUtil.runToLocation("testSameName");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4);
|
||||||
final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1346,9 +1346,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
assertTrue(wait.getMessage(), wait.isOK());
|
assertTrue(wait.getMessage(), wait.isOK());
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
@ -1398,9 +1398,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
assertTrue(wait.getMessage(), wait.isOK());
|
assertTrue(wait.getMessage(), wait.isOK());
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 4);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 4);
|
||||||
final IFrameDMContext frameDmc3 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc3 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
|
@ -1458,21 +1458,21 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testUpdatingChildren() throws Throwable {
|
public void testUpdatingChildren() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testUpdateChildren");
|
SyncUtil.runToLocation("testUpdateChildren");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2);
|
||||||
final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
doUpdateTest(frameDmc, 0);
|
doUpdateTest(frameDmc, 0);
|
||||||
|
|
||||||
// Re-run the test to test out-of-scope update again
|
// Re-run the test to test out-of-scope update again
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 3);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 3);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
doUpdateTest(frameDmc2, 100);
|
doUpdateTest(frameDmc2, 100);
|
||||||
|
|
||||||
// Re-run the test within a different method test out-of-scope updates
|
// Re-run the test within a different method test out-of-scope updates
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 3);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 3);
|
||||||
final IFrameDMContext frameDmc3 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc3 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
doUpdateTest(frameDmc3, 200);
|
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.
|
// 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
|
// 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
|
// 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);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -1636,9 +1636,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteChildren() throws Throwable {
|
public void testDeleteChildren() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testDeleteChildren");
|
SyncUtil.runToLocation("testDeleteChildren");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1773,9 +1773,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateGDBBug() throws Throwable {
|
public void testUpdateGDBBug() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testUpdateGDBBug");
|
SyncUtil.runToLocation("testUpdateGDBBug");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1812,8 +1812,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
// Now step to change the value of "a" and ask for it again
|
// Now step to change the value of "a" and ask for it again
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -1872,9 +1872,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateIssue() throws Throwable {
|
public void testUpdateIssue() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testUpdateIssue");
|
SyncUtil.runToLocation("testUpdateIssue");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -1932,8 +1932,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
// Now step to change the value of "a" and ask for it again but in the natural format
|
// 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);
|
stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 1);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -1991,9 +1991,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testUpdateIssue2() throws Throwable {
|
public void testUpdateIssue2() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testUpdateIssue2");
|
SyncUtil.runToLocation("testUpdateIssue2");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2068,7 +2068,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
// Now step to change the value of "a" in natural but it remains the same in decimal
|
// 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() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -2109,9 +2109,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testConcurrentReadAndUpdateChild() throws Throwable {
|
public void testConcurrentReadAndUpdateChild() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testConcurrentReadAndUpdateChild");
|
SyncUtil.runToLocation("testConcurrentReadAndUpdateChild");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 1);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2224,10 +2224,10 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test(timeout=5000)
|
@Test(timeout=5000)
|
||||||
public void testConcurrentUpdateOutOfScopeChildThenParent() throws Throwable {
|
public void testConcurrentUpdateOutOfScopeChildThenParent() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testConcurrentUpdateOutOfScopeChildThenParent");
|
SyncUtil.runToLocation("testConcurrentUpdateOutOfScopeChildThenParent");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2);
|
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();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2277,8 +2277,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
assertTrue(wait.getMessage(), wait.isOK());
|
assertTrue(wait.getMessage(), wait.isOK());
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_INTO, 2);
|
stoppedEvent = SyncUtil.step(StepType.STEP_INTO, 2);
|
||||||
|
|
||||||
// Now step to another method to make the previous variable objects out-of-scope
|
// 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
|
// 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
|
@Test
|
||||||
public void testUpdateOfPointer() throws Throwable {
|
public void testUpdateOfPointer() throws Throwable {
|
||||||
SyncUtil.SyncRunToLocation("testUpdateOfPointer");
|
SyncUtil.runToLocation("testUpdateOfPointer");
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 3);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 3);
|
||||||
final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
final String firstValue = "1";
|
final String firstValue = "1";
|
||||||
final String secondValue = "2";
|
final String secondValue = "2";
|
||||||
|
@ -2486,8 +2486,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
wait.waitReset();
|
wait.waitReset();
|
||||||
|
|
||||||
// Now step to change the values of all the children
|
// Now step to change the values of all the children
|
||||||
stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER, 2);
|
stoppedEvent = SyncUtil.step(StepType.STEP_OVER, 2);
|
||||||
final IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
fExpService.getExecutor().submit(new Runnable() {
|
fExpService.getExecutor().submit(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -2606,8 +2606,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCanWrite() throws Throwable {
|
public void testCanWrite() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testCanWrite");
|
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite");
|
||||||
final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2672,8 +2672,8 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
@Ignore("Only works in versions later than GDB6.7")
|
@Ignore("Only works in versions later than GDB6.7")
|
||||||
@Test
|
@Test
|
||||||
public void testCanWriteLValue() throws Throwable {
|
public void testCanWriteLValue() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncRunToLocation("testCanWrite"); // Re-use test
|
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); // Re-use test
|
||||||
final IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2742,7 +2742,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Get an IExpressionDMContext object representing the expression to
|
// Get an IExpressionDMContext object representing the expression to
|
||||||
// be evaluated.
|
// be evaluated.
|
||||||
final IExpressionDMContext exprDMC = SyncUtil.SyncCreateExpression(dmc, expressionToEvaluate);
|
final IExpressionDMContext exprDMC = SyncUtil.createExpression(dmc, expressionToEvaluate);
|
||||||
|
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
|
@ -2882,9 +2882,9 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
|
|
||||||
private void doTestChildren(MIStoppedEvent stoppedEvent) throws Throwable {
|
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 =
|
IExpressionDMContext[] children =
|
||||||
getChildren(exprDMC, new String[] {"bar", "bar2", "a", "b", "c"});
|
getChildren(exprDMC, new String[] {"bar", "bar2", "a", "b", "c"});
|
||||||
|
|
|
@ -212,8 +212,8 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
private IAddress evaluateExpression(IDMContext ctx, String expression) throws Throwable
|
private IAddress evaluateExpression(IDMContext ctx, String expression) throws Throwable
|
||||||
{
|
{
|
||||||
// Create the expression and format contexts
|
// Create the expression and format contexts
|
||||||
final IExpressionDMContext expressionDMC = SyncUtil.SyncCreateExpression(ctx, expression);
|
final IExpressionDMContext expressionDMC = SyncUtil.createExpression(ctx, expression);
|
||||||
final FormattedValueDMContext formattedValueDMC = SyncUtil.SyncGetFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT);
|
final FormattedValueDMContext formattedValueDMC = SyncUtil.getFormattedValue(fExpressionService, expressionDMC, IFormattedValues.HEX_FORMAT);
|
||||||
|
|
||||||
// Create the DataRequestMonitor which will store the operation result in the wait object
|
// Create the DataRequestMonitor which will store the operation result in the wait object
|
||||||
final DataRequestMonitor<FormattedValueDMData> drm =
|
final DataRequestMonitor<FormattedValueDMData> drm =
|
||||||
|
@ -443,10 +443,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readWithNullContext() throws Throwable {
|
public void readWithNullContext() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
IMemoryDMContext dmc = null;
|
IMemoryDMContext dmc = null;
|
||||||
|
@ -476,9 +476,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readWithInvalidAddress() throws Throwable {
|
public void readWithInvalidAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -509,10 +509,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readWithInvalidWordSize() throws Throwable {
|
public void readWithInvalidWordSize() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -547,10 +547,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readWithInvalidCount() throws Throwable {
|
public void readWithInvalidCount() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -579,10 +579,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readCharVaryingBaseAddress() throws Throwable {
|
public void readCharVaryingBaseAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -603,9 +603,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Verify that all bytes are set
|
// Verify that all bytes are set
|
||||||
for (int i = 0; i < BLOCK_SIZE; i++) {
|
for (int i = 0; i < BLOCK_SIZE; i++) {
|
||||||
|
@ -631,10 +631,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readCharVaryingOffset() throws Throwable {
|
public void readCharVaryingOffset() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the array is zeroed
|
// Run to the point where the array is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
int word_size = 1;
|
int word_size = 1;
|
||||||
|
@ -653,9 +653,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run to the point where the array is set
|
// Run to the point where the array is set
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Verify that all bytes are set
|
// Verify that all bytes are set
|
||||||
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
for (int offset = 0; offset < BLOCK_SIZE; offset++) {
|
||||||
|
@ -680,10 +680,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void readCharArray() throws Throwable {
|
public void readCharArray() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -705,9 +705,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Get the memory block
|
// Get the memory block
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
|
@ -738,10 +738,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeWithNullContext() throws Throwable {
|
public void writeWithNullContext() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -771,9 +771,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeWithInvalidAddress() throws Throwable {
|
public void writeWithInvalidAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -803,10 +803,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeWithInvalidWordSize() throws Throwable {
|
public void writeWithInvalidWordSize() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -842,10 +842,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeWithInvalidCount() throws Throwable {
|
public void writeWithInvalidCount() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -875,10 +875,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeWithInvalidBuffer() throws Throwable {
|
public void writeWithInvalidBuffer() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -908,10 +908,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeCharVaryingAddress() throws Throwable {
|
public void writeCharVaryingAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -972,10 +972,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeCharVaryingOffset() throws Throwable {
|
public void writeCharVaryingOffset() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
int word_size = 1;
|
int word_size = 1;
|
||||||
int count = BLOCK_SIZE;
|
int count = BLOCK_SIZE;
|
||||||
|
@ -1032,10 +1032,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writeCharArray() throws Throwable {
|
public void writeCharArray() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1094,10 +1094,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void fillWithNullContext() throws Throwable {
|
public void fillWithNullContext() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1127,9 +1127,9 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void fillWithInvalidAddress() throws Throwable {
|
public void fillWithInvalidAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
SyncUtil.SyncStep(StepType.STEP_RETURN);
|
SyncUtil.step(StepType.STEP_RETURN);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1159,10 +1159,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void fillWithInvalidWordSize() throws Throwable {
|
public void fillWithInvalidWordSize() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1198,10 +1198,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void fillWithInvalidCount() throws Throwable {
|
public void fillWithInvalidCount() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1231,10 +1231,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void fillWithInvalidPattern() throws Throwable {
|
public void fillWithInvalidPattern() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1264,10 +1264,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writePatternVaryingAddress() throws Throwable {
|
public void writePatternVaryingAddress() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1325,10 +1325,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writePatternVaryingOffset() throws Throwable {
|
public void writePatternVaryingOffset() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1386,10 +1386,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void writePatternCountTimes() throws Throwable {
|
public void writePatternCountTimes() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is zeroed
|
// Run to the point where the variable is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1444,10 +1444,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void asynchronousReadWrite() throws Throwable {
|
public void asynchronousReadWrite() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the array is zeroed
|
// Run to the point where the array is zeroed
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:zeroBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
int word_size = 1;
|
int word_size = 1;
|
||||||
|
@ -1507,10 +1507,10 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
public void memoryCacheRead() throws Throwable {
|
public void memoryCacheRead() throws Throwable {
|
||||||
|
|
||||||
// Run to the point where the variable is initialized
|
// Run to the point where the variable is initialized
|
||||||
SyncUtil.SyncAddBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
SyncUtil.addBreakpoint("MemoryTestApp.cc:setBlocks", true);
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_RETURN);
|
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_RETURN);
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
long offset = 0;
|
long offset = 0;
|
||||||
|
@ -1532,7 +1532,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the cache
|
// Clear the cache
|
||||||
SyncUtil.SyncStep(StepType.STEP_OVER);
|
SyncUtil.step(StepType.STEP_OVER);
|
||||||
|
|
||||||
// Get a first block
|
// Get a first block
|
||||||
fWait.waitReset();
|
fWait.waitReset();
|
||||||
|
|
|
@ -210,7 +210,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void getRegistersLength() throws Throwable {
|
public void getRegistersLength() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
final IRegisterDMContext[] regDMCs = getRegisters(frameDmc);
|
final IRegisterDMContext[] regDMCs = getRegisters(frameDmc);
|
||||||
assertTrue("The number of registers should have been " + NUMBER_OF_REGISTERS +
|
assertTrue("The number of registers should have been " + NUMBER_OF_REGISTERS +
|
||||||
" instead of " + regDMCs.length,
|
" instead of " + regDMCs.length,
|
||||||
|
@ -221,7 +221,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void getRegisters() throws Throwable {
|
public void getRegisters() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
final IRegisterDMContext[] regDMCs = getRegisters(frameDmc);
|
final IRegisterDMContext[] regDMCs = getRegisters(frameDmc);
|
||||||
List<String> 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");
|
List<String> 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
|
@Test
|
||||||
public void getModelDataForRegisterDataValueInDifferentNumberFormats() throws Throwable {
|
public void getModelDataForRegisterDataValueInDifferentNumberFormats() throws Throwable {
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
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);
|
String val = getModelDataForRegisterDataValue(frameDmc, IFormattedValues.NATURAL_FORMAT, 0);
|
||||||
REGISTER_VALUE = val;
|
REGISTER_VALUE = val;
|
||||||
assertTrue("Register Value is not in NATURAL format " , Integer.parseInt(val)== Integer.parseInt(REGISTER_VALUE));
|
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
|
@Test
|
||||||
public void compareRegisterForMultipleExecutionContexts() throws Throwable {
|
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);
|
IContainerDMContext containerDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(), IContainerDMContext.class);
|
||||||
|
|
||||||
// Get execution context to thread 2
|
// Get execution context to thread 2
|
||||||
IExecutionDMContext execDmc = SyncUtil.SyncCreateExecutionContext(containerDmc, 2);
|
IExecutionDMContext execDmc = SyncUtil.createExecutionContext(containerDmc, 2);
|
||||||
IFrameDMContext frameDmc2 = SyncUtil.SyncGetStackFrame(execDmc, 0);
|
IFrameDMContext frameDmc2 = SyncUtil.getStackFrame(execDmc, 0);
|
||||||
|
|
||||||
String thread2RegVal0 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 0);
|
String thread2RegVal0 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 0);
|
||||||
String thread2RegVal1 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 1);
|
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);
|
String thread2RegVal5 = getModelDataForRegisterDataValue(frameDmc2, IFormattedValues.NATURAL_FORMAT, 5);
|
||||||
|
|
||||||
// Get execution context to thread 1
|
// Get execution context to thread 1
|
||||||
execDmc = SyncUtil.SyncCreateExecutionContext(containerDmc, 2);
|
execDmc = SyncUtil.createExecutionContext(containerDmc, 2);
|
||||||
IFrameDMContext frameDmc1 = SyncUtil.SyncGetStackFrame(execDmc, 0);
|
IFrameDMContext frameDmc1 = SyncUtil.getStackFrame(execDmc, 0);
|
||||||
getModelDataForRegisterDataValue(frameDmc1, IFormattedValues.NATURAL_FORMAT, 0);
|
getModelDataForRegisterDataValue(frameDmc1, IFormattedValues.NATURAL_FORMAT, 0);
|
||||||
|
|
||||||
// Re-set the execution context to 2 and Fetch from the Cache
|
// Re-set the execution context to 2 and Fetch from the Cache
|
||||||
|
@ -381,7 +381,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void writeRegisterNaturalFormat() throws Throwable{
|
public void writeRegisterNaturalFormat() throws Throwable{
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
String regValue = "10";
|
String regValue = "10";
|
||||||
int regIndex = 3;
|
int regIndex = 3;
|
||||||
writeRegister(frameDmc, 3, regValue, IFormattedValues.NATURAL_FORMAT);
|
writeRegister(frameDmc, 3, regValue, IFormattedValues.NATURAL_FORMAT);
|
||||||
|
@ -392,7 +392,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void writeRegisterHEXFormat() throws Throwable{
|
public void writeRegisterHEXFormat() throws Throwable{
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
String regValue = "0x10";
|
String regValue = "0x10";
|
||||||
int regIndex = 3;
|
int regIndex = 3;
|
||||||
writeRegister(frameDmc, 3, regValue, IFormattedValues.HEX_FORMAT);
|
writeRegister(frameDmc, 3, regValue, IFormattedValues.HEX_FORMAT);
|
||||||
|
@ -404,7 +404,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Ignore
|
@Ignore
|
||||||
public void writeRegisterBinaryFormat() throws Throwable{
|
public void writeRegisterBinaryFormat() throws Throwable{
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
//String regValue = "0100101001";
|
//String regValue = "0100101001";
|
||||||
String regValue = "10";
|
String regValue = "10";
|
||||||
int regIndex = 3;
|
int regIndex = 3;
|
||||||
|
@ -416,7 +416,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
@Test
|
@Test
|
||||||
public void writeRegisterOctalFormat() throws Throwable{
|
public void writeRegisterOctalFormat() throws Throwable{
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
IFrameDMContext frameDmc = SyncUtil.SyncGetStackFrame(stoppedEvent.getDMContext(), 0);
|
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
|
||||||
//String regValue = "10";
|
//String regValue = "10";
|
||||||
String regValue = "012";
|
String regValue = "012";
|
||||||
int regIndex = 3;
|
int regIndex = 3;
|
||||||
|
|
|
@ -190,7 +190,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
/*
|
/*
|
||||||
* Run till line for 2 threads to be created
|
* 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){
|
catch(Throwable t){
|
||||||
Assert.fail("Exception in SyncUtil.SyncRunToLine: " + t.getMessage());
|
Assert.fail("Exception in SyncUtil.SyncRunToLine: " + t.getMessage());
|
||||||
|
@ -294,7 +294,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
/*
|
/*
|
||||||
* Run till step returns
|
* Run till step returns
|
||||||
*/
|
*/
|
||||||
final MIStoppedEvent stoppedEvent = SyncUtil.SyncStep(StepType.STEP_OVER);
|
final MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER);
|
||||||
|
|
||||||
final DataRequestMonitor<IExecutionDMData> rm =
|
final DataRequestMonitor<IExecutionDMData> rm =
|
||||||
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
||||||
|
@ -338,12 +338,12 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
/*
|
/*
|
||||||
* Add a breakpoint
|
* Add a breakpoint
|
||||||
*/
|
*/
|
||||||
SyncUtil.SyncAddBreakpoint(SOURCE_NAME + ":21", false);
|
SyncUtil.addBreakpoint(SOURCE_NAME + ":21", false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resume till the breakpoint is hit
|
* Resume till the breakpoint is hit
|
||||||
*/
|
*/
|
||||||
final MIStoppedEvent stoppedEvent = SyncUtil.SyncResumeUntilStopped();
|
final MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
final DataRequestMonitor<IExecutionDMData> rm =
|
final DataRequestMonitor<IExecutionDMData> rm =
|
||||||
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
||||||
|
@ -384,11 +384,11 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
/*
|
/*
|
||||||
* Add a breakpoint
|
* Add a breakpoint
|
||||||
*/
|
*/
|
||||||
SyncUtil.SyncAddBreakpoint(SOURCE_NAME + ":21", false);
|
SyncUtil.addBreakpoint(SOURCE_NAME + ":21", false);
|
||||||
/*
|
/*
|
||||||
* Resume till the breakpoint is hit
|
* Resume till the breakpoint is hit
|
||||||
*/
|
*/
|
||||||
SyncUtil.SyncResumeUntilStopped();
|
SyncUtil.resumeUntilStopped();
|
||||||
|
|
||||||
final DataRequestMonitor<IExecutionDMData> rm =
|
final DataRequestMonitor<IExecutionDMData> rm =
|
||||||
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
new DataRequestMonitor<IExecutionDMData>(fRunCtrl.getExecutor(), null) {
|
||||||
|
@ -459,7 +459,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
* Step to fire ContainerSuspendEvent
|
* Step to fire ContainerSuspendEvent
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
SyncUtil.SyncStep(StepType.STEP_OVER);
|
SyncUtil.step(StepType.STEP_OVER);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Assert.fail("Exception in SyncUtil.SyncStep: " + e.getMessage());
|
Assert.fail("Exception in SyncUtil.SyncStep: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue