mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
debug tests: Make runToLine take an integer for the line number
I don't see any reason to take a String for a line number. This avoids doing Integer.toString in a few places. Change-Id: I4618b8c783100a406ff25d229b3b703b1d24f772 Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/36876 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
c78d2fe823
commit
15980decb9
3 changed files with 11 additions and 11 deletions
|
@ -168,13 +168,13 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(timeout);
|
return eventWaitor.waitForEvent(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(IExecutionDMContext dmc, String fileName, String lineNo,
|
public static MIStoppedEvent runToLine(final IExecutionDMContext dmc, final String fileName, final int lineNo,
|
||||||
boolean skipBreakpoints) throws Throwable {
|
final boolean skipBreakpoints) throws Throwable {
|
||||||
return runToLine(dmc, fileName, lineNo, skipBreakpoints, DefaultTimeouts.get(ETimeout.runToLine));
|
return runToLine(dmc, fileName, lineNo, skipBreakpoints, DefaultTimeouts.get(ETimeout.runToLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(final IExecutionDMContext dmc, final String fileName, final String lineNo,
|
public static MIStoppedEvent runToLine(final IExecutionDMContext dmc, final String fileName, final int lineNo,
|
||||||
boolean skipBreakpoints, int timeout) throws Throwable {
|
final boolean skipBreakpoints, final int timeout) throws Throwable {
|
||||||
|
|
||||||
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
|
||||||
new ServiceEventWaitor<MIStoppedEvent>(
|
new ServiceEventWaitor<MIStoppedEvent>(
|
||||||
|
@ -197,22 +197,22 @@ public class SyncUtil {
|
||||||
return eventWaitor.waitForEvent(timeout);
|
return eventWaitor.waitForEvent(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(String fileName, String lineNo,
|
public static MIStoppedEvent runToLine(String fileName, int lineNo,
|
||||||
boolean skipBreakpoints) throws Throwable {
|
boolean skipBreakpoints) throws Throwable {
|
||||||
return runToLine(fileName, lineNo, skipBreakpoints, DefaultTimeouts.get(ETimeout.runToLine));
|
return runToLine(fileName, lineNo, skipBreakpoints, DefaultTimeouts.get(ETimeout.runToLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(String fileName, String lineNo,
|
public static MIStoppedEvent runToLine(String fileName, int lineNo,
|
||||||
boolean skipBreakpoints, int timeout) throws Throwable {
|
boolean skipBreakpoints, int timeout) throws Throwable {
|
||||||
IContainerDMContext containerDmc = SyncUtil.getContainerContext();
|
IContainerDMContext containerDmc = SyncUtil.getContainerContext();
|
||||||
return runToLine(containerDmc, fileName, lineNo, skipBreakpoints, timeout);
|
return runToLine(containerDmc, fileName, lineNo, skipBreakpoints, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(String fileName, String lineNo) throws Throwable {
|
public static MIStoppedEvent runToLine(String fileName, int lineNo) throws Throwable {
|
||||||
return runToLine(fileName, lineNo, DefaultTimeouts.get(ETimeout.runToLine));
|
return runToLine(fileName, lineNo, DefaultTimeouts.get(ETimeout.runToLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MIStoppedEvent runToLine(String fileName, String lineNo, int timeout) throws Throwable {
|
public static MIStoppedEvent runToLine(String fileName, int lineNo, int timeout) throws Throwable {
|
||||||
return runToLine(fileName, lineNo, false, timeout);
|
return runToLine(fileName, lineNo, false, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,7 +407,7 @@ public class MIRegistersTest extends BaseTestCase {
|
||||||
// thread is conditional depending on environment. Run to the printf
|
// thread is conditional depending on environment. Run to the printf
|
||||||
// before it (which is common), then do step operations over the
|
// before it (which is common), then do step operations over the
|
||||||
// non-common code (but same number of lines)
|
// non-common code (but same number of lines)
|
||||||
SyncUtil.runToLine(SRC_NAME, Integer.toString(MIRunControlTest.LINE_MAIN_PRINTF));
|
SyncUtil.runToLine(SRC_NAME, MIRunControlTest.LINE_MAIN_PRINTF);
|
||||||
|
|
||||||
// Because the program is about to go multi-threaded, we have to select the thread
|
// Because the program is about to go multi-threaded, we have to select the thread
|
||||||
// we want to keep stepping. If we don't, we will ask GDB to step the entire process
|
// we want to keep stepping. If we don't, we will ask GDB to step the entire process
|
||||||
|
|
|
@ -274,7 +274,7 @@ public class MIRunControlTest extends BaseTestCase {
|
||||||
// thread is conditional depending on environment. Run to the printf
|
// thread is conditional depending on environment. Run to the printf
|
||||||
// before it (which is common), then do step operations over the
|
// before it (which is common), then do step operations over the
|
||||||
// non-common code (but same number of lines)
|
// non-common code (but same number of lines)
|
||||||
SyncUtil.runToLine(fContainerDmc, SOURCE_NAME, Integer.toString(LINE_MAIN_PRINTF), true);
|
SyncUtil.runToLine(fContainerDmc, SOURCE_NAME, LINE_MAIN_PRINTF, true);
|
||||||
|
|
||||||
// Because the program is about to go multi-threaded, we have to select the thread
|
// Because the program is about to go multi-threaded, we have to select the thread
|
||||||
// we want to keep stepping. If we don't, we will ask GDB to step the entire process
|
// we want to keep stepping. If we don't, we will ask GDB to step the entire process
|
||||||
|
|
Loading…
Add table
Reference in a new issue