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

jdb stops inside function when next is called

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: