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

Is it a bug in the Debug of IVF8.0 + .NET2002?

wu_internet
Beginner
278 Views
Sorry for the long message first.
Sometime ago, I posted a message to ask people share some experience on using debug under IVF8.0+.NET2002. So far noresponse has beenreceived,Now I dare to say the following might be a bug, or something not functioning.
The function I amreferring to isset a data breakpoint during debug, which means I try to set a breakpoint whenever certain variable changes its value or any other conditions specified by user. The fucntion works well under CVF6.x+MS Studio6.0. Now, when I am tried in IVF8.0+.NET2002, the breakpoint never breaks when it is supposed to break. For convenience, the following is the original text I cited from debug section of the userguide of IVF volume I.
=========================================================
Copied from user guide, Volume I, debug section (IVF 8.0)
=========================================================
Using Data Breakpoints (Current Scope)
A data breakpoint displays a message box when the value of a variable changes or when a specified condition is met. Unlike a location condition breakpoint, data breakpoints are not associated with a specific source location.

Using Visual C++ Data Breakpoint Support
The Visual Studio .NET IDE does not support a "Fortran" choice in the Language drop-down list in the New Breakpoint dialog boxes, so it is not possible to specify Fortran data breakpoint support. When setting data breakpoints in Fortran, the Visual C++ data breakpoint support is used instead. This means that you cannot enter the variable name or condition using Fortran syntax; you must use Visual C++ syntax. The following guidelines apply:

For scalar variables, enter the variable name in upper case. This allows Visual C++ to find the variable in the debug information and apply the correct breakpoint.

For arrays, types, and so forth, use the Fortran loc intrinsic function in a Watch window or the Immediate window to obtain the address of the variable. Use this address in the variable name edit box.

For example, to prepare to set a data breakpoint at an array element a(5), do the following:

Select Debug>Windows>Immediate.

Enter loc(a(5)) in the immediate window and press the Enter key.
The result displayed is the address of the array element. The address may be displayed as a decimal number or a hexadecimal number, depending upon your current display mode. For a decimal number, you will enter it into the variable name edit box. For a hexadecimal number, you will use the Visual C++ hexadecimal syntax (0xnnnnnnnn) rather than the Fortran syntax (#nnnnnnnn) in the variable name edit box.



The following procedure applies to debugging the current routine (current scope).

To set a data breakpoint:
In the Debug menu, select New Breakpoint....
Click the Data tab.
Enter the variable name using the guidelines above. If you want a data breakpoint to occur whenever the desired condition is met, click the Condition button and specify the condition, for example: A == 0 Click OK to dismiss the New Breakpoint dialog box.
To disable, enable, or remove a data breakpoint, do one of the following:

In the Debug menu, select Windows>Breakpoints.
To disable or enable the data breakpoint, use the check box to the left of the data breakpoint (check indicates enabled). < BR>To remove a data breakpoint, click (select) the data breakpoint and click the Delete button.
Under certain conditions, the debugger may disable the data breakpoint. In this case, you should either try to enable it or remove and set it again.
===========================================================
The following is an example I am trying to do (It's just for reader's convenience, any fortran code can be tested to use such function).
=======================================================
Sample code
=======================================================
PROGRAM SQUARES
integer i,j
do i = 1, 10
j = i * i
enddo
END PROGRAM SQUARES
I set a breakpoint on data j on the condition whenever j changes its value. However, such break never occurs.
Could someone give any help or comment on this?
Regards,
David.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
278 Views
I don't think that anyone who reads this is familiar with the inner workings of the debugger. If you're having a problem, submit a support request, including a small (if possible) but complete reproducer, to Intel Premier Support. That way it will get to the appropriate engineers.
Data breakpoints were flaky in VS6 - I have not tried them in VS.NET.
0 Kudos
Reply