|
From: dongyu s. <sun...@ya...> - 2008-09-28 17:43:25
|
Hi, Wala:
I am using the the CFG classes to analyze the program instruction by instruction.
Basically, I first contruct a CFG, then I use the getNode to loop thru the basic block one by one, then for each basic block I use the "iterator" to scan thru the instructions. The iterator.next returns the IInstruction interface pointer.
Base on this interface, it seems has very limited method. For example, if I want to check if the instruction is branch, conditional branch, method call...etc, this interface does not give the method to check. Is there anyway I can find such information for the CFG instructions?
I also need to find such information from the InterprocedureCFG's where after I contruct the InterprocedureCFG, go thru each node (
BasicBlockInContext), then iterate thru the instruction of each basci block. I hit the same problem as the BasicBlockInContext.iterator also only gives the IInstruction interface which is very limited in the method to use..
Please kindly advise.
thx
dongyu
|