From patchwork Tue Jun 28 04:53:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 585546 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp508211mab; Tue, 28 Jun 2022 00:26:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLLwTLfGYKVCPpQGEmvhFm/UHxg6tH037IKLiAsUcV5PJBY6rsmWGnkEKS1j7D0hcVY42/ X-Received: by 2002:a05:6214:1ccd:b0:46e:7427:2626 with SMTP id g13-20020a0562141ccd00b0046e74272626mr2520702qvd.101.1656401194372; Tue, 28 Jun 2022 00:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656401194; cv=none; d=google.com; s=arc-20160816; b=COmtMGplaeepjAXdI0HGSq6jwCwkOB2yJYFq1orRuoxwwsykickshreT5fybGYJQqT k1SsQ+qZpzD+mWssN/kqhUoUlqi07hqnI4EhgtJ8hxpOikgc08fsY2bMcCKy4GT3kNed gn87DDz0wlogu8mswbPrCUP/FGWrxaWUbej/ub22Ln0BOt3D483kU2kGdS38o1vEZdjV MG4WD2vcUgmXVWdlMQtvTy8Z64bpPPlotB2DMzQBS6DCcg9kg7He+Kh55zN+PixVXYHt nb839CDEJhseS6Wl9dNbmyhje76WyqD8oelZuohloIn8O8arxAY6JQdLQCcsk2gwWAAY YzxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n1ZDBnw0lkX4YrNv7Tv2EuCi+urg5qVqojkVKbH0n5o=; b=RAypYadzJ0ZBB0bPR6YdwHdvLiAzKMEMgGK99KL1jxwj/Cl5kSfX925p8oFruxNfRD 1ZJOvF0AnsIXFX24MoHtcAtDCdOdYU8FZCTs/PpFn04Fh4xyGtRHBXtkPEYfBbtgm1Z7 5x+kD4phPbIKir+IgeXza5JTftS0ebJnj0m1MRQoU8HJFyoe8DeLZgkLFX593nuzfruV t8NDbtTBTekpyxJBcz76bHe9VElOp49EtVlGE+1n6MtmcJQycypLh7JnjbdXaKAidiCj LF/3EC8zyaYsKrjOf9n6bY39uMvmqgUE9784C5zunQSIQXWjrsAvyBjWTLVmkluZ1Syz 0M4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bW1hkOw0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y10-20020a05620a25ca00b006aee941e0f6si8436339qko.428.2022.06.28.00.26.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jun 2022 00:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bW1hkOw0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o65cH-0000Up-US for patch@linaro.org; Tue, 28 Jun 2022 03:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o63FO-0003AO-J1 for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:54:48 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:42660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o63FN-0008G4-1B for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:54:46 -0400 Received: by mail-pf1-x432.google.com with SMTP id d17so10917841pfq.9 for ; Mon, 27 Jun 2022 21:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n1ZDBnw0lkX4YrNv7Tv2EuCi+urg5qVqojkVKbH0n5o=; b=bW1hkOw0g1LQIwRhdUCsQaWncsdyCzDFT7smCy7T3Db3H8UF+545sgjayWESM+yE3b xTYRiIL7ORCFC7PBAXioKTvoDsPkT28o393Xonq+MKH+eZOGad0RVtQJb+K95lxo8k9k k1zm9eO99jNISYqOrfC9fN0GdfX98Qb+hTallkY86zCGUvKlykWNIKjeP7k+5cl7iLR7 Vgabfd8GMxaR82Hc5gWNlt+xjVcl0cCN3g0WZULNQwhEolBjhLTRUwoN04/CDvOXY9m/ pCOkK4fOrqrnpj4OXz4/iguhn5vesO9Mjs3P3PWNKMQWHBwo85I/0GFAU76dETRgWs1l 0q7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n1ZDBnw0lkX4YrNv7Tv2EuCi+urg5qVqojkVKbH0n5o=; b=kLUIycZNPTqlxGt//LRxyWiU3aKjbcVKnGDhwWMpirM7R5/68IJMv5ve45IfXJDPMf 0+KFKsjALTCjQY8vqvkfayriplbZQpEu67dUcVmJW+3uXhnD7A+ZO31a9L67qXf2ZOFm ++K2+kWYlxCH3U5u8O3PUPxOUhNUvlMBosAKOlyhQ0lF04cie2AIEUndL9eNDYXvRvRp StgnwxxNLVCUMa6GitWOw8lFnzSunhMgwuKO2cI8SDuj7EwqENVqeQYABUK0u+a9IUAq DvCY5X0094bn0fgAL7RFQMbtQO+1Zi0JWPJkYvlI6UEw/IQhnBLb35CLAXolLD9JFJDW xL3w== X-Gm-Message-State: AJIora+kOzilW46a4MYoyN9AcROt1X7uCCDJvCq26J++BeSgLec4CSgt sbwVsMZ49Zm1I5HJtDknWfPqchDBU9aDdA== X-Received: by 2002:a63:6d7:0:b0:411:51f2:6de2 with SMTP id 206-20020a6306d7000000b0041151f26de2mr3187221pgg.184.1656392084269; Mon, 27 Jun 2022 21:54:44 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b00168c523032fsm8073735plk.269.2022.06.27.21.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 21:54:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 15/60] semihosting: Remove GDB_O_BINARY Date: Tue, 28 Jun 2022 10:23:18 +0530 Message-Id: <20220628045403.508716-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220628045403.508716-1-richard.henderson@linaro.org> References: <20220628045403.508716-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UPPERCASE_50_75=0.008 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The value is zero, and gdb always opens files in binary mode. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index cebbad2355..92c1375b15 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -92,21 +92,20 @@ #define GDB_O_APPEND 0x008 #define GDB_O_CREAT 0x200 #define GDB_O_TRUNC 0x400 -#define GDB_O_BINARY 0 static int gdb_open_modeflags[12] = { GDB_O_RDONLY, - GDB_O_RDONLY | GDB_O_BINARY, + GDB_O_RDONLY, + GDB_O_RDWR, GDB_O_RDWR, - GDB_O_RDWR | GDB_O_BINARY, GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC, - GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY, + GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC, + GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC, GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC, - GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY, GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND, - GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY, + GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND, + GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND, GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND, - GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY }; static int open_modeflags[12] = {