Name: ssC76496 Date: 07/23/99
This is a regression failure in getting all the executable lines from a method in JDK 1.3 J build in
Java Platform Debugger.
This can be reproduced with the example in JPDA build 1.0 fcs.
This doesnt happen in JDK-1.3-L.
The output from both the JDK 1.3-J and JDK 1.3-L is shown below.
Steps to reproduce
----------------
1. Copy the java file attached. Test.java.
2. Set path to JDK 1.3-L (or 1.3.J)
3. Set path to bin directory of JPDA build.
4. Set lib to bin directory of JPDA build.
5. Compile the attached .java file.
javac -g Test.java
6. jdb Test
7. Follow the commands in jdb prompt.
stop at Test:7
run
lines Test entryMethod
exit
When the same steps followed in JDK1.3J the .
C:\sha>javac -g Test.java
C:\sha>jdb Test
Initializing jdb...
> stop at Test:7
Deferring breakpoint Test:7.
It will be set after the class is loaded.
> run
run Test
>
VM Started: Set deferred breakpoint request Test:7
Breakpoint hit: thread="main", Test.main(), line=7, bci=0
7 for(l_counter = 0; l_counter < 10; l_counter ++)
main[1] lines Test entryMethod
Test:16
Test:17
Test:18
Test:19
Test:20
Test:21
Test:22
main[1]
C:\sha>java -version
java version "1.3"
Classic VM (build JDK-1.3-L, native threads, nojit)
---------------------------------------------------------------
C:\sha>javac -g Test.java
C:\sha>jdb Test
Initializing jdb...
> stop at Test:7
Deferring breakpoint Test:7.
It will be set after the class is loaded.
> run
run Test
>
VM Started: Set deferred breakpoint request Test:7
Breakpoint hit: thread="main", Test.main(), line=7, bci=0
7 for(l_counter = 0; l_counter < 10; l_counter ++)
main[1] lines Test entryMethod
Test:16
Test:17
Test:18
Test:19
Test:20
Test:21
main[1]
C:\sha>java -version
java version "1.3"
Classic VM (build JDK-1.3-J, native threads, symcjit)
Test.java
----------
class Test
{
public static void main(String args[])
{
int l_counter;
for(l_counter = 0; l_counter < 10; l_counter ++)
{
System.out.println("Hi there");
}
entryMethod();
System.out.println("Bye there!");
}
public static void entryMethod()
{
System.out.println(" method entry in Method1");
int a = 0;
a += 5;
int b= a;
a = b+1;
System.out.println(" method entry in Method11");
}
}
-------------------------------------------------------
======================================================================
- relates to
-
JDK-4026577 line numbers for first lines of functions are wrong
-
- Closed
-
-
JDK-4238641 Implicit return on void methods not assigned line number
-
- Closed
-