[Soot-list] IMPORTANT - problem with SourceLocator

Eric Bodden eric.bodden at mail.mcgill.ca
Tue Mar 7 20:04:39 EST 2006


Just our of curiosity: The class file definition seems to have the souce
code location embedded, e.g. javap gives me "Compiled from
<nameOfSourceFile>" when I dump a class file. So is it not
possible/enough to rely on that information?

Eric  

> -----Original Message-----
> From: soot-list-bounces at sable.mcgill.ca 
> [mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of 
> mbatch at cs.mcgill.ca
> Sent: Monday, March 06, 2006 3:55 PM
> To: soot-list at sable.mcgill.ca
> Subject: [Soot-list] IMPORTANT - problem with SourceLocator
> 
> Hello,
> 
> There seems to be an incorrect assumption in the 
> SourceLocator (getSourceForClass method). It explicitly 
> strips the class name being looked up of anything trailing a 
> '$' (assuming it is an inner class of the form 
> outclass$innerclass). This presumption cannot be made, of 
> course, because _any_ class can contain a '$'.
> 
> I propose to first check for an inner class and, if that does 
> not exist, check for a regular class of the given (full) 
> name. I don't want to go ahead and jam a fix in until I ask 
> if anyone knows of any unwanted side-effects of this fix. Suggestions?
> 
> Michael
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list