If Cil is open (for d_exp) and Pretty is open (for sprint), you can convert an exp to a string with
something like this:
let expname e =
sprint 80 (d_exp () e)
The 80 is a width and won't work for an exp whose name is longer than that, but this has worked for
me. There are
undoubtedly more elegant and less limited ways to do what you want, but this is what I came up with
to handle a similar
issue.
Jesse
On 05/23/2012 01:52 PM, srikanth vaindam wrote:
I want to find out if a call is made to a particular function. (say the function
"sum").
A Call instruction in CIL is: Call(lval, exp, explist, loc) where exp is the name of the function
that is being called.
So, I want to compare this exp with a string "sum" (which is the name of the function I am
interested in).
I need to convert exp to a string or the string to an exp to compare them. How
do we do that.?
(the exp above in the call instruction is an Lval)
Best Regards,
Srikanth Vaindam
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users