[Soot-list] How can I set jb options in the code?
Ahmad Golzar
golzara at cs.man.ac.uk
Thu Jul 24 19:18:09 EDT 2008
Hi,
Thanks Eric. Actually I know how to do that from the command line but I'm
not running soot from command line. I'm just using it as a library. Here is
a part of my code:
public static void main(String[] args) {
if (args.length == 0) {
System.out.println("Usage: java RunLiveAnalysis
class_to_analyse");
System.exit(0);
}
SootClass sClass = Scene.v().loadClassAndSupport(args[0]);
sClass.setApplicationClass();
Iterator methodIt = sClass.getMethods().iterator();
while (methodIt.hasNext()) {
SootMethod m = (SootMethod)methodIt.next();
Body b = m.retrieveActiveBody();
....
I want to know how to set the option in my code.
Thanks,
Ahmad
-----Original Message-----
From: eric.bodden at googlemail.com [mailto:eric.bodden at googlemail.com] On
Behalf Of Eric Bodden
Sent: Thursday, July 24, 2008 8:35 PM
To: Ahmad Golzar
Cc: soot-list at sable.mcgill.ca
Subject: Re: [Soot-list] How can I set jb options in the code?
Hi.
This class is just to extract options, not to set them. Preferably you
should set options on the command line, e.g. -p jb
keep-original-names.
Eric
2008/7/24 Ahmad Golzar <golzara at cs.man.ac.uk>:
> Hi,
>
> I'm a novice in soot. I'm writing a DataFlow Analysis and I like to use
the
> original names for my local variables in the Jimple transformation to make
> my results more understandable for the user. I wish to know how to set jb
> options in the code to make this happen. There exists a JBOptions class
with
> a use_original_names() method but there is no documentation about how to
use
> it.
>
> Thank you,
>
> Ahmad
>
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
More information about the Soot-list
mailing list