From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rV88MeOVP2FMLAAAWB0awg (envelope-from ) for ; Mon, 13 Sep 2021 14:18:11 -0400 Received: by simark.ca (Postfix, from userid 112) id B68431EE25; Mon, 13 Sep 2021 14:18:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 039DB1EDDB for ; Mon, 13 Sep 2021 14:18:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C5843858015 for ; Mon, 13 Sep 2021 18:18:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C5843858015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631557090; bh=WeUUk6mU5814j5AAa8+OCNYDQM4uA+xlqjHo6c6X3rQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QECtAdCWISbIEfqBSZpkzVHMhJCyiZmkZ3Qu8B1alYtkWTXGl9jPPKHxUxMu19jCw CBbcX9/7hEBh1tO8VOqJuWiXn2vQoAdJEydgiBjYqBtp2guSw6E+bL45E8QPCH8fvT A/cI9gqwsUyobdtHCrez9dv2iPRU+/ezECfVHONY= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 1F9F83858C60 for ; Mon, 13 Sep 2021 18:17:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F9F83858C60 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 513B821ED6; Mon, 13 Sep 2021 18:17:51 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 37F2C13B67; Mon, 13 Sep 2021 18:17:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G76cDM+VP2GOXgAAMHmgww (envelope-from ); Mon, 13 Sep 2021 18:17:51 +0000 Date: Mon, 13 Sep 2021 20:17:49 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/tdep] Reset force_thumb in parse_arm_disassembler_options Message-ID: <20210913181748.GA15416@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, With a gdb build with --enable-targets=all, we have 2 arch-specific failures in selftest print_one_insn: ... $ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \ | grep "Self test failed: arch " Self test failed: arch armv8.1-m.main: self-test failed at \ disasm-selftests.c:165 Self test failed: arch arm_any: self-test failed at disasm-selftests.c:165 $ ... During the first failed test, force_thumb is set to true, and remains so until and during the second test, which causes the second failure. Fix this by resetting force_thumb to false in parse_arm_disassembler_options, such that we get just one failure: ... $ gdb -q -batch a.out -ex "maint selftest print_one_insn" 2>&1 \ | grep "Self test failed: arch " Self test failed: arch armv8.1-m.main: self-test failed at \ disasm-selftests.c:165 $ ... Tested on x86_64-linux. Committed to trunk, as obvious. Thanks, - Tom [gdb/tdep] Reset force_thumb in parse_arm_disassembler_options --- opcodes/arm-dis.c | 1 + 1 file changed, 1 insertion(+) diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index faabd42b5b3..78efb815147 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -11613,6 +11613,7 @@ parse_arm_disassembler_options (const char *options) { const char *opt; + force_thumb = false; FOR_EACH_DISASSEMBLER_OPTION (opt, options) { if (startswith (opt, "reg-names-"))