mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-02 21:05:13 -06:00
cpu_patches: Log full instruction on JIT patch failure. (#4477)
This commit is contained in:
parent
a57b3f3b74
commit
8a08bb46ee
@ -788,10 +788,16 @@ static bool PatchesIllegalInstructionHandler(void* context) {
|
|||||||
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT];
|
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT];
|
||||||
const auto status =
|
const auto status =
|
||||||
Common::Decoder::Instance()->decodeInstruction(instruction, operands, code_address);
|
Common::Decoder::Instance()->decodeInstruction(instruction, operands, code_address);
|
||||||
LOG_ERROR(Core, "Failed to patch address {:x} -- mnemonic: {}",
|
if (ZYAN_SUCCESS(status)) {
|
||||||
reinterpret_cast<u64>(code_address),
|
const auto disassembled = Common::Decoder::Instance()->disassembleInst(
|
||||||
ZYAN_SUCCESS(status) ? ZydisMnemonicGetString(instruction.mnemonic)
|
instruction, operands, std::bit_cast<u64>(code_address));
|
||||||
: "Failed to decode");
|
LOG_ERROR(Core, "Failed to patch address {:x} -- mnemonic: {}, instruction: {}",
|
||||||
|
reinterpret_cast<u64>(code_address),
|
||||||
|
ZydisMnemonicGetString(instruction.mnemonic), disassembled);
|
||||||
|
} else {
|
||||||
|
LOG_ERROR(Core, "Failed to patch address {:x} -- mnemonic: (failed to decode)",
|
||||||
|
reinterpret_cast<u64>(code_address));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user