public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/26910] New: [fortran] Printing dynamic string with DW_AT_string_length of class loclistpr fails
@ 2020-11-17 13:37 vries at gcc dot gnu.org
  2020-11-17 13:40 ` [Bug fortran/26910] " vries at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-17 13:37 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-28  8:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 13:37 [Bug fortran/26910] New: [fortran] Printing dynamic string with DW_AT_string_length of class loclistpr fails vries at gcc dot gnu.org
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

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).