JDK-4972961 : Use SourceDebugExtension in stack traces
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2003-12-26
  • Updated: 2009-06-02

Name: tb29552			Date: 12/26/2003

It would be useful if java.lang.Throwable printStackTrace() and fillInStackTrace()
used the extra information provided by SourceDebugExtension [NOTE 1] if that
information is available.

A user writes:

  I'm investigating using SourceDebugExtension for compiling a non-java language,
  Nice: http://nice.sf.net. So far the results are promising, in that jdb reports
  files and line numbers as encoded in the SMAP my compiler generates. So far, so

  However, if a stack trace is generated, I think the jvm should also try to use
  the info in SourceDebugExtension for the default stratum if available, to report
  the line numbers of the stack locations. I found that it does not. Is there a
  plan to implement this in a future version of the JDK? Should I open a bug
  report in the bug database about this?

[NOTE 1] as implemented in JSR 45 "Debugging Support for Other Languages"


WORK AROUND Name: tb29552 Date: 12/26/2003 Call java.lang.throwable.getStackTrace() and post-process the results to reflect SourceDebugExtension ======================================================================

PUBLIC COMMENTS Name: tb29552 Date: 12/26/2003 . ======================================================================

EVALUATION This would require a VM change; in fact, it's solely a VM change. It is not clear whether it's worth doing. ###@###.### 2004-01-07