[Soot-list] 答复: Different Jimple output from command line and Eclipse

Wu Xiaoquan wuxiaoquan07 at otcaix.iscas.ac.cn
Mon Sep 27 22:07:16 EDT 2010


Hi Eric,

Inspired by your email, we have found the reason for different results from
Eclipse and command line. In Eclipse, I put test file (HelloWorld.java) in
the same project with soot, before running soot, Eclipse compiles all the
java files into class files including the test file. So soot can find the
class file and convert it into Jimple file. While with command line, I put
the test file in the same path with soot, so only java file can be found,
and there is no class file. So soot generates Jimple from java file. It
causes the differences.

Xiaoquan

-----邮件原件-----
发件人: eric.bodden at googlemail.com [mailto:eric.bodden at googlemail.com] 代表
Eric Bodden
发送时间: 2010年9月27日 15:15
收件人: Wu Xiaoquan
抄送: soot-list at sable.mcgill.ca
主题: Re: [Soot-list] Different Jimple output from command line and Eclipse

> I wonder why could this happen? Is it because that the Eclipse would run
the
> program with different command line option?

There could be two reasons. First, are you actually analyzing the same
class files? Class files produced by Eclipse could be different than
those e.g. produced by javac and could cause Soot to produce different
(but equivalent) Jimple. Second (and more likely), the Eclipse plugin
uses by default an option to keep local-variable names in Jimple (you
can see it in the output). On the command line, this option is
disabled by default. Keeping local variable names means that Soot has
to apply some transformations to the Jimple code, which may explain
the difference.

Eric



More information about the Soot-list mailing list