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

TTY: run on expression evaluation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.2
    • 1.4.2
    • core-svc
    • b20
    • generic
    • generic



        Name: tb29552 Date: 04/04/2003


        % cat -n HelloWorld.java
             1 public class HelloWorld {
             2 public static void main(String args[]) {
             3 StringBuffer sb = new StringBuffer();
             4 sb.append("Hello");
             5 System.out.println(sb.toString());
             6 }
             7 }

        % javac -g HelloWorld.java
        % jdb HelloWorld
        Initializing jdb ...
        > stop at HelloWorld:5
        Deferring breakpoint HelloWorld:5.
        It will be set after the class is loaded.
        > run
        run HelloWorld
        Set uncaught java.lang.Throwable
        Set deferred uncaught java.lang.Throwable
        >
        VM Started: Set deferred breakpoint HelloWorld:5

        Breakpoint hit: "thread=main", HelloWorld.main(), line=5 bci=15
        5 System.out.println(sb.toString());

        main[1] eval sb.toString()
         sb.toString() = "Hello"
        main[1] eval sb.append(" world")
         sb.append(" world") = "Hello world world world"
        main[1] eval sb.toString()
         sb.toString() = "Hello world world world"
        main[1] eval sb.append(" world")
         sb.append(" world") = "Hello world world world world world world"
        main[1] cont
        Hello world world world world world world
        >

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

              jjh James Holmlund (Inactive)
              tbell Tim Bell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: