Is it possible to find out if a memory operand is associated with a struct and if it is then is it possible to find out the type of that struct For example if we have the following code:

typedef struct {

int a;

int b;

} foo;

void main(){

foo c;

c.b = 5;


then in Phoenix HIR, it will look something like:

tmp1 = &c;

tmp2 = tmp1 + 4;

*tmp2 = 5;

Is it possible to figure out that *tmp2 has an enclosing struct of type foo

Re: Phoenix Figuring out the type of struct associated with a memory operand

Andy Ayers - MSFT

Unfortunately the compiler path (c2) is not able to access high-level type information. All you can determine at present is that c is an aggregate with a particular size (say 8 bytes).

This lack of type information is actually a limitation in the VS 2005 frontend. We've done work to remove this limitation that will ship in the next release of VS (codename "Orcas"), and once that's out, we'll release an updated RDK/SDK that is compatible with Orcas and incorporates that type information into HIR.