Received: from eggs.gnu.org ([2001:4830:134:3::10]:55569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPvjM-00010C-DD for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPvjL-0002pl-Im for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:52 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPvjL-0002pZ-C4 for qemu-devel@nongnu.org; Thu, 13 Aug 2015 12:51:51 -0400 From: Peter Maydell Date: Thu, 13 Aug 2015 17:35:37 +0100 Message-Id: <1439483745-28752-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1439483745-28752-1-git-send-email-peter.maydell@linaro.org> References: <1439483745-28752-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 1/9] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christopher Covington , patches@linaro.org 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 --- target-arm/arm-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/arm-semi.c b/target-arm/arm-semi.c index a2a7369..42522a7 100644 --- a/target-arm/arm-semi.c +++ b/target-arm/arm-semi.c @@ -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); -- 1.9.1