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:
@@ -409,15 +409,17 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT
|
|||||||
if (`$this` != null) return `$this`
|
if (`$this` != null) return `$this`
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
val eval4j = JDIEval(frame.virtualMachine()!!,
|
|
||||||
getClassLoader()!!,
|
|
||||||
getSuspendContext().getThread()?.getThreadReference()!!,
|
|
||||||
getSuspendContext().getInvokePolicy())
|
|
||||||
|
|
||||||
fun JDIEval.getField(owner: Value, name: String, asmType: Type?, checkType: Boolean): Value? {
|
fun getField(owner: Value, name: String, asmType: Type?, checkType: Boolean): Value? {
|
||||||
val fieldDescription = FieldDescription(owner.asmType.getInternalName(), name, asmType?.getDescriptor() ?: "", isStatic = false)
|
|
||||||
try {
|
try {
|
||||||
val fieldValue = getField(owner, fieldDescription)
|
val obj = owner.asJdiValue(frame.virtualMachine(), owner.asmType)
|
||||||
|
if (obj !is ObjectReference) return null
|
||||||
|
|
||||||
|
val _class = obj.referenceType()
|
||||||
|
val field = _class.fieldByName(name)
|
||||||
|
if (field == null) return null
|
||||||
|
|
||||||
|
val fieldValue = obj.getValue(field).asValue()
|
||||||
if (isValueOfCorrectType(fieldValue, asmType, checkType)) return fieldValue
|
if (isValueOfCorrectType(fieldValue, asmType, checkType)) return fieldValue
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -430,8 +432,8 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT
|
|||||||
return expectedType != null && this.asmType == StackValue.sharedTypeForType(expectedType)
|
return expectedType != null && this.asmType == StackValue.sharedTypeForType(expectedType)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun JDIEval.getValueForSharedVar(value: Value, expectedType: Type?, checkType: Boolean): Value? {
|
fun getValueForSharedVar(value: Value, expectedType: Type?, checkType: Boolean): Value? {
|
||||||
val sharedVarValue = this.getField(value, "element", expectedType, checkType)
|
val sharedVarValue = getField(value, "element", expectedType, checkType)
|
||||||
if (sharedVarValue != null && isValueOfCorrectType(sharedVarValue, expectedType, checkType)) {
|
if (sharedVarValue != null && isValueOfCorrectType(sharedVarValue, expectedType, checkType)) {
|
||||||
return sharedVarValue
|
return sharedVarValue
|
||||||
}
|
}
|
||||||
@@ -442,7 +444,7 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT
|
|||||||
if (localVariable != null) {
|
if (localVariable != null) {
|
||||||
val eval4jValue = frame.getValue(localVariable).asValue()
|
val eval4jValue = frame.getValue(localVariable).asValue()
|
||||||
if (eval4jValue.isSharedVar(asmType)) {
|
if (eval4jValue.isSharedVar(asmType)) {
|
||||||
val sharedVarValue = eval4j.getValueForSharedVar(eval4jValue, asmType, checkType)
|
val sharedVarValue = getValueForSharedVar(eval4jValue, asmType, checkType)
|
||||||
if (sharedVarValue != null) {
|
if (sharedVarValue != null) {
|
||||||
return sharedVarValue
|
return sharedVarValue
|
||||||
}
|
}
|
||||||
@@ -457,9 +459,9 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT
|
|||||||
var thisObj: Value? = thisObject.asValue()
|
var thisObj: Value? = thisObject.asValue()
|
||||||
|
|
||||||
while (result == null && thisObj != null) {
|
while (result == null && thisObj != null) {
|
||||||
result = eval4j.getField(thisObj!!, name, asmType, checkType)
|
result = getField(thisObj!!, name, asmType, checkType)
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
thisObj = eval4j.getField(thisObj!!, AsmUtil.CAPTURED_THIS_FIELD, null, false)
|
thisObj = getField(thisObj!!, AsmUtil.CAPTURED_THIS_FIELD, null, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
@@ -469,7 +471,7 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT
|
|||||||
val capturedVal = findCapturedVal(capturedValName)
|
val capturedVal = findCapturedVal(capturedValName)
|
||||||
if (capturedVal != null) {
|
if (capturedVal != null) {
|
||||||
if (capturedVal.isSharedVar(asmType)) {
|
if (capturedVal.isSharedVar(asmType)) {
|
||||||
val sharedVarValue = eval4j.getValueForSharedVar(capturedVal, asmType, checkType)
|
val sharedVarValue = getValueForSharedVar(capturedVal, asmType, checkType)
|
||||||
if (sharedVarValue != null) {
|
if (sharedVarValue != null) {
|
||||||
return sharedVarValue
|
return sharedVarValue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
LineBreakpoint created at frameClassObject.kt:15
|
LineBreakpoint created at frameClassObject.kt:16
|
||||||
!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! frameClassObject.FrameClassObjectPackage
|
!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! frameClassObject.FrameClassObjectPackage
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameClassObject.kt:15
|
frameClassObject.kt:16
|
||||||
Compile bytecode for prop
|
Compile bytecode for prop
|
||||||
|
Compile bytecode for myFun()
|
||||||
package frameClassObject
|
package frameClassObject
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -12,6 +13,7 @@ fun main(args: Array<String>) {
|
|||||||
class A {
|
class A {
|
||||||
class object {
|
class object {
|
||||||
val prop = 1
|
val prop = 1
|
||||||
|
fun myFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
@@ -30,7 +32,10 @@ fun foo(f: () -> Unit) {
|
|||||||
|
|
||||||
// EXPRESSION: prop
|
// EXPRESSION: prop
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
frame = invoke():15, A$test$1 {frameClassObject}
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = invoke():16, A$test$1 {frameClassObject}
|
||||||
this = this = {frameClassObject.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
this = this = {frameClassObject.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
!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'
|
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 valFoo
|
||||||
Compile bytecode for valTest
|
Compile bytecode for valTest
|
||||||
Compile bytecode for aProp
|
Compile bytecode for aProp
|
||||||
Compile bytecode for outerProp
|
Compile bytecode for outerProp
|
||||||
Compile bytecode for bProp
|
Compile bytecode for bProp
|
||||||
|
Compile bytecode for aMyFun()
|
||||||
|
Compile bytecode for outerMyFun()
|
||||||
|
Compile bytecode for bMyFun()
|
||||||
package frameExtFunExtFun
|
package frameExtFunExtFun
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -15,10 +18,12 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val aProp = 1
|
val aProp = 1
|
||||||
|
fun aMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
class Outer {
|
class Outer {
|
||||||
val outerProp = 1
|
val outerProp = 1
|
||||||
|
fun outerMyFun() = 1
|
||||||
|
|
||||||
fun A.foo() {
|
fun A.foo() {
|
||||||
val valFoo = 1
|
val valFoo = 1
|
||||||
@@ -46,6 +51,7 @@ class Outer {
|
|||||||
|
|
||||||
class B {
|
class B {
|
||||||
val bProp = 1
|
val bProp = 1
|
||||||
|
fun bMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun lambda(f: () -> Unit) {
|
fun lambda(f: () -> Unit) {
|
||||||
@@ -68,17 +74,26 @@ fun lambda(f: () -> Unit) {
|
|||||||
|
|
||||||
// EXPRESSION: bProp
|
// EXPRESSION: bProp
|
||||||
// RESULT: 1: I
|
// 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>
|
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 = 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 = 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 = receiver$0: frameExtFunExtFun.A = {frameExtFunExtFun.A@uniqueID} (sp = null)
|
||||||
field = aProp: int = 1 (sp = frameExtFunExtFun.kt, 8)
|
field = aProp: int = 1 (sp = frameExtFunExtFun.kt, 8)
|
||||||
field = $valFoo: int = 1 (sp = null)
|
field = $valFoo: int = 1 (sp = null)
|
||||||
field = receiver$0: frameExtFunExtFun.B = {frameExtFunExtFun.B@uniqueID} (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)
|
field = $valTest: int = 1 (sp = null)
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
LineBreakpoint created at frameExtensionFun.kt:13
|
LineBreakpoint created at frameExtensionFun.kt:14
|
||||||
!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! frameExtensionFun.FrameExtensionFunPackage
|
!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! frameExtensionFun.FrameExtensionFunPackage
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameExtensionFun.kt:13
|
frameExtensionFun.kt:14
|
||||||
Compile bytecode for prop
|
Compile bytecode for prop
|
||||||
|
Compile bytecode for myFun()
|
||||||
package frameExtensionFun
|
package frameExtensionFun
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -11,6 +12,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop = 1
|
val prop = 1
|
||||||
|
fun myFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun A.foo() {
|
fun A.foo() {
|
||||||
@@ -22,7 +24,10 @@ fun A.foo() {
|
|||||||
|
|
||||||
// EXPRESSION: prop
|
// EXPRESSION: prop
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
frame = foo():13, FrameExtensionFunPackage$@packagePartHASH {frameExtensionFun}
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = foo():14, FrameExtensionFunPackage$@packagePartHASH {frameExtensionFun}
|
||||||
static = static = frameExtensionFun.FrameExtensionFunPackage$@packagePartHASH
|
static = static = frameExtensionFun.FrameExtensionFunPackage$@packagePartHASH
|
||||||
local = $receiver: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null)
|
local = $receiver: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null)
|
||||||
field = prop: int = 1 (sp = frameExtensionFun.kt, 8)
|
field = prop: int = 1 (sp = frameExtensionFun.kt, 8)
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
LineBreakpoint created at frameInnerClass.kt:15
|
LineBreakpoint created at frameInnerClass.kt:17
|
||||||
!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! frameInnerClass.FrameInnerClassPackage
|
!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! frameInnerClass.FrameInnerClassPackage
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameInnerClass.kt:15
|
frameInnerClass.kt:17
|
||||||
Compile bytecode for prop1
|
Compile bytecode for prop1
|
||||||
Compile bytecode for prop2
|
Compile bytecode for prop2
|
||||||
|
Compile bytecode for myFun1()
|
||||||
|
Compile bytecode for myFun2()
|
||||||
package frameInnerClass
|
package frameInnerClass
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -12,9 +14,11 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun1() = 1
|
||||||
|
|
||||||
inner class Inner {
|
inner class Inner {
|
||||||
val prop2 = 1
|
val prop2 = 1
|
||||||
|
fun myFun2() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
//Breakpoint!
|
//Breakpoint!
|
||||||
@@ -30,9 +34,15 @@ class A {
|
|||||||
|
|
||||||
// EXPRESSION: prop2
|
// EXPRESSION: prop2
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
frame = test():15, A$Inner {frameInnerClass}
|
|
||||||
|
// EXPRESSION: myFun1()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun2()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = test():17, A$Inner {frameInnerClass}
|
||||||
this = this = {frameInnerClass.A$Inner@uniqueID}
|
this = this = {frameInnerClass.A$Inner@uniqueID}
|
||||||
field = prop2: int = 1 (sp = frameInnerClass.kt, 11)
|
field = prop2: int = 1 (sp = frameInnerClass.kt, 12)
|
||||||
field = this$0: frameInnerClass.A = {frameInnerClass.A@uniqueID} (sp = null)
|
field = this$0: frameInnerClass.A = {frameInnerClass.A@uniqueID} (sp = null)
|
||||||
field = prop1: int = 1 (sp = frameInnerClass.kt, 8)
|
field = prop1: int = 1 (sp = frameInnerClass.kt, 8)
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ LineBreakpoint created at frameObject.kt:6
|
|||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameObject.kt:6
|
frameObject.kt:6
|
||||||
Compile bytecode for O.obProp
|
Compile bytecode for O.obProp
|
||||||
|
Compile bytecode for O.obMyFun()
|
||||||
package frameObject
|
package frameObject
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -14,6 +15,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
object O {
|
object O {
|
||||||
val obProp = 1
|
val obProp = 1
|
||||||
|
fun obMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo(f: () -> Unit) {
|
fun foo(f: () -> Unit) {
|
||||||
@@ -23,6 +25,9 @@ fun foo(f: () -> Unit) {
|
|||||||
// PRINT_FRAME
|
// PRINT_FRAME
|
||||||
|
|
||||||
// EXPRESSION: O.obProp
|
// EXPRESSION: O.obProp
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: O.obMyFun()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
frame = invoke():6, FrameObjectPackage$@packagePartHASH$main$1 {frameObject}
|
frame = invoke():6, FrameObjectPackage$@packagePartHASH$main$1 {frameObject}
|
||||||
this = this = {frameObject.FrameObjectPackage$@packagePartHASH$main$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
this = this = {frameObject.FrameObjectPackage$@packagePartHASH$main$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
LineBreakpoint created at frameThis0.kt:15
|
LineBreakpoint created at frameThis0.kt:16
|
||||||
!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! frameThis0.FrameThis0Package
|
!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! frameThis0.FrameThis0Package
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameThis0.kt:15
|
frameThis0.kt:16
|
||||||
Compile bytecode for val1
|
Compile bytecode for val1
|
||||||
Compile bytecode for val2
|
Compile bytecode for val2
|
||||||
Compile bytecode for prop1
|
Compile bytecode for prop1
|
||||||
Compile bytecode for prop1 + val1 + val2
|
Compile bytecode for prop1 + val1 + val2
|
||||||
|
Compile bytecode for myFun()
|
||||||
package frameThis0
|
package frameThis0
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -14,6 +15,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -42,12 +44,15 @@ fun foo(f: () -> Unit) {
|
|||||||
|
|
||||||
// EXPRESSION: prop1 + val1 + val2
|
// EXPRESSION: prop1 + val1 + val2
|
||||||
// RESULT: 3: I
|
// RESULT: 3: I
|
||||||
frame = invoke():15, A$test$1 {frameThis0}
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = invoke():16, A$test$1 {frameThis0}
|
||||||
this = this = {frameThis0.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
this = this = {frameThis0.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
||||||
field = this$0: frameThis0.A = {frameThis0.A@uniqueID} (sp = null)
|
field = this$0: frameThis0.A = {frameThis0.A@uniqueID} (sp = null)
|
||||||
field = prop1: int = 1 (sp = frameThis0.kt, 8)
|
field = prop1: int = 1 (sp = frameThis0.kt, 8)
|
||||||
field = $val1: int = 1 (sp = null)
|
field = $val1: int = 1 (sp = null)
|
||||||
local = val2: int = 1 (sp = frameThis0.kt, 13)
|
local = val2: int = 1 (sp = frameThis0.kt, 14)
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
Process finished with exit code 0
|
Process finished with exit code 0
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
LineBreakpoint created at frameThis0Ext.kt:14
|
LineBreakpoint created at frameThis0Ext.kt:15
|
||||||
!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! frameThis0Ext.FrameThis0ExtPackage
|
!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! frameThis0Ext.FrameThis0ExtPackage
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameThis0Ext.kt:14
|
frameThis0Ext.kt:15
|
||||||
Compile bytecode for val1
|
Compile bytecode for val1
|
||||||
Compile bytecode for prop1
|
Compile bytecode for prop1
|
||||||
Compile bytecode for prop2
|
Compile bytecode for prop2
|
||||||
Compile bytecode for prop1 + val1
|
Compile bytecode for prop1 + val1
|
||||||
Compile bytecode for prop2 + val1
|
Compile bytecode for prop2 + val1
|
||||||
|
Compile bytecode for myFun1()
|
||||||
|
Compile bytecode for myFun2()
|
||||||
package frameThis0Ext
|
package frameThis0Ext
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -15,6 +17,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun1() = 1
|
||||||
|
|
||||||
fun AExt.testExt() {
|
fun AExt.testExt() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -31,6 +34,7 @@ class A {
|
|||||||
|
|
||||||
class AExt {
|
class AExt {
|
||||||
val prop2 = 1
|
val prop2 = 1
|
||||||
|
fun myFun2() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo(f: () -> Unit) {
|
fun foo(f: () -> Unit) {
|
||||||
@@ -53,12 +57,18 @@ fun foo(f: () -> Unit) {
|
|||||||
|
|
||||||
// EXPRESSION: prop2 + val1
|
// EXPRESSION: prop2 + val1
|
||||||
// RESULT: 2: I
|
// RESULT: 2: I
|
||||||
frame = invoke():14, A$testExt$1 {frameThis0Ext}
|
|
||||||
|
// EXPRESSION: myFun1()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun2()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = invoke():15, A$testExt$1 {frameThis0Ext}
|
||||||
this = this = {frameThis0Ext.A$testExt$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
this = this = {frameThis0Ext.A$testExt$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
||||||
field = this$0: frameThis0Ext.A = {frameThis0Ext.A@uniqueID} (sp = null)
|
field = this$0: frameThis0Ext.A = {frameThis0Ext.A@uniqueID} (sp = null)
|
||||||
field = prop1: int = 1 (sp = frameThis0Ext.kt, 8)
|
field = prop1: int = 1 (sp = frameThis0Ext.kt, 8)
|
||||||
field = receiver$0: frameThis0Ext.AExt = {frameThis0Ext.AExt@uniqueID} (sp = null)
|
field = receiver$0: frameThis0Ext.AExt = {frameThis0Ext.AExt@uniqueID} (sp = null)
|
||||||
field = prop2: int = 1 (sp = frameThis0Ext.kt, 24)
|
field = prop2: int = 1 (sp = frameThis0Ext.kt, 25)
|
||||||
field = $val1: int = 1 (sp = null)
|
field = $val1: int = 1 (sp = null)
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
LineBreakpoint created at frameThis0This0.kt:16
|
LineBreakpoint created at frameThis0This0.kt:17
|
||||||
!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! frameThis0This0.FrameThis0This0Package
|
!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! frameThis0This0.FrameThis0This0Package
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
frameThis0This0.kt:16
|
frameThis0This0.kt:17
|
||||||
Compile bytecode for val1
|
Compile bytecode for val1
|
||||||
Compile bytecode for val2
|
Compile bytecode for val2
|
||||||
Compile bytecode for prop1
|
Compile bytecode for prop1
|
||||||
Compile bytecode for prop1 + val1 + val2
|
Compile bytecode for prop1 + val1 + val2
|
||||||
|
Compile bytecode for myFun()
|
||||||
package frameThis0This0
|
package frameThis0This0
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
@@ -14,6 +15,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -44,7 +46,10 @@ fun foo(f: () -> Unit) {
|
|||||||
|
|
||||||
// EXPRESSION: prop1 + val1 + val2
|
// EXPRESSION: prop1 + val1 + val2
|
||||||
// RESULT: 3: I
|
// RESULT: 3: I
|
||||||
frame = invoke():16, A$test$1$1 {frameThis0This0}
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
frame = invoke():17, A$test$1$1 {frameThis0This0}
|
||||||
this = this = {frameThis0This0.A$test$1$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
this = this = {frameThis0This0.A$test$1$1@uniqueID}kotlin.Function0<kotlin.Unit>
|
||||||
field = this$0: frameThis0This0.A$test$1 = {frameThis0This0.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit> (sp = null)
|
field = this$0: frameThis0This0.A$test$1 = {frameThis0This0.A$test$1@uniqueID}kotlin.Function0<kotlin.Unit> (sp = null)
|
||||||
field = this$0: frameThis0This0.A = {frameThis0This0.A@uniqueID} (sp = null)
|
field = this$0: frameThis0This0.A = {frameThis0This0.A@uniqueID} (sp = null)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ fun main(args: Array<String>) {
|
|||||||
class A {
|
class A {
|
||||||
class object {
|
class object {
|
||||||
val prop = 1
|
val prop = 1
|
||||||
|
fun myFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
@@ -24,4 +25,7 @@ fun foo(f: () -> Unit) {
|
|||||||
// PRINT_FRAME
|
// PRINT_FRAME
|
||||||
|
|
||||||
// EXPRESSION: prop
|
// EXPRESSION: prop
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
+12
@@ -6,10 +6,12 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val aProp = 1
|
val aProp = 1
|
||||||
|
fun aMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
class Outer {
|
class Outer {
|
||||||
val outerProp = 1
|
val outerProp = 1
|
||||||
|
fun outerMyFun() = 1
|
||||||
|
|
||||||
fun A.foo() {
|
fun A.foo() {
|
||||||
val valFoo = 1
|
val valFoo = 1
|
||||||
@@ -37,6 +39,7 @@ class Outer {
|
|||||||
|
|
||||||
class B {
|
class B {
|
||||||
val bProp = 1
|
val bProp = 1
|
||||||
|
fun bMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun lambda(f: () -> Unit) {
|
fun lambda(f: () -> Unit) {
|
||||||
@@ -58,4 +61,13 @@ fun lambda(f: () -> Unit) {
|
|||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
|
|
||||||
// EXPRESSION: bProp
|
// EXPRESSION: bProp
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: aMyFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: outerMyFun()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: bMyFun()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
+4
@@ -6,6 +6,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop = 1
|
val prop = 1
|
||||||
|
fun myFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun A.foo() {
|
fun A.foo() {
|
||||||
@@ -16,4 +17,7 @@ fun A.foo() {
|
|||||||
// PRINT_FRAME
|
// PRINT_FRAME
|
||||||
|
|
||||||
// EXPRESSION: prop
|
// EXPRESSION: prop
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
@@ -6,9 +6,11 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun1() = 1
|
||||||
|
|
||||||
inner class Inner {
|
inner class Inner {
|
||||||
val prop2 = 1
|
val prop2 = 1
|
||||||
|
fun myFun2() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
//Breakpoint!
|
//Breakpoint!
|
||||||
@@ -23,4 +25,10 @@ class A {
|
|||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
|
|
||||||
// EXPRESSION: prop2
|
// EXPRESSION: prop2
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun1()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun2()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
@@ -9,6 +9,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
object O {
|
object O {
|
||||||
val obProp = 1
|
val obProp = 1
|
||||||
|
fun obMyFun() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo(f: () -> Unit) {
|
fun foo(f: () -> Unit) {
|
||||||
@@ -18,4 +19,7 @@ fun foo(f: () -> Unit) {
|
|||||||
// PRINT_FRAME
|
// PRINT_FRAME
|
||||||
|
|
||||||
// EXPRESSION: O.obProp
|
// EXPRESSION: O.obProp
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: O.obMyFun()
|
||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
@@ -6,6 +6,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -33,4 +34,7 @@ fun foo(f: () -> Unit) {
|
|||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
|
|
||||||
// EXPRESSION: prop1 + val1 + val2
|
// EXPRESSION: prop1 + val1 + val2
|
||||||
// RESULT: 3: I
|
// RESULT: 3: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
@@ -6,6 +6,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun1() = 1
|
||||||
|
|
||||||
fun AExt.testExt() {
|
fun AExt.testExt() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -22,6 +23,7 @@ class A {
|
|||||||
|
|
||||||
class AExt {
|
class AExt {
|
||||||
val prop2 = 1
|
val prop2 = 1
|
||||||
|
fun myFun2() = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo(f: () -> Unit) {
|
fun foo(f: () -> Unit) {
|
||||||
@@ -43,4 +45,10 @@ fun foo(f: () -> Unit) {
|
|||||||
// RESULT: 2: I
|
// RESULT: 2: I
|
||||||
|
|
||||||
// EXPRESSION: prop2 + val1
|
// EXPRESSION: prop2 + val1
|
||||||
// RESULT: 2: I
|
// RESULT: 2: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun1()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun2()
|
||||||
|
// RESULT: 1: I
|
||||||
+5
-1
@@ -6,6 +6,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
val prop1 = 1
|
val prop1 = 1
|
||||||
|
fun myFun() = 1
|
||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
val val1 = 1
|
val val1 = 1
|
||||||
@@ -35,4 +36,7 @@ fun foo(f: () -> Unit) {
|
|||||||
// RESULT: 1: I
|
// RESULT: 1: I
|
||||||
|
|
||||||
// EXPRESSION: prop1 + val1 + val2
|
// EXPRESSION: prop1 + val1 + val2
|
||||||
// RESULT: 3: I
|
// RESULT: 3: I
|
||||||
|
|
||||||
|
// EXPRESSION: myFun()
|
||||||
|
// RESULT: 1: I
|
||||||
Reference in New Issue
Block a user