From 5a07bf6c1daeb65f52d8e65919a0382d627e01b1 Mon Sep 17 00:00:00 2001 From: James Benton Date: Fri, 2 Jun 2017 11:42:24 +0100 Subject: [PATCH] coreinit: Add DisassemblePPCRange. --- include/coreinit/debug.h | 15 +++++++++++++++ src/rpl/coreinit/exports.h | 1 + 2 files changed, 16 insertions(+) diff --git a/include/coreinit/debug.h b/include/coreinit/debug.h index 63aa2e6..511e05f 100644 --- a/include/coreinit/debug.h +++ b/include/coreinit/debug.h @@ -11,6 +11,14 @@ extern "C" { #endif +typedef void (*DisassemblyPrintFn)(const char *fmt, ...); +typedef uint32_t (*DisassemblyFindSymbolFn)(uint32_t addr, char *symbolNameBuf, uint32_t symbolNameBufSize); + +typedef enum DisassemblePPCFlags +{ + DISASSEMBLE_PPC_FLAGS_NONE = 0, +} DisassemblePPCFlags; + void OSConsoleWrite(const char *msg, @@ -31,6 +39,13 @@ void OSFatal(const char *msg); +void +DisassemblePPCRange(void *start, + void *end, + DisassemblyPrintFn printFn, + DisassemblyFindSymbolFn findSymbolFn, + DisassemblePPCFlags flags); + #ifdef __cplusplus } #endif diff --git a/src/rpl/coreinit/exports.h b/src/rpl/coreinit/exports.h index e55fb97..4b8f364 100644 --- a/src/rpl/coreinit/exports.h +++ b/src/rpl/coreinit/exports.h @@ -85,6 +85,7 @@ EXPORT(OSConsoleWrite); EXPORT(OSReport); EXPORT(OSPanic); EXPORT(OSFatal); +EXPORT(DisassemblePPCRange); // coreinit/dynload.h EXPORT(OSDynLoad_SetAllocator);