* Debugging a class or derived type procedure
@ 2021-03-05 2:51 Jerry DeLisle
2021-03-05 4:00 ` Andrew Benson
0 siblings, 1 reply; 2+ messages in thread
From: Jerry DeLisle @ 2021-03-05 2:51 UTC (permalink / raw)
To: gfortran
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Debugging a class or derived type procedure
2021-03-05 2:51 Debugging a class or derived type procedure Jerry DeLisle
@ 2021-03-05 4:00 ` Andrew Benson
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Benson @ 2021-03-05 4:00 UTC (permalink / raw)
To: Jerry DeLisle; +Cc: gfortran, Andrew Benson
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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-05 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 2:51 Debugging a class or derived type procedure Jerry DeLisle
2021-03-05 4:00 ` Andrew Benson
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).