mirror of https://github.com/mgba-emu/mgba.git
Print hex
This commit is contained in:
parent
f715534083
commit
0180ee090e
|
@ -27,6 +27,7 @@ typedef void (DebuggerComamnd)(struct ARMDebugger*, struct DebugVector*);
|
|||
|
||||
static void _breakInto(struct ARMDebugger*, struct DebugVector*);
|
||||
static void _print(struct ARMDebugger*, struct DebugVector*);
|
||||
static void _printHex(struct ARMDebugger*, struct DebugVector*);
|
||||
static void _printStatus(struct ARMDebugger*, struct DebugVector*);
|
||||
static void _quit(struct ARMDebugger*, struct DebugVector*);
|
||||
|
||||
|
@ -36,6 +37,8 @@ struct {
|
|||
} debuggerCommands[] = {
|
||||
{ "p", _print },
|
||||
{ "print", _print },
|
||||
{ "p/x", _printHex },
|
||||
{ "print/x", _printHex },
|
||||
{ "i", _printStatus },
|
||||
{ "info", _printStatus },
|
||||
{ "q", _quit },
|
||||
|
@ -77,6 +80,14 @@ static void _print(struct ARMDebugger* debugger, struct DebugVector* dv) {
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
static void _printHex(struct ARMDebugger* debugger, struct DebugVector* dv) {
|
||||
(void)(debugger);
|
||||
for ( ; dv; dv = dv->next) {
|
||||
printf(" 0x%08X", dv->intValue);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static inline void _printLine(struct ARMDebugger* debugger, uint32_t address, enum ExecutionMode mode) {
|
||||
// TODO: write a disassembler
|
||||
if (mode == MODE_ARM) {
|
||||
|
|
Loading…
Reference in New Issue