mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
[WiiU] Exception handler: remove opcodes; fix strcmp misuse
Thanks for @gblues for finding the strcmp bug. I've removed the opcode display since it's a bit unsafe - if the exception handler causes a DSI; Cafe OS will take over and freeze up the console. This is obviously not a good thing. There are possible situations where memory is executable and not readable; so this is just about covering all bases until a better solution can be implemented. Maybe we can experiment a bit more once this handler isn't being used so often ;)
This commit is contained in:
parent
a79d3aa8aa
commit
469662345f
@ -91,7 +91,7 @@ void __attribute__((__noreturn__)) exception_cb(OSContext* ctx, OSExceptionType
|
||||
/* First up, the pretty header that tells you wtf just happened */
|
||||
if (type == OS_EXCEPTION_TYPE_DSI) {
|
||||
/* Exception type and offending instruction location + opcode */
|
||||
buf_add("DSI: Instr at %08" PRIX32 " (%08 " PRIX32 ")", ctx->srr0, *(unsigned int*)(ctx->srr0));
|
||||
buf_add("DSI: Instr at %08" PRIX32, ctx->srr0);
|
||||
/* Was this a read or a write? */
|
||||
if (ctx->dsisr & DSISR_WRITE_ATTEMPTED) {
|
||||
buf_add(" bad write to");
|
||||
@ -216,7 +216,7 @@ void exception_print_symbol(uint32_t addr) {
|
||||
void* libAddr;
|
||||
OSDynLoad_Acquire(symbolName, &libAddr);
|
||||
/* Special case for coreinit; which has broken handles */
|
||||
if (strcmp(symbolName, "coreinit.rpl")) {
|
||||
if (!strcmp(symbolName, "coreinit.rpl")) {
|
||||
void* PPCExit_addr;
|
||||
OSDynLoad_FindExport(libAddr, 0, "__PPCExit", &PPCExit_addr);
|
||||
libAddr = PPCExit_addr - 0x180;
|
||||
|
Loading…
Reference in New Issue
Block a user