| Author |
How to inspect an array value in gdb?
|
|
|
| Hi,
I am stepping through my Fortran program using gdb. I hope to inspect an
array value. I cannot make it. My array is smc(*). My program line I am
inspecting is:
if(smc(1) .eq. -1) then
...
I set a break point here. Now in gdb, after reaching this line, I want
to see the value of smc(1). How can I do it? I did the following based
on Google,
(gdb)print smc(1)
It gives a very strange number. I guess it is memory address.
Thank you very much.
| |
|
| > I am stepping through my Fortran program using gdb. I hope to inspect
> an array value. I cannot make it. My array is smc(*).
What compiler and OS?
--
FX
| |
|
| FX wrote:
>
> What compiler and OS?
>
Sorry. I am running on Linux RedHat. Compiler: pgf90. I am using gdb
from gnu.
| |
|
| > Sorry. I am running on Linux RedHat. Compiler: pgf90. I am using gdb
> from gnu.
Hum. gdb segfaults when I try to run it on pgf90-compiled code, so I
won't be able to help you :(
--
FX
|
|
|
|