Yoav Etsion <[EMAIL PROTECTED]> writes: > The pointer variable's address is used as the pointer's unique ID in > a database, collecting information about each pointer variable - > mostly its legal bounds. That way I can test when a pointer crosses > its object's bounds.
If I understand correctly, you mean to figure out the legally reachable address ranges of individual pointer variables. I don't know what identifying the pointer *declarations* will do for you though. After all, many such declarations may be manufactured for temporary address values. You might instead hook up only to the "mudflap2" pass that tracks actual pointer dereferences. You could analyze the operand of the INDIRECT_REF etc. nodes to figure out which source-level spot caused the dereference. You may be able to follow the links back to a pointer declaration, should one exist. But I may misunderstand the nature of checking you intend. Could you summarize your intended overall algorithm? - FChE