Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>, 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 11:22:10 -0400	[thread overview]
Message-ID: <db9c790c-0c1f-7eff-88a2-967e35bf6025@simark.ca> (raw)
In-Reply-To: <20211014195815.GA11048@delia>

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

  reply	other threads:[~2021-10-15 15:23 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 [this message]
2021-10-15 16:08   ` Tom de Vries via Gdb-patches
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=db9c790c-0c1f-7eff-88a2-967e35bf6025@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --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