Line 28:
Line 28:
|-
|-
|DisassemblePPCRange
|DisassemblePPCRange
−
|<code>void DisassemblePPCRange(uint32_t start, uint32_t end, int (*printf_func)(char *fmt, ...), uint32_t (*find_symbol)(uint32_t addr, char *name_buf, uint32_t name_len), int flags);</code>
+
|<code>void DisassemblePPCRange(uint32_t start, uint32_t end, printf_t printf_func, find_symbol_t sym_func, int flags);</code>
|Disassemble PPC instructions from start to end, printing them using printf_func() with various flags applied
|Disassemble PPC instructions from start to end, printing them using printf_func() with various flags applied
|}
|}
Line 151:
Line 151:
== Defines ==
== Defines ==
+
=== Disassembler ===
+
printf_func() and find_symbol() have the following types:
+
<syntaxhighlight lang="C">
+
typedef int (*printf_t)(char *fmt, ...);
+
typedef uint32_t (*find_symbol_t)(uint32_t addr, char *name_buf, uint32_t name_len);
+
</syntaxhighlight>
+
+
The flags argument is a bitmask of the following options:
+
<syntaxhighlight lang="C">
+
#define DISASM_OMIT_ADDR 0x40
+
#define DISASM_OMIT_OPCODE 0x80
+
#define DISASM_GETSYM 0x100
+
</syntaxhighlight>
+
=== Screen ===
=== Screen ===
{| class="wikitable"
{| class="wikitable"