public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/59438] New: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output @ 2013-12-09 20:30 burnus at gcc dot gnu.org 2013-12-09 21:58 ` [Bug fortran/59438] " burnus at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2013-12-09 20:30 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59438 Bug ID: 59438 Summary: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Reported by Sanimir of Intel, who is working on GDB VLA/Fortran array support. (See various patches at gdb-patches@ or http://intel-gdb.github.io/) (a) The DW_AT_allocated/DW_AT_associated is lacking for scalars - including strings. For arrays, it is handled via "struct array_descr_info", which is filled via gfc_get_array_descr_info, via info->allocated and info->associated. (b) Dynamic strings are wrapped within a DW_TAG_pointer_type character(len=:), allocatable :: str Printing 'str' yields (PTR TO -> ( character*N )) 0xdeadbeef. Unfortunately gfortran emits a DW_TAG_pointer_type for dynamic strings, which is not the case for allocatable arrays. --> Drop pointer_type and add an allocatable predicate so gdb can dereference the string if it is allowed to. (c) Allocatable/associated bits are available after stepping over variable declaration. integer, allocatable :: array(:) ! attribute is missing The above predicates will be initialized _after_ the inferior has passed the line and thus gdb shows some random state before the line is executed. --> Hoist the initialization of these bits (assign .False.) into the prologue, this allows gdb to determine the correct status of the variable at any given time. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59438] DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output 2013-12-09 20:30 [Bug fortran/59438] New: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output burnus at gcc dot gnu.org @ 2013-12-09 21:58 ` burnus at gcc dot gnu.org 2014-06-10 4:22 ` burnus at gcc dot gnu.org 2015-10-29 13:39 ` dominiq at lps dot ens.fr 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2013-12-09 21:58 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59438 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- Regarding (a): I think we should consider to simply use the same structure of arrays ("struct array_descr_info") also for scalars. Besides that it already exists, it is probably also sensible when we will handle coarrays, cf. PR49566. (d) We also need to handle DW_AT_allocated/associated for CLASS, which means that the variable's DW_AT_allocated must point to <var>._data.data instead of to <var>.data. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59438] DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output 2013-12-09 20:30 [Bug fortran/59438] New: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output burnus at gcc dot gnu.org 2013-12-09 21:58 ` [Bug fortran/59438] " burnus at gcc dot gnu.org @ 2014-06-10 4:22 ` burnus at gcc dot gnu.org 2015-10-29 13:39 ` dominiq at lps dot ens.fr 2 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2014-06-10 4:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59438 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- Regarding (a), see also https://gcc.gnu.org/ml/fortran/2014-06/msg00113.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59438] DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output 2013-12-09 20:30 [Bug fortran/59438] New: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output burnus at gcc dot gnu.org 2013-12-09 21:58 ` [Bug fortran/59438] " burnus at gcc dot gnu.org 2014-06-10 4:22 ` burnus at gcc dot gnu.org @ 2015-10-29 13:39 ` dominiq at lps dot ens.fr 2 siblings, 0 replies; 4+ messages in thread From: dominiq at lps dot ens.fr @ 2015-10-29 13:39 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59438 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2015-10-29 Blocks| |24546 Ever confirmed|0 |1 --- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Any progress? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24546 [Bug 24546] [meta-bug] gfortran debugging problems ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-29 13:39 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-12-09 20:30 [Bug fortran/59438] New: DWARF: Fortran mishandles ALLOCATABLE/ASSOCIATED in debug output burnus at gcc dot gnu.org 2013-12-09 21:58 ` [Bug fortran/59438] " burnus at gcc dot gnu.org 2014-06-10 4:22 ` burnus at gcc dot gnu.org 2015-10-29 13:39 ` dominiq at lps dot ens.fr
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).