import java.lang.System;
class myclass {
public static void main(String argv[]) { // line 4
System.out.println("hello"); // line 5
}
}
iwww% javac -g myclass.java
iwww% jdb myclass
Initializing jdb...
0xee70cf18:class(myclass)
stop at myclass:5
> Breakpoint set at myclass:5
run
> run myclass
Breakpoint hit: running ...
myclass.main (myclass:5)
main[1] main[1] next // *
main[1]
Breakpoint hit: myclass.main (myclass:5) // *
main[1] clear myclass:5 // **
Breakpoint cleared at myclass: 5
main[1] next // ***
hello
Breakpoint hit: main[1] myclass.main (myclass:4) // ***
main[1] quit
-------------------------------------------------------
The lines marked *** show that the program first hits the
breakpoint at line 5, then after "next" hits one that it
says is at line 4. This is out of order. This bug was
in JDK 1.0.2 and is still in 1.1.
class myclass {
public static void main(String argv[]) { // line 4
System.out.println("hello"); // line 5
}
}
iwww% javac -g myclass.java
iwww% jdb myclass
Initializing jdb...
0xee70cf18:class(myclass)
stop at myclass:5
> Breakpoint set at myclass:5
run
> run myclass
Breakpoint hit: running ...
myclass.main (myclass:5)
main[1] main[1] next // *
main[1]
Breakpoint hit: myclass.main (myclass:5) // *
main[1] clear myclass:5 // **
Breakpoint cleared at myclass: 5
main[1] next // ***
hello
Breakpoint hit: main[1] myclass.main (myclass:4) // ***
main[1] quit
-------------------------------------------------------
The lines marked *** show that the program first hits the
breakpoint at line 5, then after "next" hits one that it
says is at line 4. This is out of order. This bug was
in JDK 1.0.2 and is still in 1.1.
- duplicates
-
JDK-4026577 line numbers for first lines of functions are wrong
-
- Closed
-