all repos — mgba @ 0180ee090ea84dece42c8c365ebcbbbdd8a9d5ed

mGBA Game Boy Advance Emulator

Print hex
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Apr 2013 01:25:21 -0700
commit

0180ee090ea84dece42c8c365ebcbbbdd8a9d5ed

parent

f715534083f4101b94ddbae5a0dd38c3e52bc526

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M src/debugger.csrc/debugger.c

@@ -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 @@ DebuggerComamnd* command;

} debuggerCommands[] = { { "p", _print }, { "print", _print }, + { "p/x", _printHex }, + { "print/x", _printHex }, { "i", _printStatus }, { "info", _printStatus }, { "q", _quit },

@@ -73,6 +76,14 @@ static void _print(struct ARMDebugger* debugger, struct DebugVector* dv) {

(void)(debugger); for ( ; dv; dv = dv->next) { printf(" %u", dv->intValue); + } + 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"); }