Closed maximilien-noal closed 2 years ago
Code throwing the error :
public Action spice86_generated_label_call_target_1000_C0AD_01C0AD(int loadOffset) {
entrydispatcher:
if(loadOffset!=0){
throw FailAsUntested("External goto not supported for this function.");
}
label_1000_C0AD_1C0AD:
// MOV ES,word ptr [0xdbda] (1000_C0AD / 0x1C0AD)
ES = UInt16[DS, 0xDBDA];
// CALLF [0x38d5] (1000_C0B1 / 0x1C0B1)
// Indirect call to [0x38d5], generating possible targets from emulator records
uint targetAddress_1000_C0B1 = (uint)(UInt16[DS, 0x38D7] * 0x10 + UInt16[DS, 0x38D5] - cs1 * 0x10);
switch(targetAddress_1000_C0B1) {
default: throw FailAsUntested("Error: Function not registered at address " + ConvertUtils.ToHex32WithoutX(targetAddress_1000_C0B1));
break;
}
// RET (1000_C0B5 / 0x1C0B5)
return NearRet();
}
Fixed by @kevinferrare
Somewhere, the Java code that generated the fake ASM has a bug.
First step : Compare Spice86 + gdb and Cryogenic + gdb
A good GDB client for Linux : https://github.com/hugsy/gef
Or browser based: https://github.com/cs01/gdbgui/
Or inside VSCode: https://marketplace.visualstudio.com/items?itemName=webfreak.debug
Try to connect Ghidra to Spice86: https://wrongbaud.github.io/posts/ghidra-debugger/#debugging-the-rom
Also maybe use the -d option.