From f589c500432f99317bfd1a42462e99866086435c Mon Sep 17 00:00:00 2001 From: aliaspider Date: Sun, 28 May 2017 12:42:19 +0100 Subject: [PATCH] (WiiU) misc. --- Makefile.wiiu | 4 ++-- wiiu/wiiu_dbg.h | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile.wiiu b/Makefile.wiiu index 9a19bf1628..4a7c63b05b 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -5,8 +5,8 @@ DEBUG = 0 GRIFFIN_BUILD = 0 WHOLE_ARCHIVE_LINK = 0 -PC_DEVELOPMENT_IP_ADDRESS = -PC_DEVELOPMENT_TCP_PORT = +PC_DEVELOPMENT_IP_ADDRESS ?= +PC_DEVELOPMENT_TCP_PORT ?= OBJ := OBJ += wiiu/system/memory.o diff --git a/wiiu/wiiu_dbg.h b/wiiu/wiiu_dbg.h index c105ef436f..01350857db 100644 --- a/wiiu/wiiu_dbg.h +++ b/wiiu/wiiu_dbg.h @@ -2,28 +2,35 @@ #define WIIU_DBG_H #include +#include + +#ifdef WIIU #include + #ifdef __cplusplus extern "C" { #endif + //void wait_for_input(void); //void dump_result_value(Result val); -#ifdef __cplusplus -} -#endif void* OSGetSymbolName(u32 addr, char* out, u32 out_size); void DisassemblePPCRange(void *start, void *end, void* printf_func, void* GetSymbolName_func, u32 flags); +#ifdef __cplusplus +} +#endif + #define DEBUG_DISASM(start, count) DisassemblePPCRange((void*)start, (u32*)(start) + (count), printf, OSGetSymbolName, 0) +#endif /* WIIU */ //#define DEBUG_HOLD() do{printf("%s@%s:%d.\n",__FUNCTION__, __FILE__, __LINE__);fflush(stdout);wait_for_input();}while(0) #define DEBUG_LINE() do{printf("%s:%4d %s().\n", __FILE__, __LINE__, __FUNCTION__);fflush(stdout);}while(0) #define DEBUG_STR(X) printf( "%s: %s\n", #X, (char*)(X)) -#define DEBUG_VAR(X) printf( "%-20s: 0x%08X\n", #X, (u32)(X)) -#define DEBUG_VAR2(X) printf( "%-20s: 0x%08X (%i)\n", #X, (u32)(X), (int)(X)) -#define DEBUG_INT(X) printf( "%-20s: %10i\n", #X, (s32)(X)) +#define DEBUG_VAR(X) printf( "%-20s: 0x%08X\n", #X, (uint32_t)(X)) +#define DEBUG_VAR2(X) printf( "%-20s: 0x%08X (%i)\n", #X, (uint32_t)(X), (int)(X)) +#define DEBUG_INT(X) printf( "%-20s: %10i\n", #X, (int32_t)(X)) #define DEBUG_FLOAT(X) printf( "%-20s: %10.3f\n", #X, (float)(X)) -#define DEBUG_VAR64(X) printf( #X"\r\t\t\t\t : 0x%016llX\n", (u64)(X)) +#define DEBUG_VAR64(X) printf( #X"\r\t\t\t\t : 0x%016llX\n", (uint64_t)(X)) //#define DEBUG_ERROR(X) do{if(X)dump_result_value(X);}while(0) #define PRINTFPOS(X,Y) "\x1b["#X";"#Y"H" #define PRINTFPOS_STR(X,Y) "\x1b[" X ";" Y "H"