[Soot-list] Scene.v().getMethod() unable to find the method

Bodden, Eric eric.bodden at sit.fraunhofer.de
Wed Oct 15 11:15:36 EDT 2014


Hi again.

You should not use loadClassAndSupport. It's really not recommended unless you really know what you are doing.

Try calling Scene.v().addBasicClass("Hooks") *before* you call soot.Main.main. That's the preferred way.

Cheers,
Eric

On 15.10.2014, at 12:23, Rashmi Mudduluru <mudduluru.rashmi at csa.iisc.ernet.in> wrote:

> Hi Eric,
> 
> I am now able to load this class using
> Scene.v().loadClassAndSupport("Hooks").
> However, when I do this, soot is not able to load the classes that was
> earlier analyzing.
> (i.e) I have a class named Class1 which I am analyzing. On introducing
> this statement, "Scene.v().loadClassAndSupport("Hooks")" sott says that
> Class1 is a phantom class.
> 
>> Hi Rashmi.
>> 
>> Is the method "Hooks: void testing()" somehow known to Soot? Did you load
>> the class Hooks into the scene?
>> 
>> Cheers,
>> Eric
>> 
>> On 14.10.2014, at 19:32, Rashmi Mudduluru
>> <mudduluru.rashmi at csa.iisc.ernet.in> wrote:
>> 
>>> Hi,
>>> 
>>> I am instrumenting a java class file using soot.
>>> I want to insert a hook to a method after every assignment statement.
>>> I followed the instructions as given in the tutorial:
>>> http://www.sable.mcgill.ca/soot/tutorial/profiler2/profiler2.html
>>> 
>>> I get the following Runtime error:
>>> 
>>> Exception in thread "main" java.lang.RuntimeException: tried to get
>>> nonexistent method <Hooks: void testing()>
>>> 	at soot.Scene.getMethod(Scene.java:394)
>>> 	at Instrumentor.instrument(Instrumentor.java:60)
>>> 
>>> Has anyone faced this issue before?
>>> 
>>> 
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>> 
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at CS.McGill.CA
>>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>> 
>> --
>> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
>> Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC
>> SPRIDE
>> Tel: +49 6151 16-75422    Fax: +49 6151 869-127
>> Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
>> 
>> 
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.

--
Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 869-127
Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141015/f347b747/attachment.bin 


More information about the Soot-list mailing list