From patchwork Fri Sep 4 15:05:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 514623 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0828714029C for ; Sat, 5 Sep 2015 01:17:43 +1000 (AEST) Received: from localhost ([::1]:60641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXskH-00050E-3x for incoming@patchwork.ozlabs.org; Fri, 04 Sep 2015 11:17:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZA-0008U8-Hd for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXsZ9-0000rY-Qh for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:12 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXsZ9-0000iE-Ks for qemu-devel@nongnu.org; Fri, 04 Sep 2015 11:06:11 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZXsYu-0006Ei-93 for qemu-devel@nongnu.org; Fri, 04 Sep 2015 16:05:56 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 4 Sep 2015 16:05:31 +0100 Message-Id: <1441379156-23939-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> References: <1441379156-23939-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 02/27] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 Signed-off-by: Peter Maydell --- 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);