debugging literals

debugging literals

Is it possible to observe the memory locations of 'literals'(e.g. Fortran PARAMETERs, etc.) in debug? Specifically, can the memory location of '(2(1PG11.4)' in

WRITE(string,'(2(1PG11.4)) x, y

be found (e.g. in an assembly listing and map) and observed using the Memory tool in Visual Studio in debug?

This possibility (among others) was raised in response to CVF17831.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It depends. In the particular case you describe, the FORMAT is "compiled" and passed to the run-time library in compiled form, so you can't see it in anything that is recognizeable. In other cases, the compiler never "materializes" constants into memory. But if it does, you should be able to find them in a machine code list and then look at a link map for the base address of the image section they're in. This is a lot of work, though.

As for your original problem report, I don't think your format string is being overwritten because constants are allocated in read-only image sections (and since you're using Windows 2000, they are indeed read-only.) My guess is that your program is corrupting data elsewhere.

Steve

Steve

Login to leave a comment.