mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-08-28 13:30:21 +00:00
Merge remote-tracking branch 'origin/GP-0_Dan_testFixes-2022-10-04'
This commit is contained in:
commit
42566bceaf
|
@ -590,7 +590,7 @@ public class DebuggerListingProvider extends CodeViewerProvider {
|
|||
|
||||
@Override
|
||||
protected void doSetProgram(Program newProgram) {
|
||||
if (newProgram != null && newProgram != current.getView()) {
|
||||
if (newProgram != null && current.getView() != null && newProgram != current.getView()) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
if (getProgram() == newProgram) {
|
||||
|
|
|
@ -310,7 +310,7 @@ public class DebuggerMemoryBytesProviderTest extends AbstractGhidraHeadedDebugge
|
|||
|
||||
runSwing(() -> memBytesProvider.setTrackingSpec(SPLocationTrackingSpec.INSTANCE));
|
||||
|
||||
ProgramLocation loc = memBytesProvider.getLocation();
|
||||
ProgramLocation loc = waitForValue(() -> memBytesProvider.getLocation());
|
||||
assertEquals(tb.trace.getProgramView(), loc.getProgram());
|
||||
assertEquals(tb.addr(0x01fff800), loc.getAddress());
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.junit.Test;
|
|||
|
||||
import com.google.common.collect.Range;
|
||||
|
||||
import generic.Unique;
|
||||
import ghidra.app.plugin.assembler.Assembler;
|
||||
import ghidra.app.plugin.assembler.Assemblers;
|
||||
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerGUITest;
|
||||
|
@ -100,6 +101,12 @@ public class DebuggerPcodeStepperProviderTest extends AbstractGhidraHeadedDebugg
|
|||
assertTrue(pcodeProvider.uniqueTableModel.getModelData().isEmpty());
|
||||
}
|
||||
|
||||
protected void assertDecodeStep() {
|
||||
PcodeRow row = Unique.assertOne(pcodeProvider.pcodeTableModel.getModelData());
|
||||
assertEquals(EnumPcodeRow.DECODE, row);
|
||||
assertTrue(pcodeProvider.uniqueTableModel.getModelData().isEmpty());
|
||||
}
|
||||
|
||||
protected void assertPopulated() {
|
||||
assertFalse(pcodeProvider.pcodeTableModel.getModelData().isEmpty());
|
||||
// NB. I don't know what uniques, if any, are involved
|
||||
|
@ -117,7 +124,7 @@ public class DebuggerPcodeStepperProviderTest extends AbstractGhidraHeadedDebugg
|
|||
TraceSchedule schedule1 = TraceSchedule.parse("0:.t0-1");
|
||||
traceManager.openTrace(tb.trace);
|
||||
traceManager.activateThread(thread);
|
||||
assertEmpty();
|
||||
waitForPass(() -> assertDecodeStep());
|
||||
|
||||
traceManager.activateTime(schedule1);
|
||||
waitForPass(() -> assertEquals(schedule1, pcodeProvider.current.getTime()));
|
||||
|
|
Loading…
Reference in a new issue