JDK-4359298 : exceptions getting variable information
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-08-03
  • Updated: 2000-11-01
  • Resolved: 2000-11-01
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
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

Comments
EVALUATION tim.bell@Eng 2000-11-01 Indeed, when this test case is run using J2SDK 1.3 FCS 1.3 release, the output looks like this: % java -showversion -classpath ".:$JAVA_HOME/lib/tools.jar" ptr1441 java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) Action: Launching: JavaExprTest Event: VMStartEvent in thread main Event: ###@###.###lassLoader$1.run()+72 in thread main Thread count : 5 Thread : name(CompileThread0), grp(system), stat(running), susp(1) Stack count for thread CompileThread0 : 0 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(0), line(-1), class(java.lang.Object), mthd(wait) 1: ci(48), line(149), class(java.lang.ref.ReferenceQueue), mthd(remove) 2: ci(2), line(164), class(java.lang.ref.ReferenceQueue), mthd(remove) 3: ci(10), line(120), class(java.lang.ref.Finalizer$FinalizerWorker$FinalizerThread), mthd(run) Thread : name(Reference Handler), grp(system), stat(wait), susp(1) Stack count for thread Reference Handler : 3 0: ci(0), line(-1), class(java.lang.Object), mthd(wait) 1: ci(2), line(420), class(java.lang.Object), mthd(wait) 2: ci(15), line(129), 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(0), 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 When run using the latest Merlin code, however, we have ci=-1 and li=-1, as it should be: % java -showversion -classpath ".:$JAVA_HOME/lib/tools.jar" ptr1441 java version "1.4.0beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0beta-b38) Java HotSpot(TM) Client VM (build 1.4beta-B38, mixed mode) Action: Launching: JavaExprTest Event: VMStartEvent in thread main Event: ###@###.###lassLoader$1.run()+72 in thread main Thread count : 5 Thread : name(CompileThread0), grp(system), stat(running), susp(1) Stack count for thread CompileThread0 : 0 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(425), 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
11-06-2004

PUBLIC COMMENTS .
10-06-2004