mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-1437: Fixed issue with endianness in contextreg for pure emulation.
This commit is contained in:
parent
d9788c0094
commit
1b9665e5c5
9 changed files with 48 additions and 24 deletions
|
@ -46,7 +46,7 @@ public enum TraceMemoryStatePcodeArithmetic implements PcodeArithmetic<TraceMemo
|
|||
}
|
||||
|
||||
@Override
|
||||
public TraceMemoryState fromConst(BigInteger value, int size) {
|
||||
public TraceMemoryState fromConst(BigInteger value, int size, boolean isContextreg) {
|
||||
return TraceMemoryState.KNOWN;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ public enum TraceMemoryStatePcodeArithmetic implements PcodeArithmetic<TraceMemo
|
|||
}
|
||||
|
||||
@Override
|
||||
public BigInteger toConcrete(TraceMemoryState value) {
|
||||
public BigInteger toConcrete(TraceMemoryState value, boolean isContextreg) {
|
||||
throw new AssertionError("Cannot make TraceMemoryState a 'concrete value'");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ public class TracePcodeEmulatorTest extends AbstractGhidraHeadlessIntegrationTes
|
|||
emuThread.getState().getVar(pc));
|
||||
assertEquals(new RegisterValue(ctxreg, BigInteger.valueOf(0x8000_0000_0000_0000L)),
|
||||
emuThread.getContext());
|
||||
assertArrayEquals(tb.arr(0, 0, 0, 0, 0, 0, 0, 0x80),
|
||||
assertArrayEquals(tb.arr(0x80, 0, 0, 0, 0, 0, 0, 0),
|
||||
emuThread.getState().getVar(ctxreg));
|
||||
|
||||
emuThread.stepInstruction();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue