View Full Version : How to display common block contents using CLI

10-30-2007, 02:34 PM
I have a common block declared like this:
COMMON /a/ a

I think I must be seeing the address of the common block instead of the contents of the variable when I say
dprint a

How can I reference the variable 'a' inside common block 'a' to see its value with dprint? Thanks.

10-31-2007, 11:49 AM
It appears that 'dprint a' is showing you one word, as an unsigned integer, starting at the base address of the common block a. If you have halted your program in a location where the variable a is in scope, I believe this to be a bug. Looking up, 'a', should find the variable not the common block.

That being said you should be able to workaround this by using 'dprint a#a' which will print the value of 'a' scoped within '/a/'.

The other thing that is worth mentioning is that if you are using the GUI, totalview, instead of the CLI, totalviewcli, you can 'dive' on a common block to display all the variables in the common block, or dive on individual variables to display their values.

I hope this helps.