From patchwork Fri Nov 11 16:36:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 60433 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E38763842AC0 for ; Fri, 11 Nov 2022 16:37:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E38763842AC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668184629; bh=fZaYQI8YTBuJNIr8AogTwAfwQHiZIndCbIF7X3n/OZo=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=EeTJ8X2T1a6Scar4gJQ2LPg3uuvenV/zuQUBugr5MfTvPCd8NNXwG9NxosNlWCocs kryaSc82R//6T2ne02foPivyQ457dWQNOlRU7EMLpN8809QmGtC8O4LDKElduz31jf FNgZ+dufw8CwaqyT+kScp8msQuBw3a0CZJkugwvY= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4DFE83858C27 for ; Fri, 11 Nov 2022 16:36:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DFE83858C27 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-246-wdcURWxnOuioeqKoAdz6Xg-1; Fri, 11 Nov 2022 11:36:36 -0500 X-MC-Unique: wdcURWxnOuioeqKoAdz6Xg-1 Received: by mail-qk1-f197.google.com with SMTP id o13-20020a05620a2a0d00b006cf9085682dso5101282qkp.7 for ; Fri, 11 Nov 2022 08:36:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fZaYQI8YTBuJNIr8AogTwAfwQHiZIndCbIF7X3n/OZo=; b=Hn3J8Kfvqh7WHM7k4tIjfVKO3bCfzbJXnQHnrzUMGgPAD1TP1JiPkQh7LBo9+JNuYG vHtiRG0UJqtw9sARxgwiARTuXKkm9dPYXpLLpf4oyJOSf1foZ3FmHFNxC8VRpPSnefYl 5x2VGWv+c2/kisXyA4cDbig+onRUymsReZXS1CSNKCKQ5H5pVNXklfeUFMqc1dDTpRvf WivHNiEI+Q9JHxyUqhBZaSq4B2sL1Uw3vRGBWNAqtFfqpY/hXWNtts/W81i4bctB5qzY 30bloaBhd5K64JC50kOMTdFggdcu7icUQ/DyjKo2CIJWMYvGj3iXojBz4IRxlxD9Hf1Y eLig== X-Gm-Message-State: ANoB5plB1cOGkxPuwXG+sSHMJTcNNI93SywQJSOPR8yKGHAIQICHD+Bb mrQv2QZoYf++VTK4UuxinrLsbbEwrrCEPZ91xuV/o2xzZ2j2TuRvHDdPL0YP9VtgUqf7Nc+jeyB TQAV7EZeXOs9ciKuijidCYC+0kr0f8uLymFygJeYtXnijM9v19PC6LExWG7TyliJ9YM1aSgPmuw == X-Received: by 2002:a05:620a:c09:b0:6ce:3f1c:a4ef with SMTP id l9-20020a05620a0c0900b006ce3f1ca4efmr1768366qki.507.1668184595361; Fri, 11 Nov 2022 08:36:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5glZgb0YwcYXPlErnimQ/mFcJUgIqaVT+LfKTFRtLklNMJYfH62t7/Z/sPZNpvwxqhnYrmoA== X-Received: by 2002:a05:620a:c09:b0:6ce:3f1c:a4ef with SMTP id l9-20020a05620a0c0900b006ce3f1ca4efmr1768342qki.507.1668184595018; Fri, 11 Nov 2022 08:36:35 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id f17-20020ac859d1000000b0039467aadeb8sm1515841qtf.13.2022.11.11.08.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 08:36:34 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/6] gdb/testsuite: fix gdb.trace/unavailable-dwarf-piece.exp with Clang Date: Fri, 11 Nov 2022 16:36:21 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I noticed that the test gdb.trace/unavailable-dwarf-piece.exp was failing when run with Clang. Or rather, the test was not running as the test executable failed to compile. The problem is that Clang was emitting this warning: warning: argument unused during compilation: '-fdiagnostics-color=never' [-Wunused-command-line-argument] This warning is emitted when compiling the assembler file generated by the DWARF assembler. Most DWARF assembler tests generate the assembler file into a file with the '.S' extension. However, this particular test uses a '.s' extension. Now a .S file will be passed through the preprocessor, while a .s will be sent straight to the assembler. My guess is that Clang doesn't support the -fdiagnostics-color=never option for the assembler, but does for the preprocessor. That's a little annoying, but easily worked around. We don't care if our assembler file is passed through the preprocessor, so, in this commit, I just change the file extension from .s to .S, and the problem is fixed. Currently, the unavailable-dwarf-piece.exp script names the assembler file using standard_output_file, in this commit I've switched to make use of standard_testfile, as that seems to be the more common way of doing this sort of thing. With these changes the test now passes with Clang 9.0.1 and 15.0.2, and also still passes with gcc. --- gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp index f80f8005fcf..13c6f38737c 100644 --- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp +++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp @@ -20,9 +20,9 @@ if {![dwarf2_support]} { return 0 } -standard_testfile .c +standard_testfile .c -dbg.S -set asm_file [standard_output_file "${testfile}-dbg.s"] +set asm_file $srcfile2 set opts {} if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \