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

jdb: it needs to call 'step' twice to step from brkpoint in main

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.0
    • 1.3.0
    • vm-legacy
    • sol-beta2
    • generic
    • generic
    • Not verified

      User needs to call 'step' twice to move from brkpoint
      when stopped at the brkpoint in the main after 'run'.

      To reproduce:

      class Class {

          public static void main(String args[]) {
              System.out.println("Start");
              System.out.println("Print");
              System.out.println("End");
          }
      }

      jdb:

      stop in Class.main
      run
      step

      Result:
      Initializing jdb...
      > stop in Class.main
      Deferring breakpoint Class.main.
      It will be set after the class is loaded.
      > run
      run Class
      Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
      >
      VM Started: Set deferred breakpoint Class.main

      Breakpoint hit: thread="main", Class.main(), line=4, bci=0
        4 System.out.println("Start");

      main[1] step
      main[1]
      Breakpoint hit: thread="main", Class.main(), line=4, bci=0 <<< This line
        4 System.out.println("Start"); <<< reported twice

      main[1] step
      main[1] Start

      Step completed: thread="main", Class.main(), line=5, bci=8
        5 System.out.println("Print");

      main[1] step
      main[1] Print

      Step completed: thread="main", Class.main(), line=6, bci=16
        6 System.out.println("End");

            dcubed Daniel Daugherty
            avolkovorcl Alexei Volkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: