From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UAxuEpinaWEpWgAAWB0awg (envelope-from ) for ; Fri, 15 Oct 2021 12:08:56 -0400 Received: by simark.ca (Postfix, from userid 112) id 45CA01F0BB; Fri, 15 Oct 2021 12:08:56 -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 F14DC1EE14 for ; Fri, 15 Oct 2021 12:08:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 785743857C7E for ; Fri, 15 Oct 2021 16:08:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 785743857C7E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634314135; bh=uj1fdqpcyjubcMbY3owXMp8ExZqHzbRNbaxvmFIkL+c=; 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=tNCG5pu+Ydmo7c1IL6ivv2W3ItU2iMoh8UsPRRMhmva/PaYCOlqWj9vdvLqlkqEUi Bz/q9EWg4+07FR/dwlu5qZoxOB2PVUlXy90NqthPAaRd/hheVNTlbR7GZ/opeko2Uo Cb6Ul5qBrLYNywmuuqxsbxXE/y4oxptggwhMNUOA= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id DE73A3858432 for ; Fri, 15 Oct 2021 16:08:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE73A3858432 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-out2.suse.de (Postfix) with ESMTPS id 1C5BA1FD4F; Fri, 15 Oct 2021 16:08:37 +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 01A8113C2E; Fri, 15 Oct 2021 16:08:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ieVeOoSnaWGTegAAMHmgww (envelope-from ); Fri, 15 Oct 2021 16:08:36 +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: Date: Fri, 15 Oct 2021 18:08:36 +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? > I'm not very familiar with fortran either, but AFAIU the meaning is: character string of length one. > Again, I don't know anything about fortran, but the change in dwarf2/read.c > looks good to me. Thanks for the review. - Tom