Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2049340 | 1.4.1 | Tim Bell | P4 | Resolved | Fixed | hopper |
From: Hin Boen <###@###.###>
To: ###@###.###
Cc: Helen Bershadskaya <###@###.###>
Subject: HotSwap
Date: Sun, 25 Nov 2001 22:54:14 -0800
Hi JPDA-Team,
I found a bug related to HotSwap in JDK1.4 version 1.4.0-rc-b85, mixed
mode.
ReferenceType.allLineLocations() does not return new line locations for
the redefined class. Because of this problem, I will
a. Show incorrect executable lines.
b. Get java.lang.InternalError: Location with invalid code index
This problem is reproducible with jdb.exe.
Steps to reproduce this problem:
a. run the sample program below with jdb.exe
b. add line breakpoint (see sample program)
c. when the breakpoint is hit, add System.out.println("added new
line") to method B(). Make sure this line is added before
System.out.println("in B, back to A");
d. redefine untitled7.Untitled4
e. up
f. pop
g. step
h. keep on stepping, eventually when the VM executes the last line in
the method B(), you will get the java.lang.InternalError: Location with
invalid code index.
Thanks
Hin
java.lang.InternalError from jdb.exe:
Step completed: java.lang.InternalError: Location with invalid code
index
at
com.sun.tools.jdi.ConcreteMethodImpl.codeIndexToLineInfo(ConcreteMeth
odImpl.java:166)
at
com.sun.tools.jdi.LocationImpl.getBaseLineInfo(LocationImpl.java:111)
at
com.sun.tools.jdi.LocationImpl.getLineInfo(LocationImpl.java:125)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:202)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:198)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:194)
at
com.sun.tools.example.debug.tty.Commands.locationString(Commands.java
:954)
at
com.sun.tools.example.debug.tty.TTY.printCurrentLocation(TTY.java:176
)
at
com.sun.tools.example.debug.tty.TTY.vmInterrupted(TTY.java:150)
at
com.sun.tools.example.debug.tty.EventHandler.run(EventHandler.java:89
)
at java.lang.Thread.run(Thread.java:539)
Sample program:
package untitled7;
public class Untitled4 {
public void B() {
System.out.println("in B");
System.out.println("in B, back to A"); // add line breakpoint
here!!
}
public void A() {
System.out.println("in A, about to call B");
B();
System.out.println("out from B");
}
public static void main(String[] args) {
Untitled4 untitled41 = new Untitled4();
untitled41.A();
System.out.println("done");
}
}
To: ###@###.###
Cc: Helen Bershadskaya <###@###.###>
Subject: HotSwap
Date: Sun, 25 Nov 2001 22:54:14 -0800
Hi JPDA-Team,
I found a bug related to HotSwap in JDK1.4 version 1.4.0-rc-b85, mixed
mode.
ReferenceType.allLineLocations() does not return new line locations for
the redefined class. Because of this problem, I will
a. Show incorrect executable lines.
b. Get java.lang.InternalError: Location with invalid code index
This problem is reproducible with jdb.exe.
Steps to reproduce this problem:
a. run the sample program below with jdb.exe
b. add line breakpoint (see sample program)
c. when the breakpoint is hit, add System.out.println("added new
line") to method B(). Make sure this line is added before
System.out.println("in B, back to A");
d. redefine untitled7.Untitled4
e. up
f. pop
g. step
h. keep on stepping, eventually when the VM executes the last line in
the method B(), you will get the java.lang.InternalError: Location with
invalid code index.
Thanks
Hin
java.lang.InternalError from jdb.exe:
Step completed: java.lang.InternalError: Location with invalid code
index
at
com.sun.tools.jdi.ConcreteMethodImpl.codeIndexToLineInfo(ConcreteMeth
odImpl.java:166)
at
com.sun.tools.jdi.LocationImpl.getBaseLineInfo(LocationImpl.java:111)
at
com.sun.tools.jdi.LocationImpl.getLineInfo(LocationImpl.java:125)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:202)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:198)
at
com.sun.tools.jdi.LocationImpl.lineNumber(LocationImpl.java:194)
at
com.sun.tools.example.debug.tty.Commands.locationString(Commands.java
:954)
at
com.sun.tools.example.debug.tty.TTY.printCurrentLocation(TTY.java:176
)
at
com.sun.tools.example.debug.tty.TTY.vmInterrupted(TTY.java:150)
at
com.sun.tools.example.debug.tty.EventHandler.run(EventHandler.java:89
)
at java.lang.Thread.run(Thread.java:539)
Sample program:
package untitled7;
public class Untitled4 {
public void B() {
System.out.println("in B");
System.out.println("in B, back to A"); // add line breakpoint
here!!
}
public void A() {
System.out.println("in A, about to call B");
B();
System.out.println("out from B");
}
public static void main(String[] args) {
Untitled4 untitled41 = new Untitled4();
untitled41.A();
System.out.println("done");
}
}
- backported by
-
JDK-2049340 Line numbers aren't updated after a redefineClasses
-
- Resolved
-