diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-26 15:09:38 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-26 15:09:38 +0000 |
commit | a87295e8df0923dab9857c1a340d23fe3278a336 (patch) | |
tree | 30c629030791710b509b88fceb184766f97743cd /gdbstub.c | |
parent | 20c9f095c4536e64e60432a5c72fce38e8306cbb (diff) | |
download | qemu-a87295e8df0923dab9857c1a340d23fe3278a336.tar.gz qemu-a87295e8df0923dab9857c1a340d23fe3278a336.tar.bz2 qemu-a87295e8df0923dab9857c1a340d23fe3278a336.zip |
M68k system mode semihosting.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2861 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -963,14 +963,16 @@ static void gdb_vm_stopped(void *opaque, int reason) /* Send a gdb syscall request. This accepts limited printf-style format specifiers, specifically: - %x - target_ulong argument printed in hex. - %s - string pointer (target_ulong) and length (int) pair. */ + %x - target_ulong argument printed in hex. + %lx - 64-bit argument printed in hex. + %s - string pointer (target_ulong) and length (int) pair. */ void gdb_do_syscall(gdb_syscall_complete_cb cb, char *fmt, ...) { va_list va; char buf[256]; char *p; target_ulong addr; + uint64_t i64; GDBState *s; s = gdb_syscall_state; @@ -993,11 +995,18 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, char *fmt, ...) addr = va_arg(va, target_ulong); p += sprintf(p, TARGET_FMT_lx, addr); break; + case 'l': + if (*(fmt++) != 'x') + goto bad_format; + i64 = va_arg(va, uint64_t); + p += sprintf(p, "%" PRIx64, i64); + break; case 's': addr = va_arg(va, target_ulong); p += sprintf(p, TARGET_FMT_lx "/%x", addr, va_arg(va, int)); break; default: + bad_format: fprintf(stderr, "gdbstub: Bad syscall format string '%s'\n", fmt - 1); break; |