GCC Plugin Development DECL_SAVED_TREE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm currently developing a Plugin with GCC 4.6.3. I want to traverse function bodies; that is where I get problems. I use the DECL_SAVED_TREE macro to get the tree of the function body. When I get the tree-code-name of this tree I usually get "bind_expr" with which I can get all variable declarations in this function. This works pretty well. But I want to analyse some other expressions of this function, too (like return_expression, if_statements, etc.). How can I do this? I tried using the DECL_SAVED_TREE macro twice (like tree t = DECL_SAVED_TREE(DECL_SAVED_TREE(node)) but this returns NULL always. I also tried the TREE_CHAIN macro (like tree t = DECL_SAVED_TREE(node); t = TREE_CHAIN(t)) but this returns NULL aswell.
What am I doing wrong? Hope you can help me.

Looking forward to hearing from you.

M. Miller






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux