public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Benson <abenson@carnegiescience.edu>
To: Jerry DeLisle <jvdelisle@charter.net>
Cc: gfortran <fortran@gcc.gnu.org>,
	Andrew Benson <abenson@carnegiescience.edu>
Subject: Re: Debugging a class or derived type procedure
Date: Thu, 4 Mar 2021 20:00:07 -0800	[thread overview]
Message-ID: <CAM3HiBewY+s=fhc6-FSu7AQU4qtrX-5-DH87CrF031uYf6c8dg@mail.gmail.com> (raw)
In-Reply-To: <08fb3131-b67e-ec32-c833-aacbafb4721f@charter.net>

Hi Jerry,

I think:

print *(me%_data)

should work.

-Andrew


--

* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html

* Galacticus: https://github.com/galacticusorg/galacticus

On Thu, Mar 4, 2021, 7:47 PM Jerry DeLisle <jvdelisle@charter.net> wrote:

> Hi all,
>
> I am using gdb on an application I am working on.  I have set a
> breakpoint to get the following:
>
> (gdb) r
> Starting program: /run/media/jerry/TP5/dev/factivate/a.out
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Program mymain begin
>
> Breakpoint 1, m_application::run (me=...) at m_application.f90:57
> 57        fdata => me%self
> (gdb) p me
> $1 = ( _data = 0x414b00, _vptr =
>      0x406140 <__m_application_MOD___vtab_m_application_Application> )
> (gdb) me::_data
>
> me is the passed argument to the class procedure "run".  I am happy that
> I can see this in gdb and it has the notation displayed well enough.  As
> you can see I can print 'me'.
>
> How do I examine " _data = 0x414b00" ?
>
> Any help appreciated?
>
> Jerry
>
>

      reply	other threads:[~2021-03-05  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  2:51 Jerry DeLisle
2021-03-05  4:00 ` Andrew Benson [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='CAM3HiBewY+s=fhc6-FSu7AQU4qtrX-5-DH87CrF031uYf6c8dg@mail.gmail.com' \
    --to=abenson@carnegiescience.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=jvdelisle@charter.net \
    /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).