MethodEntryEvent.location() is not returning null for native method,
but the Method.location() returns null.
the location() method in these interfaces(MethodEntryEvent&Method)
are from Locatable, which is supposed to return null location
for a nativeMethod.
Tested in windows-NT,JDK1.3.0.R
Steps to reproduce the bug
---------------------------
1)Set path to JDK1.3.0.R(in Windows platform)
2)Compile the attached files with -g option
3)Start the targetVM with the command
java -Xdebug -Xnoagent
-Xrunjdwp:transport="dt_socket",server=y,suspend=y,address=5670
HelloWorld
4)Start the debugger with the command
java StackFrameTest
Attachments: in evaluate.jar
--------------------------
1. JDIScaffold.java
2. VMConnection.java
3. StackFrameTest.java
4. HelloWorld.java
5. HelloWorldImp.c(used VC++5,to generate library file)
------------------------
evaluate.jar is attached.
Follow the above steps, you can reproduce the problem.
Here is the NT result,
---------------------
vm is com.sun.tools.jdi.VirtualMachineImpl@64457d
got vm
JVM version:1.3.0
JDI version: 1.3
JVM description: Java Debug Interface (Reference Implementation) version 1.3
Java Debug Wire Protocol (Reference Implementation) version 1.0
JVM Debug Interface version 1.0
JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode)
methodEntryRequest........com.sun.tools.jdi.EventRequestManagerImpl$MethodEntryRequestImpl@45c3ac
###@###.###layHelloWorld()+0 in thread main
Location from METHOD ............null
Location from EVENT ............HelloWorld.displayHelloWorld()+0