Byeongcheol Lee wrote: > I'm a grad student at UT Austin. I have been looking for a solution for > line number mapping in the source-to-source translation. How did you deal > with the mapping from the java byte code index to the x10 line number? > > SMAP in JSR-45 would be one possiblity, but I'm not sure if the current > JDK(6 or 7) has a good support for the JSR-45. For instance, the stack dump > in > JDK(6 or 7) wouldn't be sensitive to the SMAP information. jdb would not > understand the break command like "break 10 example.x10." > > If you are not using the SMAP feature, how did you solve this line number > mapping problem. As far as I know, the JDK up to now does not support > #line directive. >
Hi there, The X10DT just creates SMAP using a simple classfile post-processor that scans source files looking for "#line" directives that the x10 compiler places in the generated Java files. The upside is that the Eclipse Java debugger looks for and handles the SMAP attributes, so that breakpoints and pausing the running program can work. The downside is that, as you said, backtraces don't take the SMAP attributes into account. I haven't yet checked to see what Java 7 may do along these lines, but I'm pretty sure that Java 6 doesn't do anything sensible. I also believe that the Java 6 version of javac doesn't provide for anything like #line source directives. We'd love to see a more complete solution to this issue, but unfortunately it would presumably require some minor (though possibly backward-compatible) VM changes. -- Cheers, -- Bob =================================================== Robert M. Fuhrer, [EMAIL PROTECTED] Programming Technologies Department IBM T. J. Watson Research Center ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ X10-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/x10-users
