Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8044798

API for debugging Nashorn

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        In order to prevent from incompatible changes, that would break nashorn debugging, please create debugger API classes, or classify existing classes as debugger API.
        It does not have to be a public API as such, but standardized classes, that will not change in an incompatible way in the future.

        For the debugger, it's much more easy and much faster to access field values, than to invoke method calls. Therefore, it's best in form of fields, where possible.

        For the debugging purposes we use following classes, methods and fields:
        jdk.nashorn.internal.runtime.DebuggerSupport
          and it's methods: "valueInfo()", "valueInfos()", "eval()", "valueAsString()"
        jdk.nashorn.internal.runtime.DebuggerSupport$DebuggerValueDesc
          and it's fields: "key", "expandable", "valueAsObject", "valueAsString"
        jdk.nashorn.internal.runtime.Source
          we rely on that an instance of this class is in "source" static field of every compiled script class
          and it's fields: "name", "hash", "data"
          and fields "array", "url" in classes implementing jdk.nashorn.internal.runtime.Source$Data
        jdk.nashorn.internal.runtime.ScriptFunctionData
          and it's methods: "invoke()", "construct()", "getGenericInvoker()", "getGenericConstructor()"
        java.lang.invoke.MethodHandle
          and it's fields "member", "clazz"
        And we rely on that the compiled scripts are in classes, whose canonical path starts with:
        jdk.nashorn.internal.scripts.Script$

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sundar Sundararajan Athijegannathan
                Reporter:
                mentlich Martin Entlicher
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: