Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Q about debugger usage

WSinc
New Contributor I
87 Views

I want to monitor one particular location in an array to see where in the code it is being "clobbered."

 

I tried many various IF statements, but so far nothing has isolated the problem.

 

wasn't there something called a WATCH command in the debugger?

Haven't used it in a long time, so not sure - is there an example somewhere ?

0 Kudos
1 Reply
IanH
Black Belt
87 Views

You can set a data breakpoint, that can trigger when an operation occurs on data at a certain address in memory.  To add a data breakpoint the program already needs to have started running - ideally it would be paused at a normal breakpoint ahead of where you expect the clobbering, but after the point where the storage for the relevant array has been created.  At this point you can use Debug > New Breakpoint > Data breakpoint,  For the address you may use a fortran-like expression, such as `LOC(array(5))` - i.e. the memory location of the fifth element of the variable named array.

(Details may vary slightly depending on Visual Studio version.)

 

Reply