target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb

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 857b55adb7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
stable-2.4
Peter Maydell 2015-09-07 10:39:27 +01:00 committed by Michael Roth
parent 0de7d2b793
commit 5b7d840e74
1 changed files with 1 additions and 1 deletions

View 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);