User needs to call 'step' twice to move from brkpoint
when stopped at the brkpoint in the main after 'run'.
To reproduce:
class Class {
public static void main(String args[]) {
System.out.println("Start");
System.out.println("Print");
System.out.println("End");
}
}
jdb:
stop in Class.main
run
step
Result:
Initializing jdb...
> stop in Class.main
Deferring breakpoint Class.main.
It will be set after the class is loaded.
> run
run Class
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint Class.main
Breakpoint hit: thread="main", Class.main(), line=4, bci=0
4 System.out.println("Start");
main[1] step
main[1]
Breakpoint hit: thread="main", Class.main(), line=4, bci=0 <<< This line
4 System.out.println("Start"); <<< reported twice
main[1] step
main[1] Start
Step completed: thread="main", Class.main(), line=5, bci=8
5 System.out.println("Print");
main[1] step
main[1] Print
Step completed: thread="main", Class.main(), line=6, bci=16
6 System.out.println("End");
when stopped at the brkpoint in the main after 'run'.
To reproduce:
class Class {
public static void main(String args[]) {
System.out.println("Start");
System.out.println("Print");
System.out.println("End");
}
}
jdb:
stop in Class.main
run
step
Result:
Initializing jdb...
> stop in Class.main
Deferring breakpoint Class.main.
It will be set after the class is loaded.
> run
run Class
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint Class.main
Breakpoint hit: thread="main", Class.main(), line=4, bci=0
4 System.out.println("Start");
main[1] step
main[1]
Breakpoint hit: thread="main", Class.main(), line=4, bci=0 <<< This line
4 System.out.println("Start"); <<< reported twice
main[1] step
main[1] Start
Step completed: thread="main", Class.main(), line=5, bci=8
5 System.out.println("Print");
main[1] step
main[1] Print
Step completed: thread="main", Class.main(), line=6, bci=16
6 System.out.println("End");
- relates to
-
JDK-4890957 VM resumes on request to step-over in NPE location
- Resolved
-
JDK-4278333 Regression test com/sun/jdi/StepTest.java Failing
- Closed
-
JDK-4337667 crash (sig 11) on second invocation of a breakpoint
- Closed