Improvements to crash screen.

Part of #13299

Use the new tests/cpu/crash tests in pspautotest to test this code
(manually).
This commit is contained in:
Henrik Rydgård committed 2020-12-19 19:48:24 +01:00
1 parent 0da96ff119
commit ac6715baa9
5 files changed
+34 -16

No files matched your search

+4 -2
View File
@@ -113,11 +113,13 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
int instructionSize = 4;
#if PPSSPP_ARCH(AMD64) || PPSSPP_ARCH(X86)
// X86, X86-64. Variable instruction size so need to analyze the mov instruction in detail.
instructionSize = 15;
// To ignore the access, we need to disassemble the instruction and modify context->CTX_PC
LSInstructionInfo info{};
success = X86AnalyzeMOV(codePtr, info);
instructionSize = info.instructionSize;
if (success)
instructionSize = info.instructionSize;
#elif PPSSPP_ARCH(ARM64)
uint32_t word;
memcpy(&word, codePtr, 4);
@@ -133,7 +135,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
#endif
std::string disassembly;
if (success && DisassembleNativeAt(codePtr, instructionSize, &disassembly)) {
if (DisassembleNativeAt(codePtr, instructionSize, &disassembly)) {
infoString += disassembly + "\n";
}