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

STD: sun.tools.debug will not be impl by HotSpot (appears broken) - Remove it!

XMLWordPrintable

    • beta
    • generic, x86, sparc
    • generic, linux, solaris_8
    • Verified

      The HotSpot VM does not implement sun.tools.debug (STD).
      An attempt to use it generates an "InternalError" (see below).
      Either 1) Code must be removed; or 2) Must be visibly documented.

      -Robert

      algol% cat test.java
      import sun.tools.debug.RemoteDebugger;
      import java.io.File;
      class test {
              public static void main(String[] args) throws Exception {
                      String javaOpts = "-Xbootclasspath/a:"+
                              System.getProperty("java.home")+File.separator+
                                      "../lib/tools.jar";
                      RemoteDebugger d = new RemoteDebugger(javaOpts,null,true);
                      d.close();
              }
      }


      algol% uname -a
      SunOS algol 5.8 Generic sun4u sparc SUNW,Ultra-2
      algol% /usr/java1.2/bin/java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-beta)
      Java HotSpot(TM) Client VM (build 1.3-beta, mixed mode)
      algol% /usr/java1.2/bin/javac -d . test.java
      algol% /usr/java1.2/bin/java test
      [debugger: starting child: /usr/java1.2/jre/bin/java -classic -Xdebug -Djava.compiler=NONE -Xbootclasspath/a:/usr/java1.2/jre/../lib/tools.jar sun.tools.agent.EmptyApp]
      [Internal debugger error: Failed to exec a child java interpreter with this command line: /usr/java1.2/jre/bin/java -classic -Xdebug -Djava.compiler=NONE -Xbootclasspath/a:/usr/java1.2/jre/../lib/tools.jar sun.tools.agent.EmptyApp]
      Exception in thread "main" java.lang.InternalError
              at sun.tools.debug.RemoteAgent.error(RemoteAgent.java:1427)
              at sun.tools.debug.RemoteAgent.<init>(RemoteAgent.java:261)
              at sun.tools.debug.RemoteDebugger.<init>(RemoteDebugger.java:59)
              at test.main(test.java:8)

      allan.jacobs@Eng 2000-05-25

      27 regression tests are failing. They are:

      kestrel_regression/test/sun/tools/debug/AccessLocalInHighSlot.java jtreg AccessLocalInHighSlot
      kestrel_regression/test/sun/tools/debug/AccessStaticFields.java jtreg AccessStaticFields
      kestrel_regression/test/sun/tools/debug/AllowClassObjectGC.java jtreg AllowClassObjectGC
      kestrel_regression/test/sun/tools/debug/ArrayAsObject.java jtreg ArrayAsObject
      kestrel_regression/test/sun/tools/debug/ArrayTest.java jtreg ArrayTest
      kestrel_regression/test/sun/tools/debug/BreakStatus.java jtreg BreakStatus
      kestrel_regression/test/sun/tools/debug/CallStackLength.java jtreg CallStackLength
      kestrel_regression/test/sun/tools/debug/ClassLoad.java jtreg ClassLoad
      kestrel_regression/test/sun/tools/debug/Fields.java jtreg Fields
      kestrel_regression/test/sun/tools/debug/GC.java jtreg GC
      kestrel_regression/test/sun/tools/debug/GetMethodLineNumber.java jtreg GetMethodLineNumber
      kestrel_regression/test/sun/tools/debug/LongName.java jtreg LongName
      kestrel_regression/test/sun/tools/debug/ManyThreadsAndGroups.java jtreg ManyThreadsAndGroups
      kestrel_regression/test/sun/tools/debug/PassBreakOnInvokeStatic.java jtreg PassBreakOnInvokeStatic
      kestrel_regression/test/sun/tools/debug/PrintInheritedMembers.java jtreg PrintInheritedMembers
      kestrel_regression/test/sun/tools/debug/RemoteArrayTest.java jtreg RemoteArrayTest
      kestrel_regression/test/sun/tools/debug/RemoteClassTest.java jtreg RemoteClassTest
      kestrel_regression/test/sun/tools/debug/RemoteClassTest02.java jtreg RemoteClassTest02
      kestrel_regression/test/sun/tools/debug/RemoteDebuggerTest.java jtreg RemoteDebuggerTest
      kestrel_regression/test/sun/tools/debug/RemoteStackFrameTest.java jtreg RemoteStackFrameTest
      kestrel_regression/test/sun/tools/debug/RemoteStackVariableTest.java jtreg RemoteStackVariableTest
      kestrel_regression/test/sun/tools/debug/RemoteThreadTest.java jtreg RemoteThreadTest
      kestrel_regression/test/sun/tools/debug/SetFieldTest.java jtreg SetFieldTest
      kestrel_regression/test/sun/tools/debug/StepOverDoubleException.java jtreg StepOverDoubleException
      kestrel_regression/test/sun/tools/debug/StepPastReturnToNative.java jtreg StepPastReturnToNative
      kestrel_regression/test/sun/tools/debug/StepUp.java jtreg StepUp
      kestrel_regression/test/sun/tools/debug/ThreadDeathEvent.java jtreg ThreadDeathEvent

      allan.jacobs@Eng 2000-05-25

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

      al.smith@eng 2001-03-02

      These tests are still failing in Ladybird build 18 and Merlin build 54. As I understand it, the debug code has been removed from the Solaris products. If this is the case, these tests should be modified so they don't run on Solaris. To exit rc, there has to be zero regression failures in Ladybird.

      begin - robert.field@Eng 2001-03-02
      Of course they are still failing! They will never ever work again.
      Sun.tools.debug only works under the Classic VM. There is no Classic VM
      on Solaris in 1.3 and Ladybird. As of Merlin, Classic VM will not be
      part of any system we ship and thus sun.tools.debug will never run again.
      There is exactly one solution - for Ladybird, do not run sun.tools.debug
      tests on Solaris, for Merlin you MUST remove all sun.tools.debug tests.
      end - robert.field@Eng 2001-03-02

            tbell Tim Bell
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: