From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qxZwKm1IjGSWkQUAWB0awg (envelope-from ) for ; Fri, 16 Jun 2023 07:33:01 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=nRl44ZMR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9FF801E0BB; Fri, 16 Jun 2023 07:33:01 -0400 (EDT) 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 916FC1E0AC for ; Fri, 16 Jun 2023 07:32:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDEA83858C1F for ; Fri, 16 Jun 2023 11:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDEA83858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686915178; bh=Qq+d+4VZV/KfHpxax4WxflvNF2ytEZgV3S+EvdiL/BA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=nRl44ZMR7B5Pnewi1NtlWIT6ZYImDHlAhiEis1++l9RjcxfQxu6JZFhmug+NJCjvE 7qHzeZ3Vhb2bLfufdDho6ZELlgu1IYzvMS8lMbbsSmf6ud56ojmtZdHLjVl1cAiRy1 xjIS2DcTEIb/FaZu7BpZbRUkLJ/K9m8yX7IcVsEw= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id B77AB3858D35 for ; Fri, 16 Jun 2023 11:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B77AB3858D35 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 ECFFB21C9D for ; Fri, 16 Jun 2023 11:32:38 +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 DAA69138E8 for ; Fri, 16 Jun 2023 11:32:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HNVbNFZIjGTkCwAAMHmgww (envelope-from ) for ; Fri, 16 Jun 2023 11:32:38 +0000 To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Clean up before compilation in gdb.ada/call-no-debug.exp Date: Fri, 16 Jun 2023 13:33:05 +0200 Message-Id: <20230616113305.27867-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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" Running test-case gdb.ada/call-no-debug.exp with target board unix/-m64 works fine, but if we run it again with target board unix-m32, we run into: ... gnatlink prog.ali -m32 -g -o prog^M ld: i386:x86-64 architecture of input file `b~prog.o' is incompatible with \ i386 output^M ... This is due to compiling with no-force. The test-case: - first compiles pck.adb into pck.o (without debug info), and - then compiles prog.adb and pck.o into prog (with debug info). Using no-force in the second compilation make sure that pck.adb is not compiled again, with debug info. But it also means it will pick up intermediate files related to prog.adb from a previous compilation. Fix this by removing prog.o and prog.ali before compilation. Tested on x86_64-linux. --- gdb/testsuite/gdb.ada/call-no-debug.exp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdb/testsuite/gdb.ada/call-no-debug.exp b/gdb/testsuite/gdb.ada/call-no-debug.exp index 422b83761d9..df81c87ade2 100644 --- a/gdb/testsuite/gdb.ada/call-no-debug.exp +++ b/gdb/testsuite/gdb.ada/call-no-debug.exp @@ -21,6 +21,11 @@ require allow_ada_tests standard_ada_testfile prog +# Since we use no-force to compile prog, make sure we don't pick up files +# from a previous compilation. +remote_file host delete [standard_output_file prog.o] +remote_file host delete [standard_output_file prog.ali] + # Compile pck without debuginfo but prog with it. if {[gdb_compile_ada $srcdir/$subdir/$testdir/pck.adb \ [standard_output_file pck.o] object {}] != ""} { base-commit: 9fb38608660d25f368b458a17e5f013271da7d4a -- 2.35.3