public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "nils-christian.kempke at intel dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/26373] Printing members of parent type from an instance of an extended type
Date: Fri, 08 Apr 2022 14:22:13 +0000	[thread overview]
Message-ID: <bug-26373-4717-UvL4c9pF6F@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26373-4717@http.sourceware.org/bugzilla/>

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

Kempke, Nils-Christian <nils-christian.kempke at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nils-christian.kempke@intel
                   |                            |.com

--- Comment #2 from Kempke, Nils-Christian <nils-christian.kempke at intel dot com> ---
This is a duplicate of the already cited issue
https://sourceware.org/bugzilla/show_bug.cgi?id=22497

Similar to my comment there, also here the problem is that gfortran is not
emitting any inheritance information in its DWARF.

Using ifx/ifort and the latest gdb I can do the following:

=================================================================
Breakpoint 1, my_program () at ./f.f90:43
43      call child % increment
(gdb) p child%a
$1 = 1
(gdb) p child%b
$2 = 2
(gdb) p child%c
$3 = 3
(gdb) p child
$4 = ( test = ( a = 1, b = 2 ), c = 3 )
(gdb) p child%test
$5 = ( a = 1, b = 2 )
(gdb) p child%test%a
$6 = 1
(gdb) p child%test%b
$7 = 2
(gdb)
=================================================================

On GDB side this issue was fixed (as pointed out in the other issue). The
problem lies in gfortrans DWARF here.

With fortran and the missing DWARF inheritance info I can now do

=================================================================
Breakpoint 1, my_program () at ./f.f90:43
43      call child % increment
(gdb) p child
$1 = ( test = ( a = 1, b = 2 ), c = 3 )
(gdb) p child%test
$2 = ( a = 1, b = 2 )
(gdb) p child%test%a
$4 = 1
(gdb) p child%a
There is no member named a.
(gdb)
=================================================================

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

      parent reply	other threads:[~2022-04-08 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 11:27 [Bug fortran/26373] New: " antonio.mccarneiro at gmail dot com
2020-08-11 11:29 ` [Bug fortran/26373] " antonio.mccarneiro at gmail dot com
2022-04-08 14:22 ` nils-christian.kempke at intel dot com [this message]

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-26373-4717-UvL4c9pF6F@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).