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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: vm-legacy
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      sol-beta2
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      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");

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: