Debugger: remove usage of JDIEval during finding local variable in frame because it invokeMethod (loadClass) for find field type which invalidates frame

This commit is contained in:
Natalia Ukhorskaya
2015-02-06 15:25:33 +03:00
parent 3802957c15
commit 187806d061
17 changed files with 153 additions and 43 deletions
@@ -1,12 +1,15 @@
LineBreakpoint created at frameExtFunExtFun.kt:22
LineBreakpoint created at frameExtFunExtFun.kt:24
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameExtFunExtFun.FrameExtFunExtFunPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
frameExtFunExtFun.kt:22
frameExtFunExtFun.kt:24
Compile bytecode for valFoo
Compile bytecode for valTest
Compile bytecode for aProp
Compile bytecode for outerProp
Compile bytecode for bProp
Compile bytecode for aMyFun()
Compile bytecode for outerMyFun()
Compile bytecode for bMyFun()
package frameExtFunExtFun
fun main(args: Array<String>) {
@@ -15,10 +18,12 @@ fun main(args: Array<String>) {
class A {
val aProp = 1
fun aMyFun() = 1
}
class Outer {
val outerProp = 1
fun outerMyFun() = 1
fun A.foo() {
val valFoo = 1
@@ -46,6 +51,7 @@ class Outer {
class B {
val bProp = 1
fun bMyFun() = 1
}
fun lambda(f: () -> Unit) {
@@ -68,17 +74,26 @@ fun lambda(f: () -> Unit) {
// EXPRESSION: bProp
// RESULT: 1: I
frame = invoke():22, Outer$foo$LocalClass$test$1 {frameExtFunExtFun}
// EXPRESSION: aMyFun()
// RESULT: 1: I
// EXPRESSION: outerMyFun()
// RESULT: 1: I
// EXPRESSION: bMyFun()
// RESULT: 1: I
frame = invoke():24, Outer$foo$LocalClass$test$1 {frameExtFunExtFun}
this = this = {frameExtFunExtFun.Outer$foo$LocalClass$test$1@uniqueID}kotlin.Function0<kotlin.Unit>
field = this$0: frameExtFunExtFun.Outer$foo$LocalClass = {frameExtFunExtFun.Outer$foo$LocalClass@uniqueID} (sp = null)
field = lcProp: int = 1 (sp = frameExtFunExtFun.kt, 17)
field = lcProp: int = 1 (sp = frameExtFunExtFun.kt, 19)
field = this$0: frameExtFunExtFun.Outer = {frameExtFunExtFun.Outer@uniqueID} (sp = null)
field = outerProp: int = 1 (sp = frameExtFunExtFun.kt, 12)
field = outerProp: int = 1 (sp = frameExtFunExtFun.kt, 13)
field = receiver$0: frameExtFunExtFun.A = {frameExtFunExtFun.A@uniqueID} (sp = null)
field = aProp: int = 1 (sp = frameExtFunExtFun.kt, 8)
field = $valFoo: int = 1 (sp = null)
field = receiver$0: frameExtFunExtFun.B = {frameExtFunExtFun.B@uniqueID} (sp = null)
field = bProp: int = 1 (sp = frameExtFunExtFun.kt, 39)
field = bProp: int = 1 (sp = frameExtFunExtFun.kt, 41)
field = $valTest: int = 1 (sp = null)
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'