From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 9859A385AE74 for ; Tue, 14 Jun 2022 11:24:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9859A385AE74 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-paAHUiZuN_CBTsGly5xs7w-1; Tue, 14 Jun 2022 07:24:03 -0400 X-MC-Unique: paAHUiZuN_CBTsGly5xs7w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F2B711C05149; Tue, 14 Jun 2022 11:24:02 +0000 (UTC) Received: from [10.97.116.74] (ovpn-116-74.gru2.redhat.com [10.97.116.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9FDFC2026D64; Tue, 14 Jun 2022 11:24:01 +0000 (UTC) Message-ID: <53b294f5-a524-7ae5-c117-91401aba7148@redhat.com> Date: Tue, 14 Jun 2022 08:23:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v3 03/14] change gdb.base/symbol-alias to xfail with clang To: "George, Jini Susan" , Andrew Burgess , "gdb-patches@sourceware.org" Cc: "Natarajan, Kavitha" References: <20220607125346.14861-1-blarsen@redhat.com> <87a6akg4u4.fsf@redhat.com> From: Bruno Larsen In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: , X-List-Received-Date: Tue, 14 Jun 2022 11:24:07 -0000 Good catch. I'll drop this patch. Cheers! Bruno Larsen On 6/14/22 04:23, George, Jini Susan wrote: > [Public] > > I missed mentioning that Kavitha's patch takes care of making symbol-alias.exp xfail for clang versions less than 15. > > Thanks, > Jini. > >>> -----Original Message----- >>> From: Gdb-patches >> bounces+jigeorge=amd.com@sourceware.org> On Behalf Of George, Jini Susan >>> via Gdb-patches >>> Sent: Tuesday, June 14, 2022 12:44 PM >>> To: Andrew Burgess ; Bruno Larsen >>> ; gdb-patches@sourceware.org >>> Cc: Natarajan, Kavitha >>> Subject: RE: [PATCH v3 03/14] change gdb.base/symbol-alias to xfail with clang >>> >>> [Public] >>> >>> [CAUTION: External Email] >>> >>> [Public] >>> >>> Now that Kavitha's patch just got committed (details below), guess we might not >>> require this. >>> >>> commit 6df97c56ea0f3086c96743ec47148ee69fd8cf71 (HEAD -> master, >>> origin/master, origin/HEAD) >>> Author: Kavitha Natarajan >>> Date: Tue Jun 14 10:37:46 2022 +0530 >>> >>> Debug support for global alias variable >>> >>> Starting with (future) Clang 15 (since >>> >>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews. >>> llvm.org%2FD120989&data=05%7C01%7CJiniSusan.George%40amd.com% >>> 7Ce7ea873468214efcf9d908da4dd648a2%7C3dd8961fe4884e608e11a82d994e >>> 183d%7C0%7C0%7C637907879987330246%7CUnknown%7CTWFpbGZsb3d8eyJ >>> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C >>> 3000%7C%7C%7C&sdata=bNOSusnr0cUBWttQ1PM8JrnijdjPJl2ee7lBpPsStY >>> A%3D&reserved=0), Clang emits the DWARF information >>> of global alias variables as DW_TAG_imported_declaration. However, >>> GDB does not handle it. It incorrectly always reads this tag as >>> C++/Fortran imported declaration (type alias, namespace alias and >>> Fortran module). This commit adds support to handle this tag as an >>> alias variable. >>> >>> This change fixes the failures in the gdb.base/symbol-alias.exp >>> testcase with current git Clang. This testcase is also updated to >>> test nested (recursive) aliases. >>> >>> Thanks, >>> Jini. >>> >>>>> -----Original Message----- >>>>> From: Gdb-patches >>>> bounces+jigeorge=amd.com@sourceware.org> On Behalf Of Andrew Burgess >>>>> via Gdb-patches >>>>> Sent: Friday, June 10, 2022 4:31 PM >>>>> To: Bruno Larsen ; gdb-patches@sourceware.org >>>>> Subject: RE: [PATCH v3 03/14] change gdb.base/symbol-alias to xfail >>>>> with clang >>>>> >>>>> [CAUTION: External Email] >>>>> >>>>> Bruno Larsen via Gdb-patches writes: >>>>> >>>>>> Hi Jini, >>>>>> >>>>>> Great to hear that Kavitha's changes have landed on clang! I do >>>>>> think that it is still important to have xfails, however, since only >>>>>> new clangs would add the information, and GDB is tested in all >>>>>> manner of systems. >>>>>> >>>>>> I have changed the patch to assume that clang 15 has Kavitha's >>>>>> patches, and changed the clang compiler test. Does this look acceptable? >>>>>> >>>>>> [PATCH v4 03/14] gdb/testsuite: Change gdb.base/symbol-alias to >>>>>> xfail with old clang >>>>>> >>>>>> Clang didn't use to add alias information, even when using -gfull. >>>>>> This commit checks if the clang version being used is already >>>>>> providing alias information (15 or newer), otherwise it adds an XFAIL. >>>>> >>>>> My understanding from Jini's email was that for this test to pass we >>>>> would also need this gdb patch: >>>>> >>>>> >>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour >>>>> ce >>>>> ware.org%2Fpipermail%2Fgdb-patches%2F2022- >>>>> April%2F188354.html&data=05%7C01%7CJiniSusan.George%40amd.com >>> % >>>>> 7Ca2aaecea2df0476d781808da4ad0988b%7C3dd8961fe4884e608e11a82d99 >>> 4e >>>>> 183d%7C0%7C0%7C637904557029019597%7CUnknown%7CTWFpbGZsb3d8e >>> yJ >>>>> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D% >>> 7C >>>>> 3000%7C%7C%7C&sdata=8%2FUKHMbpyAKXN4HOPHRJ2vP62yKK5i5Qe >>> au >>>>> v0GQtWHo%3D&reserved=0 >>>>> >>>>> So, if I had clang 15 right now, this test would still fail, right? >>>>> >>>>> I guess you either need to hold this patch back until the above is >>>>> merged, or put this in with a generic "all clang" pattern (like you >>>>> originally had) and then assume someone will spot the KPASS and fix up the >>> test later. >>>>> >>>>> Also... >>>>> >>>>> >>>>>> --- >>>>>> gdb/testsuite/gdb.base/symbol-alias.exp | 9 +++++++-- >>>>>> 1 file changed, 7 insertions(+), 2 deletions(-) >>>>>> >>>>>> diff --git a/gdb/testsuite/gdb.base/symbol-alias.exp >>>>>> b/gdb/testsuite/gdb.base/symbol-alias.exp >>>>>> index 289f49bbc3f..078158dc101 100644 >>>>>> --- a/gdb/testsuite/gdb.base/symbol-alias.exp >>>>>> +++ b/gdb/testsuite/gdb.base/symbol-alias.exp >>>>>> @@ -31,6 +31,11 @@ foreach f {"func" "func_alias"} { } >>>>>> >>>>>> # Variables. >>>>>> -foreach v {"g_var_s" "g_var_s_alias"} { >>>>>> - gdb_test "p $v" "= {field1 = 1, field2 = 2}" >>>>>> +gdb_test "p g_var_s" "= {field1 = 1, field2 = 2}" >>>>>> + >>>>>> +# Clang didn't include alias information until version 15. >>>>>> +if {[test_compiler_info {clang-[1-9]*}] >>>>>> + || [test_compiler_info {clang-1[0-4]*}]} { >>>>> >>>>> Wouldn't clang-15 match the first of these patterns? >>>>> >>>>> Thannks, >>>>> Andrew >>>>> >>>>> >>>>>> + setup_xfail "clang/52664" *-*-* >>>>>> } >>>>>> +gdb_test "p g_var_s_alias" "= {field1 = 1, field2 = 2}" >>>>>> -- >>>>>> 2.31.1 >