From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RmyIB92caWG/WAAAWB0awg (envelope-from ) for ; Fri, 15 Oct 2021 11:23:09 -0400 Received: by simark.ca (Postfix, from userid 112) id 0E9D51F0BD; Fri, 15 Oct 2021 11:23:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=MAILING_LIST_MULTI, NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 516F41EE1F for ; Fri, 15 Oct 2021 11:23:08 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2F573857831 for ; Fri, 15 Oct 2021 15:23:07 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A83BE385781E for ; Fri, 15 Oct 2021 15:22:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A83BE385781E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 44CF31E79C; Fri, 15 Oct 2021 11:22:11 -0400 (EDT) Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_string_length with location list To: Tom de Vries , gdb-patches@sourceware.org References: <20211014195815.GA11048@delia> From: Simon Marchi Message-ID: Date: Fri, 15 Oct 2021 11:22:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211014195815.GA11048@delia> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit 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: , Cc: Jan Kratochvil Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-10-14 3:58 p.m., Tom de Vries via Gdb-patches wrote: > Hi, > > Consider a fortran routine where a string variable s is modified: > ... > subroutine f(s) > character*(*) s > print *, s > s(1:3) = 'oof' > print *, s > end subroutine f > ... > > When compiling with optimization level -O1 and printing the type of > variable s we get: > ... > $ gdb -q -batch outputs/gdb.opt/fortran-string/fortran-string \ > -ex "b f" \ > -ex run \ > -ex "ptype s" > Breakpoint 1 at 0x4006f7: file fortran-string.f90, line 21. > > Breakpoint 1, f (s=..., _s=_s@entry=3) at fortran-string.f90:21 > 21 subroutine f(s) > type = character*1 I'm not familiar with fortran, does this notation ("character*1") have a meaning in fortran? Again, I don't know anything about fortran, but the change in dwarf2/read.c looks good to me. Simon