Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] Viewing Module Variables in Debugger

I see this has been asked in years past but I'm not sure if it's been asked for Photran 8.0.

How can I view module variables in Photran?

Here is some example code:

MODULE example_module


INTEGER :: a_number = 7


REAL :: square_root



END MODULE


program hello

    USE something

    implicit none


    CHARACTER(LEN=50) :: input

    REAL :: local_number = 7.2

    INTEGER :: example_integer


    WRITE(*,*) 'Hello, World'


    example_integer = 12

    local_number = 229.4


    WRITE(*,*) 'ENTER SOMETHING:'

    READ(*,*) input


    WRITE(*,*) 'HEY THERE 'input

end program hello



Now when I set a breakpoint to the WRITE(*,*) statement preceding the READ(*,*), I get a listing of the 'local' variables, example_integer and local_number. The module variable 'a_number' is not included.

If I run this in GDB (namely fsf-gdb) from the command line, I can access this variable as:

__exampe_module_MOD_a_number

Is it yet possible (in version 8.0 no less) to access module variables?

I'm using GDB 7.4.1.


Ed

Back to the top