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

next does not work properly in jdb

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: vm-legacy
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      jdb, if next is applied, skips next block if there is 'if', 'while' or any other blocks after current line of execution.

      To reproduce:

      public class test {

          static String fnCall(String str) {
              return str;
          }

          public static void main(String[] argv) {
              String atr = fnCall("test this");
              if (atr.indexOf("th") != 0) {
                  System.out.println ("\"th\" is inside the string");
              } else {
                  System.out.println ("\"th\" is not inside the string");
              }
              atr = fnCall("test this");
          }
      }


      Cammands:
      stop in test.main
      next

      Initializing jdb...
      > stop in test.main
      Deferring breakpoint test.main.
      It will be set after the class is loaded.
      > run
      run test
      >
      VM Started: Set deferred breakpoint test.main

      Breakpoint hit: thread="main", test.main(), line=10, bci=0
        10 String atr = fnCall("test this");

      main[1] next
      "th" is inside the string
      main[1]
      The application exited

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

      Moved Brad's additions to wetmore-notes attachement.

        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: