From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_string_length with location list
Date: Fri, 15 Oct 2021 18:08:36 +0200 [thread overview]
Message-ID: <ddd2568a-9bb0-2194-e3ac-14e26074286c@suse.de> (raw)
In-Reply-To: <db9c790c-0c1f-7eff-88a2-967e35bf6025@simark.ca>
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
next prev parent reply other threads:[~2021-10-15 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 19:58 Tom de Vries via Gdb-patches
2021-10-15 15:22 ` Simon Marchi
2021-10-15 16:08 ` Tom de Vries via Gdb-patches [this message]
2021-10-28 8:44 ` Tom de Vries via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ddd2568a-9bb0-2194-e3ac-14e26074286c@suse.de \
--to=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=simark@simark.ca \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox