The tree is as follows
real , allocatable :: dd (:)
end type A
type (A) , pointer :: aa
end type B
type(B) , pointer :: bb
end type C
type(C) , allocatable :: cc(:)
end module M
print M::cc(10) % bb % aa % dd(100)
$1 = 0
info address M::cc(10) % bb % aa % dd (100)
generates the error: No symbol "cc(10) % bb % aa% dd (100)" in current context.
whatis address M::cc(10) % bb % aa% dd(100)
generates the error: Cannot access memory at address 0xa0
I see that the compiler flag "-g" has to be specified to access global variables but that didn't help.
The reason I need the address is to `watch M::cc(10) %bb % aa % dd (100)` with a software watchpoint so that I don't slow gdb drastically. I'm hoping that this would give me insight into the lines of code which change the value of `dd (100)`.
One option that I've already explored is to just go ahead and set the watch point with:
watch c(10) % bb % aa % dd ( 100 )
But this results in several hundred watchpoints with Numbers 1.1 , 1.2, 1.3 .... 1.500! This is really slowing down the execution in gdb.
So how could I access the address? If that is not possible, what is the best alternative?
This is gdb-ia.
In another module, I had
module test real :: a, b, c end module
and gdb-ia couldn't find them when I tried accessing by "print test::a". However,
module test real :: a=0, b=0, c=0 end module
changes that and I'm able to "print test::a" to display the value (not necessary 0 as a is read form a file later). This led me to believe that gdb-ia is able to access statically allocated variables/arrays. For dynamic allocation, I seem to have trouble.