mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-15 00:52:47 +00:00
[WiiU] Exception handler: fix coreinit handles, add opcode to DSIs
Coreinit seems to get special handles, so adding a special case should make its relative addresses actually become helpful again. Let's just hope __PPCExit stays at 0x180! Also added the violating opcode to the DSI message; may have to move it in case it pushes stuff off the end of the screen. Untested at time of commit. Hopefully this should make debugging #5357 a bit easier...
This commit is contained in:
parent
abfb9ec0b5
commit
a79d3aa8aa
@ -90,9 +90,8 @@ 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
|
||||
Also initializes exception_msgbuf, use buf_add from now on */
|
||||
buf_add("DSI: Instr at %08" PRIX32, ctx->srr0);
|
||||
/* Exception type and offending instruction location + opcode */
|
||||
buf_add("DSI: Instr at %08" PRIX32 " (%08 " PRIX32 ")", ctx->srr0, *(unsigned int*)(ctx->srr0));
|
||||
/* Was this a read or a write? */
|
||||
if (ctx->dsisr & DSISR_WRITE_ATTEMPTED) {
|
||||
buf_add(" bad write to");
|
||||
@ -216,6 +215,12 @@ void exception_print_symbol(uint32_t addr) {
|
||||
/* Try for a base address */
|
||||
void* libAddr;
|
||||
OSDynLoad_Acquire(symbolName, &libAddr);
|
||||
/* Special case for coreinit; which has broken handles */
|
||||
if (strcmp(symbolName, "coreinit.rpl")) {
|
||||
void* PPCExit_addr;
|
||||
OSDynLoad_FindExport(libAddr, 0, "__PPCExit", &PPCExit_addr);
|
||||
libAddr = PPCExit_addr - 0x180;
|
||||
}
|
||||
*seperator = '|';
|
||||
/* We got one! */
|
||||
if (libAddr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user