public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/26910] New: [fortran] Printing dynamic string with DW_AT_string_length of class loclistpr fails
Date: Tue, 17 Nov 2020 13:37:06 +0000	[thread overview]
Message-ID: <bug-26910-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=26910

            Bug ID: 26910
           Summary: [fortran] Printing dynamic string with
                    DW_AT_string_length of class loclistpr fails
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider test-case gdb.opt/fortran-string.f90, as found here (
https://src.fedoraproject.org/rpms/gdb/blob/master/f/gdb-archer-vla-tests.patch
), but with a print line added to prevent inlining of f:
...
     1    subroutine f(s)
     2    character*(*) s
     3    s = s
     4    print *, s
     5    end
     6
     7    program main
     8    call f ('foo')
     9    end
...

When printing the type of s at line 4:
...
$ gdb.sh -batch ./outputs/gdb.opt/fortran-string/fortran-string \
    -ex "b 4" \
    -ex r \
    -ex "ptype s"
Breakpoint 1 at 0x400734: file fortran-string.f90, line 4.

Breakpoint 1, f (s=..., _s=_s@entry=3) at fortran-string.f90:4
4         print *, s
type = character*1
...
we get "character*1", while we'd like to see string length 3 there.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2020-11-17 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 13:37 vries at gcc dot gnu.org [this message]
2020-11-17 13:40 ` [Bug fortran/26910] " vries at gcc dot gnu.org
2020-11-17 13:43 ` vries at gcc dot gnu.org
2021-10-14 19:59 ` vries at gcc dot gnu.org
2021-10-15  5:23 ` [Bug symtab/26910] " vries at gcc dot gnu.org
2021-10-28  8:54 ` vries at gcc dot gnu.org

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=bug-26910-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).