Feature request: method-local SourceFile attribute
Daniel Bonniot <[email protected]> Fri, 31 Oct 2003 19:44:03 +0100
| Newsgroups | gmane.comp.java.jswat.devel |
|---|---|
| Message-ID | <[email protected]> |
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