wut  1.0.0-beta8
Wii U Toolchain
debug.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef void (*DisassemblyPrintFn)(const char *fmt, ...);
15 typedef uint32_t (*DisassemblyFindSymbolFn)(uint32_t addr, char *symbolNameBuf, uint32_t symbolNameBufSize);
16 
17 typedef enum DisassemblePPCFlags
18 {
21 
22 
23 void
24 OSConsoleWrite(const char *msg,
25  uint32_t size);
26 
27 
28 void
29 OSReport(const char *fmt, ...);
30 
31 
32 void
33 OSPanic(const char *file,
34  uint32_t line,
35  const char *fmt, ...);
36 
37 
38 void
39 OSFatal(const char *msg);
40 
41 
42 uint32_t
43 OSGetSymbolName(uint32_t addr,
44  char *symbolNameBuf,
45  uint32_t symbolNameBufSize);
46 
47 
48 uint32_t
49 OSGetUPID();
50 
51 
52 void
53 DisassemblePPCOpcode(uint32_t *opcode,
54  char *buffer,
55  uint32_t bufferSize,
56  DisassemblyFindSymbolFn findSymbolFn,
57  DisassemblePPCFlags flags);
58 
59 void
60 DisassemblePPCRange(void *start,
61  void *end,
62  DisassemblyPrintFn printFn,
63  DisassemblyFindSymbolFn findSymbolFn,
64  DisassemblePPCFlags flags);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
void OSConsoleWrite(const char *msg, uint32_t size)
uint32_t(* DisassemblyFindSymbolFn)(uint32_t addr, char *symbolNameBuf, uint32_t symbolNameBufSize)
Definition: debug.h:15
DisassemblePPCFlags
Definition: debug.h:17
uint32_t OSGetUPID()
void(* DisassemblyPrintFn)(const char *fmt,...)
Definition: debug.h:14
void OSFatal(const char *msg)
void DisassemblePPCOpcode(uint32_t *opcode, char *buffer, uint32_t bufferSize, DisassemblyFindSymbolFn findSymbolFn, DisassemblePPCFlags flags)
void DisassemblePPCRange(void *start, void *end, DisassemblyPrintFn printFn, DisassemblyFindSymbolFn findSymbolFn, DisassemblePPCFlags flags)
uint32_t OSGetSymbolName(uint32_t addr, char *symbolNameBuf, uint32_t symbolNameBufSize)
void OSPanic(const char *file, uint32_t line, const char *fmt,...)
void OSReport(const char *fmt,...)