[Soot-list] "throws" information lost for some method when output to class file?

Chen Fu chen.fu.cn at gmail.com
Wed Oct 13 08:31:38 EDT 2004


I'm using Soot-2.0.1 :-(

But I guess the problem is not to "propagate" throws information. It
is that the "throws" information which should be in the method
signature is lost *only if* the output format is class file. It is
correct if the output format is Jimple.

for instance, one of the method declaration in java.io.FileInputStream:

private native int readBytes(byte[], int, int) throws IOException;

is changed to 
private native int readBytes(byte[], int, int);

if the output format chosen is class file.


On Tue, 12 Oct 2004 23:21:19 -0400, Ondrej Lhotak
<olhotak at sable.mcgill.ca> wrote:
> 
> 
> On Tue, Oct 12, 2004 at 10:50:51PM -0400, Chen Fu wrote:
> > I was trying to do some instrumentation and found that in the soot
> > generated class files, "throws" information for some methods are lost.
> >
> > This is how I found the problem
> > write a hello world program and put it through soot
> >
> > java soot.Main --app -w -i java.io Hello
> >
> > after it finished
> > cd sootOutput
> > java soot.Main --f J -soot-class-path .:${JAVA_HOME}/jre/lib/rt.jar
> > java.io.FileInputStream.
> >
> > If you look at the generated jimple file, "throws" information for all
> > the methods in this class disappered.
> >
> > Did I do something wrong or I need to change some option?
> 
> Is this with Soot 2.1.0, or the version from Subversion? The ability to
> propagate "throws" information through all of Soot is a feature that was
> added to Soot very recently.
> 
> Ondrej
> 
> >
> > Thanks!
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://www.sable.mcgill.ca/mailman/listinfo/soot-list
> >
>


More information about the Soot-list mailing list