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

Can't call methods at all from jdb - not even this.toString()

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      rc1
    • CPU:
      generic, x86, sparc
    • OS:
      solaris_7, windows_2000
    • Verification:
      Verified

      Description

      I can't call any methods on local variables. I can't even call
      toString(), which make it extremely difficult to debug programs.

      To reproduce, see below. The VM seems to hang at the end of this session.

      ~ is /home/gafter.

      frog:~/workspaces/test/jdbnontop $ ls -la
      total 4
      drwxr-xr-x 2 gafter 512 Oct 8 09:25 .
      drwxr-xr-x 63 gafter 1536 Oct 8 09:16 ..
      -rw-r--r-- 1 gafter 0 Oct 8 09:21 .jdbrc
      -rw-r--r-- 1 gafter 303 Oct 8 09:19 T.java
      frog:~/workspaces/test/jdbnontop $ cat -n T.java
           1 class T {
           2 String s;
           3 void f() {
           4 new T("f").g();
           5 }
           6 void g() {
           7 new T("g").h();
           8 }
           9 void h() {
          10 System.out.println(s);
          11 }
          12 public static void main(String[] args) {
          13 new T("main").f();
          14 }
          15 T(String s) {
          16 this.s = s;
          17 }
          18 public String toString() {
          19 return s;
          20 }
          21 }
      frog:~/workspaces/test/jdbnontop $ /java/re/j2se/1.4.0/nightly/binaries/solsparc/latest/bin/javac -g T.java
      frog:~/workspaces/test/jdbnontop $ /java/re/j2se/1.4.0/nightly/binaries/solsparc/latest/bin/jdb T
      Initializing jdb ...
      *** Reading commands from /home/gafter/workspaces/test/jdbnontop/.jdbrc
      > stop at T:10
      Deferring breakpoint T:10.
      It will be set after the class is loaded.
      > run
      run T
      >
      VM Started: Set deferred breakpoint T:10
       
      Breakpoint hit: "thread=main", T.h(), line=10 bci=0
      10 System.out.println(s);
       
      main[1] print this
       this = instance of T(id=281)
      main[1] print this.toString()


      ###@###.### 2001-10-08

      ///////////////////////////
      ###@###.### 2001-10-18

      Name: as83306 Date: 10/17/2001

      Regression test com/sun/jdi/InvokeTest.java fails with Merlin build 83 on sol2.7, host tiggr.
      Since this test doesn't have it own specified timeout, it timed out with the default 2 minute timeout invoked by jtreg.
       For test hardware config's, see http://sqesvr.eng/st3/jdk1.4/docs/Merlin-hw.html
       
      #Test Results (version 2)
      #Sun Oct 14 01:48:28 PDT 2001
      #checksum:5c515f493742bce3
      #-----testdescription-----
      $file=/export1/regression/merlin/jdk1.4Tests/b83/com/sun/jdi/InvokeTest.java
      $root=/export1/regression/merlin/jdk1.4Tests/b83
      author=Robert Field
      keywords=bug4451941
      run=USER_SPECIFIED build TestScaffold VMConnection TargetListener TargetAdapter\nUSER_SPECIFIED compile -g
      InvokeTest.java\nUSER_SPECIFIED main InvokeTest\n
      source=InvokeTest.java
      title=Test argument types for invoke

      #-----environment-----

      #-----testresult-----
      description=file:///export1/regression/merlin/jdk1.4Tests/b83/com/sun/jdi/InvokeTest.java
      end=Sun Oct 14 01:48:28 PDT 2001
      environment=regtest
      execStatus=Failed. Execution failed: Program `/export1/java/jdk14b83/bin/java' interrupted! (timed out?)
      javatestOS=SunOS 5.7 (sparc)
      javatestVersion=2.1.5
      script=com.sun.javatest.regtest.RegressionScript
      sections=script_messages build compile build main
      start=Sun Oct 14 01:46:25 PDT 2001
      status=Failed. Execution failed: Program `/export1/java/jdk14b83/bin/java' interrupted! (timed out?)
      test=com/sun/jdi/InvokeTest.java
      work=/export0/results/regression/merlin/b83/tiggr5.7-jth13-jdk14b83.10-13.22.45-ALL/com/sun/jdi

      #section:script_messages
      ----------messages:(2/77)----------
      JDK under test: /export1/java/jdk14b83
      Timeout signalled after 120.0 seconds

      #section:build
      ----------messages:(3/158)----------
      command: build TargetAdapter
      reason: User specified action: run build TestScaffold VMConnection TargetListener TargetAdapter
      elapsed time (seconds): 0.0030
      result: Passed. No need to compile: TargetAdapter.java

      #section:compile
      ----------messages:(3/182)----------
      command: compile /export1/regression/merlin/jdk1.4Tests/b83/com/sun/jdi/InvokeTest.java
      reason: User specified action: run compile -g InvokeTest.java
      elapsed time (seconds): 3.085
      ----------System.out:(0/0)----------
      ----------System.err:(0/0)----------
      result: Passed. Compilation successful

      #section:build
      ----------messages:(3/97)----------
      command: build InvokeTest
      reason: Named class compiled on demand
      elapsed time (seconds): 0.0010
      result: Passed. No need to compile: InvokeTest.java

      #section:main
      ----------messages:(3/109)----------
      command: main InvokeTest
      reason: User specified action: run main InvokeTest
      elapsed time (seconds): 120.013
      ----------System.out:(7/293)----------
      JVM version:1.4.0-beta3
      JDI version: 1.4
      JVM description: Java Debug Interface (Reference Implementation) version 1.4
      Java Debug Wire Protocol (Reference Implementation) version 1.4
      JVM Debug Interface version 1.2
      JVM version 1.4.0-beta3 (Java HotSpot(TM) Client VM, interpreted mode)
      Howdy!
      ----------System.err:(2/46)----------
      run args: [InvokeTarg]
      Invoking invokeBoolean
      result: Failed. Execution failed: Program `/export1/java/jdk14b83/bin/java' interrupted! (timed out?)


      test result: Failed. Execution failed: Program `/export1/java/jdk14b83/bin/java' interrupted! (timed out?)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tbell Tim Bell
              Reporter:
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: