Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-363

lineNumber table has all 0 instead of correct offsets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-5
    • 1.0-beta-8
    • class generator
    • None

    Description

      LineNumber table in generated class file has all line offsets to 0.
      Which makes groovy classes imposible to use in any debugger.

      Looking on ClassGenerator.java I see following method

      protected void onLineNumber(ASTNode statement) {
      int number = statement.getLineNumber();
      if (number >= 0 && cv != null)

      { cv.visitLineNumber(number, new Label()); }

      }

      it creates a Label but this label remains unresolved.
      I think it was intended to be something like this

      protected void onLineNumber(ASTNode statement) {
      int number = statement.getLineNumber();
      if (number >= 0 && cv != null)

      { Label l = new Label(); cv.visitLabel(l); cv.visitLineNumber(number, l); }

      }

      could you please put it in the CVS.

      Attachments

        Activity

          People

            jstrachan James Strachan
            blib Boris Bliznioukov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified