mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Merge remote-tracking branch 'origin/GP-1487_Dan_emuUnimpl--SQUASHED'
into Ghidra_10.1 Conflicts: Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/pcode/exec/trace/TracePcodeEmulatorTest.java
This commit is contained in:
commit
6cc2eae322
3 changed files with 40 additions and 2 deletions
|
@ -983,4 +983,27 @@ public class TracePcodeEmulatorTest extends AbstractGhidraHeadlessIntegrationTes
|
|||
emuThread.stepInstruction();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that unimplemented instructions (as opposed to instructions with no semantics) result in
|
||||
* an interrupt.
|
||||
*/
|
||||
@Test(expected = PcodeExecutionException.class)
|
||||
public void testUNIMPL() throws Throwable {
|
||||
try (ToyDBTraceBuilder tb = new ToyDBTraceBuilder("Test", "Toy:BE:64:default")) {
|
||||
assertEquals(Register.NO_CONTEXT, tb.language.getContextBaseRegister());
|
||||
|
||||
TraceThread thread = initTrace(tb,
|
||||
List.of(
|
||||
"pc = 0x00400000;",
|
||||
"sp = 0x00110000;"),
|
||||
List.of(
|
||||
"unimpl"));
|
||||
|
||||
TracePcodeEmulator emu = new TracePcodeEmulator(tb.trace, 0);
|
||||
PcodeThread<byte[]> emuThread = emu.newThread(thread.getPath());
|
||||
emuThread.overrideContextWithDefault();
|
||||
emuThread.stepInstruction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue