Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran] Difficulty in viewing character variables during a breakpoint using ifort/idb

Hi Folks,

I'm having some trouble viewing the contents of a character variable in Photran.

This is the source for my program, hello.f90:

program hello

    implicit none


    CHARACTER(len=20) :: input

    INTEGER :: number


! Set number equal to 5 - A comment

number = 5


    WRITE(*,*) "Hello World"

    WRITE(*,*) "Please enter a string:"

    READ (*,*) input

    WRITE(*,"('I read: ', A)") input

    WRITE(*,"('Number is set to: ', I2)") number

end program hello


I have placed a breakpoint at the second to last WRITE statement.

This is the makefile:

all: hello.exe

hello.exe: hello.o

ifort -g -o hello.exe hello.o

hello.o: hello.f90

ifort -c -g -o hello.o hello.f90

clean:

rm -f hello.exe



The program builds fine and can be run fine. Breakpoints do work.


I set Photran to use idb by going into the Debug Configurations window, clicking on my launch configuration, then the Debugger tab. The debugger is set to gdb/mi in the pull down menu. 


The actual command I am giving in the GDB debugger prompt (the one that is adjacent to the Browse... button) is: /Users/emiller/idb_gdb


This is a simple shell script that calls IDB exec and include the -gdb flag to place it into GDB mode/


When I run the debug launch configuration I switch to the Debug perspective, as advised, and can see the Variables view an array called 'input' and a scalar called number.


The 'number' scalar is indeed correctly holding the number 5.


The 'input' array has 20 elements in it, correctly corresponding to size of my character variable. However, the contents of each array element are, what appear to be, the ascii character codes.


How can I get these to display their proper characters?


Additionally, when I click on any of these elements, I get the following message in the console view:


"/Users/emiller/Documents/workspace/HelloFortran": No such file or directory.

Reading symbolic information from /Users/emiller/Documents/workspace/HelloFortran/hello.exe...done

""/Users/emiller/Documents/workspace/HelloFortran"": No such file or directory.

69-data-evaluate-_expression_ (input).20

                                     ^



Thanks very much for any help,


Ed Miller


Back to the top