Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Displaying common variables in the debugger's Watch window?

djfrederi
Beginner
1,227 Views
Hi,

How do I display a symbol that is in a named common in the Watch window of the debugger.

In Compaq Visual Fortran, the symbol could be displayed by typing "common name"%symbol in the Name column of the Watch window. For example, if I wanted to display the symbol V_FGRUD that is in the common block named VEHDS, I would type "VEHDS%V_FGRUD" in the Name column of the Watch window.
Using Visual Studio 2005's debugger with Intel Visual Fortran (version 11.1), when I type "VEHDS%V_FGRUD" in the name column, the Value column has "User defined type" displayed.
If I type VEHDS in the Name column, the Value column has "Undefined pointer/array" displayed and the Type column has "TYPE(_COMMON_VEHDS)" displayed. There is also a "+" sign to the left of VEHDS. When the "+" is clicked, a list of all of the symbols in the common VEHDS are displayed (like VEHDS%V_FGRUD for the symbol in the example) with "User defined type" in the Value column.

I thought that I had successfullyused this method before in IVF but now I can't get it to work. Did I accidentally change some setting (in Visual Studio) that I need to change back?

If anyone could help it would be greatly appreciated!

Thanks,
Dan
0 Kudos
10 Replies
Steven_L_Intel1
Employee
1,227 Views

You should be able to just type V_FGRUD. In fact, it will be displayed as a "local" in any scope that declares the COMMON. Variable names of COMMONs need to be qualified by the scope, since they can have different names in different program units.
0 Kudos
djfrederi
Beginner
1,227 Views

You should be able to just type V_FGRUD. In fact, it will be displayed as a "local" in any scope that declares the COMMON. Variable names of COMMONs need to be qualified by the scope, since they can have different names in different program units.

Steve,
Thanks for the feedback - and you're absolutely right. I was able to display V_FGRUD in the Watch window just by typing "V_FGRUD". But this only worked afterI stopped importing the common block from the dynamic link library that I'm using to share information between processes.
After I stopped importing the common, the two process didn't communicate any more, either- surprise, surprise.
So now I'm back to where I started.

The question that I should have asked was - "How do I display symbols that are in a common block that I import from a dynamic link library in the Watch window while using the debugger?"

Again, any help that you could provide would be greatly appreciated!

Thanks,
Dan
0 Kudos
Steven_L_Intel1
Employee
1,227 Views
Oh, now you're throwing DLLs into the mix. Can you show me a brief outline of what your code looks like? It still should just work, even with DLLIMPORTed COMMONs.
0 Kudos
Lorri_M_Intel
Employee
1,227 Views
Quoting - djfrederi

Steve,
Thanks for the feedback - and you're absolutely right. I was able to display V_FGRUD in the Watch window just by typing "V_FGRUD". But this only worked afterI stopped importing the common block from the dynamic link library that I'm using to share information between processes.
After I stopped importing the common, the two process didn't communicate any more, either- surprise, surprise.
So now I'm back to where I started.

The question that I should have asked was - "How do I display symbols that are in a common block that I import from a dynamic link library in the Watch window while using the debugger?"

Again, any help that you could provide would be greatly appreciated!

Thanks,
Dan

DLLIMPORTed COMMON. Ah, that's different. There's an open problem report (DPD200048138 ) on this issue.

- Lorri
0 Kudos
djfrederi
Beginner
1,227 Views

DLLIMPORTed COMMON. Ah, that's different. There's an open problem report (DPD200048138 ) on this issue.

- Lorri

Steve, Lorri,

A rough outline of what I'm using is shown below.

A COMMON block named VEHDS is declared in a separate file called vehds.k:

C Beginning of vehds.k include file
...
real*4 V_FGRUD
...
common /vehds/ ..., V_FGRUD, ...
!DEC$ ATTRIBUTES DLLIMPORT :: /vehds/
C End of vehds.k include file

A program that uses this common includes the vehds.k file using an include statement

program MAIN
...
include "vehds.k"
...
LOOP
...
X=V_FGRUD + 2.0
...
END LOOP
END MAIN

I'm running the MAIN program with the VS debugger and trying to look at the symbols in the vehds common in the Watch window.
Obviously there are a lot more variables in the common and a lot more lines of code in the program, but that's a rough outline.Does this give you an idea of what I'm trying to do?
Let me know if I've left anything out

I really appreciate your looking into this!

Thanks,
Dan


0 Kudos
djfrederi
Beginner
1,227 Views

DLLIMPORTed COMMON. Ah, that's different. There's an open problem report (DPD200048138 ) on this issue.

- Lorri

Lorri,

Is there a way I could review the open problem report DPD200048138?

Thanks,
Dan
0 Kudos
Steven_L_Intel1
Employee
1,227 Views
Sorry, the report isn't something viewable other than by developers. Lorri is our expert in this area - I wasn't aware there was still an issue with DLLIMPORTed COMMONs - I know it had been a problem in the past.
0 Kudos
djfrederi
Beginner
1,227 Views
Sorry, the report isn't something viewable other than by developers. Lorri is our expert in this area - I wasn't aware there was still an issue with DLLIMPORTed COMMONs - I know it had been a problem in the past.

Steve, Lori,

Is there any kind of estimate as to when this DLLIMPORTed COMMON problem will be fixed?

Thanks,
Dan
0 Kudos
Steven_L_Intel1
Employee
1,227 Views
No estimate - sorry.
0 Kudos
Steven_L_Intel1
Employee
1,227 Views
The problem of not being able to view DLLIMPORTed COMMON in the debugger is fixed in Update 4, available now.
0 Kudos
Reply