From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qBvcAP1iemEKMAAAWB0awg (envelope-from ) for ; Thu, 28 Oct 2021 04:44:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 016AA1F0BB; Thu, 28 Oct 2021 04:44:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=unavailable 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 A8A4C1E940 for ; Thu, 28 Oct 2021 04:44:44 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 229D13858436 for ; Thu, 28 Oct 2021 08:44:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 229D13858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635410684; bh=mVRSLihBN1akcZmv/TDt5wI/SoBrI+VCrsioXyQNZsw=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=pKXh52BUJ4ykjQTweT+ORPa0DtliXAjhpDl2zVJ9n2P5PffKJl4+SNNN1gOkTnRY9 xmqfSrr8iDbxEZlDQUdKvk3JBHaCIY581ZgShEcDdFwWaJ8ytIy1xcqab7J+A+YA7I ZMdaKu6mD//4pTvyv2dzxSjBY0G4ZfqlQ68vEJ18= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 156283858D39 for ; Thu, 28 Oct 2021 08:44:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 156283858D39 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 2A55E2171F; Thu, 28 Oct 2021 08:44:25 +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 0E187139BE; Thu, 28 Oct 2021 08:44:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uh3yAeliemFLSAAAMHmgww (envelope-from ); Thu, 28 Oct 2021 08:44:25 +0000 Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_string_length with location list To: Simon Marchi , gdb-patches@sourceware.org References: <20211014195815.GA11048@delia> Message-ID: <014c5016-b3bb-70a2-9294-67bb84d834e9@suse.de> Date: Thu, 28 Oct 2021 10:44:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Jan Kratochvil Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 10/15/21 5:22 PM, Simon Marchi wrote: > 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. I've reviewed the test-case once more, and did the following updates: - removed the "contributed by" lines in the test-case, since we no longer do that. ( https://sourceware.org/gdb/wiki/ContributionChecklist#Attribution ) - updated the copyright license version to gplv3, and replaced the snailmail pointer to copy of license with the url. Committed with those changes (too trivial to repost). Thanks, - Tom