[CIL users] ComputeCFGinfo help

2009-04-27 Thread Tapsie Giridher
Hi I checked out the example code and saw how computeCFGInfo was used. However, I have a doubt. Since computeCFGInfo works on a function, is it possible to do inter-function analysis using this? (To be specific, I want to be able to detect if a pointer freed in function A is freed again in functio

Re: [CIL users] Adding stmts after a particular statement

2009-04-27 Thread Gabriel Kerneis
On Mon, Apr 27, 2009 at 02:14:45PM -0400, Elnatan Reisner wrote: > I don't know why changing s.succs didn't work, Because this is a read-only field, computed by Cfg. It contains control-flow graph information, nothing else. > but I think you should be able to use ChangeTo if you replace 's' with

Re: [CIL users] Adding stmts after a particular statement

2009-04-27 Thread Hills, Mark A
Adding the new statement to s.succs wouldn't add it into the function body. I haven't used succs directly, but I'm fairly sure this is successors in the control flow graph, not just those statements that come after it in the text of the program. Mark Fro

Re: [CIL users] Adding stmts after a particular statement

2009-04-27 Thread Asim
I had faced a similar issue. It does not change for a reason thats buried in this mailing list. But the solution I used to get around it was to change when I am visiting a block. You can loop through all statements in a block and change as you pass through you your required statement. -Asim On 4/

Re: [CIL users] Adding stmts after a particular statement

2009-04-27 Thread Elnatan Reisner
I don't know why changing s.succs didn't work, but I think you should be able to use ChangeTo if you replace 's' with a statement with skind Block and put the list of statements you want into that Block. -Elnatan On Mon, 2009-04-27 at 13:47 -0400, Divya Krishnan wrote: > Hi , > I would like to add

[CIL users] Adding stmts after a particular statement

2009-04-27 Thread Divya Krishnan
Hi , I would like to add a list of statements AFTER a particular statement in a block. So if 's' is the current statement, I tried to add a list of statements after 's' by appending the list to s.succs. However I cannot see my statements reflected in the output. I cannot use ChangeTo since that all