]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 7 Sep 2015 09:39:27 +0000 (10:39 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sat, 17 Oct 2015 23:13:53 +0000 (18:13 -0500)
A spurious trailing "\n" in the gdb syscall format string used
for SYS_WRITE0 meant that gdb would reject the remote syscall,
with the effect that the output from the guest was silently dropped.
Remove the newline so that gdb accepts the packet.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 857b55adb77004d9ec9202078b7f1f3a1a076112)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-arm/arm-semi.c

index a2a7369567077448611e4cd342553b41c047eb73..42522a70d9ee4a6a1a7f3a6b8ec2f84dcadac2d6 100644 (file)
@@ -260,7 +260,7 @@ uint32_t do_arm_semihosting(CPUARMState *env)
             return (uint32_t)-1;
         len = strlen(s);
         if (use_gdb_syscalls()) {
-            gdb_do_syscall(arm_semi_cb, "write,2,%x,%x\n", args, len);
+            gdb_do_syscall(arm_semi_cb, "write,2,%x,%x", args, len);
             ret = env->regs[0];
         } else {
             ret = write(STDERR_FILENO, s, len);