Skip to content

Commit

Permalink
Merge pull request libretro#5836 from QuarkTheAwesome/wiiu-exception
Browse files Browse the repository at this point in the history
[WiiU] Exception handler fixes - coreinit offsets now working
  • Loading branch information
inactive123 authored Dec 1, 2017
2 parents abfb9ec + 52fb827 commit 96987e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions wiiu/system/exception_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,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
Also initializes exception_msgbuf, use buf_add from now on */
/* Exception type and offending instruction location */
buf_add("DSI: Instr at %08" PRIX32, ctx->srr0);
/* Was this a read or a write? */
if (ctx->dsisr & DSISR_WRITE_ATTEMPTED) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 96987e7

Please sign in to comment.