summaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-26 15:09:38 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-26 15:09:38 +0000
commita87295e8df0923dab9857c1a340d23fe3278a336 (patch)
tree30c629030791710b509b88fceb184766f97743cd /gdbstub.c
parent20c9f095c4536e64e60432a5c72fce38e8306cbb (diff)
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.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 7dcaade66..fd20c9ca7 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -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;