[Soot-list] Using soot as a library

David Given dg at cowlark.com
Fri Jul 6 19:00:49 EDT 2012


On 06/07/12 12:51, Eric Bodden wrote:
[...]
> An easier way to set options is to use the "Options" class. You can
> use Options.v().setXYZ(..) to set options.
> 
> Then you typically call Soot's main method or do something more
> elaborate if needed.

Yes, that's much easier; ta. I'm actually invoking Soot by setting up
Options, then calling Scene.v().loadNecessaryClasses() and
PackManager.v().runPacks(); at this point, getClasses() seems to be
returning valid data. Is this the right way to do it?

I haven't got as far as getting at the jimple AST yet, but looking at
the tracing Soot does appear to be generating it, so I'm confident it'll
be there...

Next newbie question: is there an easy way of asking Soot what classes a
particular class references? AFAICT it should just be a matter of
pulling the class references out of the constant pool, but I can't find
any API to do it.

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120707/e8021879/attachment.bin 


More information about the Soot-list mailing list