Re: Feature request: method-local SourceFile attribute

Nathan Fiedler <[email protected]> 31 Oct 2003 11:51:29 -0800
Newsgroups gmane.comp.java.jswat.devel
Organization Blue Marsh Softworks
Message-ID <1067629889.1668.5.camel@chip>
I don't know if you got my first response to you, so I'm including the
pertinent part here.

It may or may not be that JPDA supports a different source file for each
method (maybe only down to each class). You would have to implement the
feature in Nice and make appropriate changes in JSwat to determine if it
will work or not.

n


On Fri, 2003-10-31 at 10:44, Daniel Bonniot wrote:
> Hi,
> 
> First, congratulations for the development of JSwat. It is the most
> accomplished Free Java debugger I have seen.
> 
> Since I just subscribed to the list, let me just introduce myself by
> saying that I am the main author of the Nice programming language
> (http://nice.sf.net). Since Nice is compiled to Java bytecode, my main
> interest is to see how JSwat could be used to debug programs written in
> Nice, in a combination of Nice and Java, or in general in any language
> compiled to Java bytecodes.
> 
> I just voted for the bug report about skipping Synthetic methods
> (http://www.bluemarsh.com/bugzilla/show_bug.cgi?id=610). That would be a
> good step in that direction.
> 
> A main issue now has to do with finding source files. Due to the way
> methods are compiled in Nice, it will often happen that source code
> originating from different source files are compiled as bytecode methods
> of a single class. This makes the SourceFile attribute of the class file
> useless, because which source to look for depends on the method.
> Therefore, I thought that a logical convention would be to allow each
> bytecode method to have its own SourceFile attribute, and that JSwat
> could use that attribute to look for the file to display. If there is no
> such attribute, the class' SourceFile is used, as is done currently.
> This way, there should be no compatibility problem with javac compiled
> code. I also believe that this convention would be useful for other
> non-java languages on the JVM.
> 
> My questions to the JSwat developers: would you agree with jswat
> implementing this feature? How hard would it be to implement?
> 
> Daniel