[Soot-list] How to print out the values of variables in a valuebox in soot?
Zhoulai
zell08v at gmail.com
Thu Jan 2 06:30:18 EST 2014
Hi,
toString() returns a String, so you might have forgot to print it to your
console~
Zhoulai Fu
On Thu, Jan 2, 2014 at 4:36 AM, Jingyi Wang <wangjyee at gmail.com> wrote:
> This is the related code fragment where I can't print out the values from
> valuebox. May I know what's the problem?
>
> public GuaranteedDefsAnalysis(UnitGraph graph)
> {
> super(graph);
> DominatorsFinder df = new MHGDominatorsFinder(graph);
> unitToGenerateSet = new HashMap<Unit, FlowSet>(graph.size() * 2 + 1, 0.7f);
>
> // pre-compute generate sets
> for(Iterator unitIt = graph.iterator(); unitIt.hasNext();){
> Unit s = (Unit) unitIt.next();
> FlowSet genSet = emptySet.clone();
>
> for(Iterator domsIt = df.getDominators(s).iterator(); domsIt.hasNext();){
> Unit dom = (Unit) domsIt.next();
> for(Iterator boxIt = dom.getDefBoxes().iterator(); boxIt.hasNext();){
> ValueBox box = (ValueBox) boxIt.next();
> box.getValue().toString(); // simply using toString does not work
> if(box.getValue() instanceof Local)
> genSet.add(box.getValue(), genSet);
> }
> }
>
> unitToGenerateSet.put(s, genSet);
> }
>
> doAnalysis();
> }
>
>
> --
> Wang Jingyi, PhD Student
> Information Systems Technology and Design
> Singapore University of Technology and Design
> Tel: 65-84187716
> Email: jingyi_wang at mymail.sutd.edu.sg
>
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140102/09e571db/attachment.html
More information about the Soot-list
mailing list