Many times I开发者_如何学运维'm having a problem with printing in function foo
, and I want to look for all occurences of Print
in code which is reachable in the Control Flow Graph from function foo
. Or in all code in the paths between foo
and bar
(as I verified an assumption is true before I call foo
, and false after I reach bar
, so I want to find out what's happening in between).
Is there any tool that allows me to do that easily. I'm not going to compile all my C code with CIL, and write an OCaml module to do search with the CFG. I want something that works with minimum hassle.
Eclipse CDT should be able to do that (you can calculate the CFG with show function hiererchy
), but I didn't find something similar there.
I'm now targeting C/C++, but I'll be glad to hear about similar tools? I'm not sure CQL have a way to express that.
精彩评论