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

JDB tests do not update source path after doing a redefine class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      see test/jdk/com/sun/jdi/RedefineTTYLineNumber.java
      after class redifinition (redefine <class> <.class file>) jdb reports correct line number, but incorrect source:
      ==========================================
      [jdb] main[1]
      > stop in RedefineTTYLineNumberTarg.A
      [jdb] Deferring breakpoint RedefineTTYLineNumberTarg.A.
      [jdb] It will be set after the class is loaded.
      [jdb] main[1]
      > run
      [jdb] > Set deferred breakpoint RedefineTTYLineNumberTarg.A
      [jdb]
      [jdb] Breakpoint hit: "thread=main", RedefineTTYLineNumberTarg.A(), line=50 bci=0
      [jdb] 50 System.out.println("expected statement printed by jdb");
      [jdb]
      [jdb] main[1]
      > redefine RedefineTTYLineNumberTarg .\\ver1\\RedefineTTYLineNumberTarg.class
      [jdb] main[1]
      > pop
      [jdb] main[1]
      > stop in RedefineTTYLineNumberTarg.A
      [jdb] Set breakpoint RedefineTTYLineNumberTarg.A
      [jdb] main[1]
      > cont
      [jdb] >
      [jdb] Breakpoint hit: "thread=main", RedefineTTYLineNumberTarg.A(), line=49 bci=0
      [jdb] 49 public void A() {
      [jdb]
      [jdb] main[1]
      ==========================================

      2nd breakpoint reported:
      [jdb] Breakpoint hit: "thread=main", RedefineTTYLineNumberTarg.A(), line=49 bci=0
      [jdb] 49 public void A() {

      And it should be
      [jdb] Breakpoint hit: "thread=main", RedefineTTYLineNumberTarg.A(), line=49 bci=0
      [jdb] 49 System.out.println("expected statement printed by jdb");

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amenkov Alex Menkov
              Reporter:
              amenkov Alex Menkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: