Re: how to iterate the local variables of a function in a plugin

2011-04-07 Thread Ian Lance Taylor
weixing ji writes: > I am writing a plugin which is invoked at the event > "PLUGIN_OVERRIDE_GATE". My question is how to access all the local > variables of a function if I get a FUNC_DECL tree node. I have tried > as following: > for(block = DECL_INITIAL(fn_decl); block; block = TREE_CHAIN(block

how to iterate the local variables of a function in a plugin

2011-04-07 Thread weixing ji
hi, I am writing a plugin which is invoked at the event "PLUGIN_OVERRIDE_GATE". My question is how to access all the local variables of a function if I get a FUNC_DECL tree node. I have tried as following: for(block = DECL_INITIAL(fn_decl); block; block = TREE_CHAIN(block)) { for (temp = BLOCK_VARS