From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vAVTL253vl+kEAAAWB0awg (envelope-from ) for ; Wed, 25 Nov 2020 10:25:34 -0500 Received: by simark.ca (Postfix, from userid 112) id B62C71F0AB; Wed, 25 Nov 2020 10:25:34 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 64F231E552 for ; Wed, 25 Nov 2020 10:25:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CC8C33836C73; Wed, 25 Nov 2020 15:25:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC8C33836C73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1606317933; bh=Uj/jS1V18FHARTJnNI4S62+aDjeh130qsXlI60pIY5g=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=iDgBYp21U71VFp/06KMds20AUfhjvVugdV18sv19uf13vFvYK+gp4Je+lE0JkRNKM 5iU4+jhofOd1s1rTOdTz8srPJSHVL3+XzIBafcpAZbuiBlm246iixnp5DQZ0HVp0lA 9D0Ns9YWxbI4lU2uFGXou3ndSK4jOZ/6aKm1YjNM= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 283913857811 for ; Wed, 25 Nov 2020 15:25:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 283913857811 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-uxsQbluYOmaTz-VU1gpLaw-1; Wed, 25 Nov 2020 10:25:30 -0500 X-MC-Unique: uxsQbluYOmaTz-VU1gpLaw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82393193411A; Wed, 25 Nov 2020 15:25:28 +0000 (UTC) Received: from blade.nx (ovpn-115-133.ams2.redhat.com [10.36.115.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 508FC19D9C; Wed, 25 Nov 2020 15:25:28 +0000 (UTC) Received: by blade.nx (Postfix, from userid 1000) id 8637B816CD2E; Wed, 25 Nov 2020 15:25:27 +0000 (GMT) Date: Wed, 25 Nov 2020 15:25:27 +0000 To: Tom de Vries , Tom Tromey , Gary Benson via Gdb-patches Subject: Re: [PATCH][gdb/symtab] Fix gdb.base/vla-optimized-out.exp with clang Message-ID: <20201125152527.GA17604@blade.nx> References: <1605547055-25778-1-git-send-email-gbenson@redhat.com> <87mtzek5fv.fsf@tromey.com> <0a3f590c-2a76-e470-136f-e8f88aef1d17@suse.de> <87y2iwgh90.fsf@tromey.com> <55e92b95-8b3b-6c4f-a572-9d7f836a1758@suse.de> <874klkgeff.fsf@tromey.com> <20201125145014.GA16439@blade.nx> MIME-Version: 1.0 In-Reply-To: <20201125145014.GA16439@blade.nx> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: Gary Benson via Gdb-patches Reply-To: Gary Benson Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Gary Benson wrote: > Thank you for picking this up Tom (de Vries). Your patch looks good, > however I wanted to point out that the location expressions Clang > generates for gdb.base/vla-ptr.exp don't end with DW_OP_stack_value: > > < 2><0x000000a3> DW_TAG_variable > DW_AT_location len 0x0002: 9168: DW_OP_fbreg -24 > DW_AT_name __vla_expr0 > DW_AT_type <0x00000118> > DW_AT_artificial yes(1) > < 2><0x000000af> DW_TAG_variable > DW_AT_location len 0x0002: 9160: DW_OP_fbreg -32 > DW_AT_name __vla_expr1 > DW_AT_type <0x00000118> > DW_AT_artificial yes(1) > > It wasn't obvious to me how GDB with your patch would handle these. > Did you check your patch using that test? I forgot to add, that I did, and the final test failed with my setup: gdb.base/vla-ptr.exp ... print td_vla GCC compiled: $6 = {4, 5, 6, 7, 8} Clang-12 compiled: $6 = 0x7fffffffc0d0 But! This is potentially a different issue. I don't think that test accesses the array's size, and I've definitely seen typedef-related failures with Clang compared with GCC. (I don't need you to debug this for me, I'm just making sure you're aware!) Thanks, Gary -- Gary Benson - he / him / his Principal Software Engineer, Red Hat