Problem with native stack entries
According to
http://java.sun.com/products/jpda/doc/jdi/com/sun/jdi/Location.html
native methods should be flagged with a code index of -1 (and line
number -1). With the Sun 1.3 RC3, we are seeing them with a code
index of 0 (and line number -1).
run 'java ptr1441' to see the problem
% java -version
java version "1.4.0"
% \rm *.class
% javac -g ptr1441.java
% java ptr1441
Action: Launching: JavaExprTest
Event: VMStartEvent in thread main
Event: ###@###.###lassLoader$1.run()+72 in thread main
Thread count : 4
Thread : name(Signal Dispatcher), grp(system), stat(running), susp(1)
Stack count for thread Signal Dispatcher : 0
Thread : name(Finalizer), grp(system), stat(wait), susp(1)
Stack count for thread Finalizer : 4
0: ci(-1), line(-1), class(java.lang.Object), mthd(wait)
1: ci(48), line(111), class(java.lang.ref.ReferenceQueue), mthd(remove)
2: ci(2), line(126), class(java.lang.ref.ReferenceQueue), mthd(remove)
3: ci(6), line(162), class(java.lang.ref.Finalizer$FinalizerThread), mthd(run)
Thread : name(Reference Handler), grp(system), stat(wait), susp(1)
Stack count for thread Reference Handler : 3
0: ci(-1), line(-1), class(java.lang.Object), mthd(wait)
1: ci(2), line(420), class(java.lang.Object), mthd(wait)
2: ci(49), line(110), class(java.lang.ref.Reference$ReferenceHandler), mthd(run)
Thread : name(main), grp(main), stat(running), susp(1)
Stack count for thread main : 7
0: ci(72), line(200), class(java.net.URLClassLoader$1), mthd(run)
1: ci(-1), line(-1), class(java.security.AccessController), mthd(doPrivileged)
2: ci(13), line(188), class(java.net.URLClassLoader), mthd(findClass)
3: ci(43), line(297), class(java.lang.ClassLoader), mthd(loadClass)
4: ci(36), line(286), class(sun.misc.Launcher$AppClassLoader), mthd(loadClass)
5: ci(3), line(253), class(java.lang.ClassLoader), mthd(loadClass)
6: ci(2), line(313), class(java.lang.ClassLoader), mthd(loadClassInternal)
Action: Quit
According to
http://java.sun.com/products/jpda/doc/jdi/com/sun/jdi/Location.html
native methods should be flagged with a code index of -1 (and line
number -1). With the Sun 1.3 RC3, we are seeing them with a code
index of 0 (and line number -1).
run 'java ptr1441' to see the problem
% java -version
java version "1.4.0"
% \rm *.class
% javac -g ptr1441.java
% java ptr1441
Action: Launching: JavaExprTest
Event: VMStartEvent in thread main
Event: ###@###.###lassLoader$1.run()+72 in thread main
Thread count : 4
Thread : name(Signal Dispatcher), grp(system), stat(running), susp(1)
Stack count for thread Signal Dispatcher : 0
Thread : name(Finalizer), grp(system), stat(wait), susp(1)
Stack count for thread Finalizer : 4
0: ci(-1), line(-1), class(java.lang.Object), mthd(wait)
1: ci(48), line(111), class(java.lang.ref.ReferenceQueue), mthd(remove)
2: ci(2), line(126), class(java.lang.ref.ReferenceQueue), mthd(remove)
3: ci(6), line(162), class(java.lang.ref.Finalizer$FinalizerThread), mthd(run)
Thread : name(Reference Handler), grp(system), stat(wait), susp(1)
Stack count for thread Reference Handler : 3
0: ci(-1), line(-1), class(java.lang.Object), mthd(wait)
1: ci(2), line(420), class(java.lang.Object), mthd(wait)
2: ci(49), line(110), class(java.lang.ref.Reference$ReferenceHandler), mthd(run)
Thread : name(main), grp(main), stat(running), susp(1)
Stack count for thread main : 7
0: ci(72), line(200), class(java.net.URLClassLoader$1), mthd(run)
1: ci(-1), line(-1), class(java.security.AccessController), mthd(doPrivileged)
2: ci(13), line(188), class(java.net.URLClassLoader), mthd(findClass)
3: ci(43), line(297), class(java.lang.ClassLoader), mthd(loadClass)
4: ci(36), line(286), class(sun.misc.Launcher$AppClassLoader), mthd(loadClass)
5: ci(3), line(253), class(java.lang.ClassLoader), mthd(loadClass)
6: ci(2), line(313), class(java.lang.ClassLoader), mthd(loadClassInternal)
Action: Quit
- duplicates
-
JDK-4252790 JDI: spec is inconsistent in handling of Location of native methods
-
- Closed
-
- relates to
-
JDK-4325270 JDI: Location.codeIndex() for native method does not return -1.
-
- Closed
-
-
JDK-4359312 jdi: LocalVariable.type().signature() on array type: ClassNotLoadedException
-
- Closed
-