Output files with memry information?

Nicholas Sherlock n.sherlock@gmail.com
Sat Feb 26 07:49:00 GMT 2011


On 25/02/2011 9:05 p.m., Schnapphase wrote:
> I have a weird problem. I have to check some C code for read accesses on
> certain variables. For example, if I analyze the variable abc, I have to
> know if abc is being read somewhere in the code. This also includes access
> to the memory address where the variable is held. I don't care about write
> operations.

That is, in general, impossible, as it could decide the halting problem. 
Now, if you only want to know if the variable is read from directly, or 
the address of the variable is ever taken, that would be possible.

Cheers,
Nicholas Sherlock



More information about the Gcc-help mailing list