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

JDB: dies on most 'dump' and 'print' commands

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1.1
    • 1.1
    • core-svc
    • 1.1.1
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_nt
    • Not verified

      'dump'ing or 'print'ing a class instance or its members causes a fatal
      crash.

      This bug is a generalization and simplification of a part of bug 4024537.
      This customer's information is provided in the customer call section.

      ---------------- test prog -----------------

      class tt {
              public int aa = 11;

              void foo(int yy) {
                      int zz = 55;
                      System.out.println("hello");
              }

              public static void main(String argv[]) {
                      (new tt()).foo(99);
                      System.out.println("goodbye");
              }
      }

      ---------------- test output -----------------

      % jdb tt
      Initializing jdb...
      0xee320980:class(tt)
      > stop in tt.foo
      Breakpoint set in tt.foo
      > run
      run tt

      Breakpoint hit: tt.foo (tt:6)
      main[1] running ...
      main[1] list
      2 public int aa = 11;
      3
      4 void foo(int yy) {
      5 int zz = 55;
      6 => System.out.println("hello");
      7 }
      8
      9 public static void main(String argv[]) {
      10 (new tt()).foo(99);
      main[1] print yy
      yy = 99
      main[1] print zz
      "zz" is not a valid field of (tt)0xee320520
      "zz" is not a valid id or class name.
      main[1] print aa

      The communications channel closed.
      Internal exception:
      java.io.EOFException
              at java.io.DataInputStream.readInt(DataInputStream.java)
              at sun.tools.debug.RemoteAgent.readValue(RemoteAgent.java:256)
              at sun.tools.debug.RemoteAgent.getSlotValue(RemoteAgent.java:815)
              at sun.tools.debug.RemoteField.getValue(RemoteField.java:57)
              at sun.tools.debug.RemoteObject.getFieldValue(RemoteObject.java:97)
              at sun.tools.ttydebug.TTY.print(TTY.java:1072)
              at sun.tools.ttydebug.TTY.print(TTY.java:1033)
              at sun.tools.ttydebug.TTY.executeCommand(TTY.java:1216)
              at sun.tools.ttydebug.TTY.<init>(TTY.java:1359)
              at sun.tools.ttydebug.TTY.main(TTY.java:1436)
      Internal exception: java.io.EOFException
              at java.io.DataInputStream.readUnsignedShort(DataInputStream.java)
              at java.io.DataInputStream.readUTF(DataInputStream.java)
              at java.io.DataInputStream.readUTF(DataInputStream.java)
              at sun.tools.debug.RemoteAgent.getThreadName(RemoteAgent.java:619)
              at sun.tools.debug.RemoteThread.getName(RemoteThread.java:45)
              at sun.tools.ttydebug.TTY.printPrompt(TTY.java:70)
              at sun.tools.ttydebug.TTY.<init>(TTY.java:1344)
              at sun.tools.ttydebug.TTY.main(TTY.java:1436)
      %

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: