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

jdb stops inside function when next is called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.3.0
    • core-svc
    • generic
    • generic

      jdb should step OVER calls in current line when next is applied.
      Currently, if there is a breakpoint inside the function that we are about to step
      OVER with 'next', then jdb stops at the that brkpoint, but it should not.

      class Class {
          String clsName;
          private int callsNum;

          Class(String _str) {
              clsName = _str;
              callsNum = 0;
          }
          
          public int CallClass(int _iter) {
              for (int i = 0;i < _iter;i++) {
                  int value = StepInMethod(0);
                  System.out.println("StepInMethod return: " + value);
                  System.out.println("Next done.");
              }
              return 0;
          }
          private int StepInMethod(int callsNum) {
              if (callsNum < 100) {
                  return StepInMethod(++callsNum);
              } else {
                  return callsNum;
              }
          }

          public static void main(String args[]) {
              Class cl = new Class("New Class");
              cl.CallClass(10);
          }
      }


      Steps:

      stop at Class:12
      stop at Class:19
      run Class
      next

            Unassigned Unassigned
            avolkovorcl Alexei Volkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: