[Soot-list] Subject: [PATCH] added resetSingletons
Eric Bodden
bodden at st.informatik.tu-darmstadt.de
Sun Jun 12 07:20:47 EDT 2011
Hi Phil.
Usually you can just call soot.G.reset(). Does this not work for you?
Eric
On 11 June 2011 19:47, Phil Pratt-Szeliga <pcpratts at syr.edu> wrote:
>
> This patch allows a developer to run Soot twice in one Java application. If
> there is an existing way to do this, please let me know. I use it to
> generate both .shimple and .class (the shimple is always useful for
> debugging)
>
> -Phil Pratt-Szeliga
>
>
> diff -r c8d3c1984b91 -r 557b6b1f9f60 src/make_singletons
> --- a/src/make_singletons Sat Jun 11 13:38:08 2011 -0400
> +++ b/src/make_singletons Sat Jun 11 13:42:33 2011 -0400
> @@ -44,5 +44,13 @@
> echo
> done
>
> +echo " public void resetSingletons(){"
> +for class in `cat singletons.list`; do
> + undottedClass="`echo $class | tr . _`"
> + instanceName="instance_$undottedClass"
> + echo " $instanceName = null;";
> +done
> +echo " }"
> +
> echo }
>
> diff -r c8d3c1984b91 -r 557b6b1f9f60 src/soot/Main.java
> --- a/src/soot/Main.java Sat Jun 11 13:38:08 2011 -0400
> +++ b/src/soot/Main.java Sat Jun 11 13:42:33 2011 -0400
> @@ -132,6 +132,10 @@
> }
> }
>
> + public static void resetSingletons(){
> + G.v().resetSingletons();
> + }
> +
> public String[] cmdLineArgs = new String[0];
> /**
> * Entry point for cmd line invocation of soot.
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
--
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478 Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
More information about the Soot-list
mailing list