[Soot-list] java.lang.System woes

David Kawrykow dkawry at cs.mcgill.ca
Mon Feb 8 12:32:07 EST 2010


Hi,

I'm doing a course with Laurie Hendren and fairly new to Soot. I am 
trying to insert a System.out.println() statement in a byte code file, 
but when I try to load the java.lang.System SootClass, I get the 
following error:

Caused by: java.lang.RuntimeException: This operation requires resolving 
level SIGNATURES but java.lang.System is at resolving level HIERARCHY
If you are extending Soot, try to add the following call before calling 
soot.Main.main(..):
Scene.v().addBasicClass(java.lang.System,SIGNATURES);
Otherwise, try whole-program mode (-w).

I have included a very small java file (SystemTest.java) that produces 
this error when I run it on the (enclosed) TestClass.java. Locally, each 
file is in a separate Eclipse project.

I have been going through the tutorials on instrumenting byte code, but 
none mention anything more than what I do in my test file. I'm sorry if 
this has been addressed somewhere already; I haven't been able to find it.

Thanks
david


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SystemTest.java
Type: text/x-java
Size: 919 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100208/5c633018/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestClass.java
Type: text/x-java
Size: 210 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100208/5c633018/attachment-0001.bin 


More information about the Soot-list mailing list