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

SA-JDI: ReferenceType.sourceDebugExtension() throws AbsentInformationException

XMLWordPrintable

    • beta2
    • generic
    • generic
    • Verified



      Name: ipR10196 Date: 02/17/2004


      --------------------------------------
      Test : nsk/sajdi/ReferenceType/sourceDebugExtension/srcdebugx001
      VM : ClientVM, ServerVM
      Mode : all
      Platform : generic
      OS : generic
      JDK : 1.5.0-b38 and earlier
      ----------------------------------------

      This SA-JDI test checks if method ReferenceType.sourceDebugExtension()
      returns proper data recorded for tested class (srcdebugx001x),
      or throws AbsentInformationException if no such data in class file
      (srcdebugx001t).

      Both tested classes srcdebugx001t and srcdebugx001x are precompiled
      with javasoft.sqe.jcoder tool to ensure they have proper attribute
      with source debug extension data.

      Running with lecacy JDI connectors this test passes.
      Running with SA-JDI connectors sourceDebugExtension() throws
      AbsentInformationException for class srcdebugx001x that
      has source debug extension data available.

      This test will be available in the next r27 testbase release.

      To reproduce this failure:
        cd /net/jano.sfbay/export/disk20/GammaBase/Bugs/<this bug number>
        sh build.sh $JAVA_HOME
        sh run.sh [-pid | -core | -socket] [-g] [-v] $JAVA_HOME [JAVA_OPTS]
      where:
          -pid - run test with SA-JDI pid attaching connector (default)
          -core - run test with SA-JDI core attaching connector
          -socket - run test with JDI socket attaching connector
          -g - run test with java_g binaries
          -v - run test in verbose mode

      Here is fragment of the test output for SA-JDI connector:
      ------------------------------------------------------------------
      script> Run debugger: nsk/sajdi/ReferenceType/sourceDebugExtension/srcdebugx001
      binder> Find attaching connector: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      binder> name: com.sun.jdi.SocketAttach
      binder> name: sun.jvm.hotspot.jdi.SACoreAttachingConnector
      binder> name: sun.jvm.hotspot.jdi.SADebugServerAttachingConnector
      binder> name: sun.jvm.hotspot.jdi.SAPIDAttachingConnector
      binder> Connector found: sun.jvm.hotspot.jdi.SAPIDAttachingConnector (defaults:
      pid=)
      binder> Attaching connector arguments:
      binder> pid: 1569
      binder> Attach to target VM
      binder> Target VM attached
      binder> Target VM info:
      binder> name: JVM version 1.5.0-beta2 (Java HotSpot(TM) Client VM, mixed
      mode)
      binder> version: 1.5.0-beta2

      Check capability canGetSourceDebugExtension():
          got: true

      Find class with NO source debug extension:
              nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001t
          got: class nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001t
               (loaded by instance of sun.misc.Launcher$AppClassLoader(id=0))
      Invoke sourceDebugExtension():
          got expected exception: com.sun.jdi.AbsentInformationException

      Find class with source debug extension data:
              nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001x
          got: class nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001x
              (loaded by instance of sun.misc.Launcher$AppClassLoader(id=0))
      Invoke sourceDebugExtension():
      com.sun.jdi.AbsentInformationException
              at
      sun.jvm.hotspot.jdi.ReferenceTypeImpl.sourceDebugExtension(ReferenceTypeImpl.java:657)
              at
      nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001.runIt(srcdebugx001.java:103)
              at
      nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001.run(srcdebugx001.java:26)
              at
      nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001.main(srcdebugx001.java:21)
      # ERROR: sourceDebugExtension() throws AbsentInformationException:
      # ERROR: class name:
      nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001x
      # ERROR: exception: com.sun.jdi.AbsentInformationException

      Dispose target VM
        ... VM disposed
      ------------------------------------------------------------------

      Here is fragment of the test output for legacy JDI connector:
      ------------------------------------------------------------------
      script> Run debugger: nsk/sajdi/ReferenceType/sourceDebugExtension/srcdebugx001
      binder> Find attaching connector: com.sun.jdi.SocketAttach
      binder> name: com.sun.jdi.SocketAttach
      binder> Connector found: com.sun.jdi.SocketAttach (defaults: address=, timeout=,
      hostname=novo153, port=)
      binder> Attaching connector arguments:
      binder> address:
      binder> timeout:
      binder> hostname: novo153
      binder> port: 8000
      binder> Attach to target VM
      binder> Target VM attached
      binder> Target VM info:
      binder> name: Java HotSpot(TM) Client VM
      binder> version: 1.5.0-beta2

      Check capability canGetSourceDebugExtension():
          got: true

      Find class with NO source debug extension:
              nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001t
          got: class nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001t
               (loaded by instance of sun.misc.Launcher$AppClassLoader(id=3))
      Invoke sourceDebugExtension():
          got expected exception: com.sun.jdi.AbsentInformationException

      Find class with source debug extension data:
              nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001x
          got: class nsk.sajdi.ReferenceType.sourceDebugExtension.srcdebugx001x
               (loaded by instance of sun.misc.Launcher$AppClassLoader(id=3))
      Invoke sourceDebugExtension():
          got data: Hello world!

      Dispose target VM
        ... VM disposed
      ------------------------------------------------------------------

      ======================================================================

            sundar Sundararajan Athijegannathan
            popovsunw Popov Popov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: