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

Break when contents of variable changes

Stephen_Sutcliffe1
1,632 Views

It is possible, in Visual Studio 2010 and IVF 15.1, to set a breakpoint such that the program stops when the value of a variable changes anywhere during the program execution rather than at a particular line of code? I've found any option where if you know the address of the variable you can set this but have not yet found how to get the address of a variable.

Thanks in advance for any tips.

 

0 Kudos
4 Replies
LRaim
New Contributor I
1,632 Views

You have to use the LOC function to identify the address of a variable and define the no of bytes you have to watch.

0 Kudos
Stephen_Sutcliffe1
1,632 Views

Thanks Luigi for the idea, I hadn't thought of that. I managed to sort out what was going on at last.

There ought to be a way of getting the address from within the debugger or VS so that you shouldn't need to change your code. At least there is a work-round by explicitly getting the address programmatically..

Thanks

Steve

0 Kudos
Steven_L_Intel1
Employee
1,632 Views

You can use LOC(variablename) in the debugger field for entering the address.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,632 Views

you can type the LOC(xxx(x,y)) as a function call with symbolic address into the data break window. Or enter xxx(x,y) into a Memory window, then the pull-down displays the hex address. This can be copied and pasted into the break address.

Jim Dempsey

0 Kudos
Reply