[antlr-interest] Help!A source-to-source compiler and debugger:how to use SourceDebugExtension?

lzy7886 <lzy7886 at yahoo.com> lzy7886 at yahoo.com
Wed Feb 19 03:31:16 PST 2003


I wanna develop one dedicated language using java as the Intermediate 
Code, that is a source-to-source compiler converting the new language 
to java and a debugger to transform the debugging information from VM 
to the vocabulary of my languge.

In jdk1.4.x documentation,I found the following words:
**********************************************
Support For Debugging Other Languages 
The Java Platform Debugger Architecture has been extended so that non-
Java programming language source, which is translated to Java 
programming language source, can be debugged in the future. The table 
below describes the new APIs and APIs with comments that have 
changed. This information is based on the SourceDebugExtension. 
-----------------------------------------
New APIs APIs with Changed Comments 
JVMDI 
GetSourceDebugExtension   
JDWP - ReferenceType (2) Command Set 
SourceDebugExtension Command (12)   
JDWP - VirtualMachine (1) Command Set 
SetDefaultStratum Command (19)   
JDI - VirtualMachine interface 
void setDefaultStratum(String stratum)   
String getDefaultStratum()   
JDI - ReferenceType interface 
String sourceNames(String stratum) String sourceName() 
String sourcePaths(String stratum)   
List allLineLocations(String stratum, String sourceName) List 
allLineLocations() 
List locationsOfLine(String stratum, String sourceName, int 
lineNumber) List 
locationsOfLine(int lineNumber) 
List availableStrata()   
String defaultStratum()   
String sourceDebugExtension()   
JDI - Method interface 
List allLineLocations(String stratum, String sourceName) List 
allLineLocations() 
List locationsOfLine(String stratum, String sourceName, int 
lineNumber) List 

locationsOfLine(int lineNumber) 
JDI - Location interface 
  class comment (strata defined) 
int lineNumber(String stratum) int lineNumber() 
String sourceName(String stratum) String sourceName() 
String sourcePath(String stratum)   
String sourcePath()
--------------------------------------------------------------
but since there is only one person:me who knows the new language,so I 
assume this new information of SourceDebugExtension in class file 
should be generated by the new compiler and then I can use jpda to 
get this information from the debug target, which gets the 
information from the class file in question. But the same question 
arises again,how does jpda know how to interprete the 
SourceDebugExtension information?Do I need override all these 
class related myself or is there any solution availabe somewhere?
Can you tell me?

Thanks a lot in advance!  


                                               lzy


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list