[Soot-list] Is there anybody taking care of Soot bug reports?
Sunny
sunfire001 at gmail.com
Mon Jun 5 21:41:18 EDT 2006
Hi Eric,
I did the following experiment using Feng Qian's example. This is the
MainDriver.java with one more line added (second to last line):
public class MainDriver {
public static void main(String[] args) {
/* check the arguments */
if (args.length == 0) {
System.err.println("Usage: java MainDriver [options] classname");
System.exit(0);
}
/* add a phase to transformer pack by call Pack.add */
Pack jtp = PackManager.v().getPack("jtp");
jtp.add(new Transform("jtp.instrumenter",
new InvokeStaticInstrumenter()));
/* Give control to Soot to process all options,
* InvokeStaticInstrumenter.internalTransform will get called.
*/
PhaseOptions.v().setPhaseOption("jb", "use-original-names:true");
soot.Main.main(args);
}
}
I ran this driver within DOS: java MainDriver TestInvoke and the program
just worked fine. I also printed every statment in the
InvokeStaticInstrumenter and it seems that original names are preserved.
Then exactly the same code, does not in Eclipse. This means that I create a
java project in eclipse and import these four .java files. When I ran the
MainDriver (with only TestInvoke the program arguments), it produced the
same error I reported earlier. But if I remove the line:
PhaseOptions.v().setPhaseOption("jb", "use-original-names:true");
It worked again.
As you pointed out, run the MainDriver in an Eclipse java project and in DOS
are equivalent, right? I think they are equivalent too but why the latter
approach does not work? Thank you for your time.
Sunny
On 6/4/06, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
>
> > This could
> > be achieved in the code by using PhaseOptions.v().setPhaseOption("jb",
> > "use-original-names:true"); or something like that.
>
> So why don't you just set those options in exactly that way? Does this
> not work then for you?
>
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20060605/07e416e4/attachment.htm
More information about the Soot-list
mailing list