Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Character variables in IDB

dajum
Novice
448 Views
How to I get it to display the text for a FORTRAN CHARACTER variable in IDB. I assume the EVALUATION window is the right place, but it only gives and address for the VALUE even though the type is CHARACTER.

Thanks,

0 Kudos
8 Replies
mecej4
Honored Contributor III
448 Views
Try

p

in the "debugger command" window.
0 Kudos
dajum
Novice
448 Views
Sorry I wasn't clear. I don't want to have to issue a command or select and hover over the variable. Those work fine. I just want to see what the value is every time I hit a breakpoint, and just continue running to the next breakpoint. If I have to enter a command that takes 10-30 times longer to get to the right point in the execution. Why don't the evaluations windows and the locals window provide a view of CHARACTER variables?If you can't get them there, it seems like a huge flaw in the program.
0 Kudos
Ron_Green
Moderator
448 Views
the Locals window will only display those variables that are local to the current scope. IDB uses Fortran scoping rules for this window.

Are you in the main program scope or in a subroutine? And where is the character variable declared - in the subroutine or in the main program, in a common, in a module?

Can you show us an example?

ron
0 Kudos
dajum
Novice
448 Views
I'm in the subroutine that defines the variable. Would variables that aren't defined in a routine appear in the locals window? You can see in my picture I have hfilei both in the evaluations window and the locals window. Same appearance in each window. I have compile and linked using ifort in Composer. The variable is defined in this routine as CHARACTER*255 which you can see the debugger knows from the TYPE listing. Is there something special I need to do to make this work?

Thanks,

Dave
0 Kudos
mecej4
Honored Contributor III
448 Views
It would help to have the source code for a short program that displays the problematic behavior. I can see the problem in the screenshot, but that is not enough to make a diagnosis, and the program shown there appears rather large.
0 Kudos
Ron_Green
Moderator
448 Views
The triangle to the right of the variable is clickable and expands the variable so you can see the characters in the variable. It's not very 'Fortran'-ish, but is very C-like (array of characters).

You will also see the name of the variable in the botttom status bar where all the arguments to the OPEN are shown.
0 Kudos
dajum
Novice
448 Views
Thanks Ron!!! I really am a novice at this linux stuff. That did expand it into exactly what I was looking for.

Dave
0 Kudos
Ron_Green
Moderator
448 Views
Glad that helped. I'm also ramping up IDB on Linux. It's pretty useful overall but some things are not as intuitive as I'd like.

ron
0 Kudos
Reply