[Soot-list] Successivly load classes in SOOT

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Sat Dec 18 06:32:14 EST 2010


Hello.

using loadClassAndSupport is not recommended. Rather use transformers
instead and state the classes that you want to load on the command
line. This has been discusses many times on this mailing list.

Best wishes,
Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



2010/12/16 Wu Xiaoquan <wuxiaoquan07 at otcaix.iscas.ac.cn>:
> When I analyze class A with the following SOOT APIs, everything is OK.
>
>
>
>     SootClass sClass = Scene.v().loadClassAndSupport(className);
>
>                    Scene.v().loadNecessaryClasses();
>
>                    sClass.setApplicationClass();
>
>                    Options.v().set_whole_program(true);
>
>
>
> But when I analyze another class B in the same process after loAding A with
> the same APIs, exceptions occures at:
>
>     SootClass sClass = Scene.v().loadClassAndSupport(className);
>
>
>
>     Exception message is like this:
>
>
>
>     This operation requires resolving level SIGNATURES but B is at resolving
> level HIERARCHY
>
> If you are extending Soot, try to add the following call before calling
> soot.Main.main(..):
>
> Scene.v().addBasicClass(B,SIGNATURES);
>
>
>
>     Could anybody know how to load two classes in a row in SOOT?
>
>     Is there same APIs which could restore SOOT to the initial state?
>
>
>
>     Thanks.
>
>
>
>
>
>
>
>
>
>
>
> ===================================================
>
> Wu, Xiaoquan 伍晓泉
>
> Technology Center for Software Engineering
>
> Institute of Software, Chinese Academy of Sciences
>
> P.O.Box 8718, Beijing 100190, China
>
> Email: wuxiaoquan07 at otcaix.iscas.ac.cn
>
> ===================================================
>
>


More information about the Soot-list mailing list