Support labels evaluation in debugger

This commit is contained in:
Natalia Ukhorskaya
2015-06-17 12:19:26 +03:00
parent 0f108eee2f
commit 8bb33f0df5
12 changed files with 283 additions and 58 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at lCallOnLabeledObj.kt:6
!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! lCallOnLabeledObj.LCallOnLabeledObjPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
lCallOnLabeledObj.kt:6
Compile bytecode for myClass_DebugLabel.foo()
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
+10
View File
@@ -0,0 +1,10 @@
LineBreakpoint created at lSeveralLabels.kt:8
!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! lSeveralLabels.LSeveralLabelsPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
lSeveralLabels.kt:8
Compile bytecode for a_DebugLabel
Compile bytecode for b_DebugLabel
Compile bytecode for c_DebugLabel
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
+9
View File
@@ -0,0 +1,9 @@
LineBreakpoint created at lSimple.kt:6
!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! lSimple.LSimplePackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
lSimple.kt:6
Compile bytecode for a
Compile bytecode for aLabel_DebugLabel
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,16 @@
package lCallOnLabeledObj
fun main(args: Array<String>) {
val myClass = MyClass()
//Breakpoint!
val a = 1
}
class MyClass {
fun foo() = 1
}
// DEBUG_LABEL: myClass = myClass
// EXPRESSION: myClass_DebugLabel.foo()
// RESULT: 1: I
@@ -0,0 +1,22 @@
package lSeveralLabels
fun main(args: Array<String>) {
val a = "str1"
val b = "str2"
val c = "str3"
//Breakpoint!
val d = 1
}
// DEBUG_LABEL: a = a
// DEBUG_LABEL: b = b
// DEBUG_LABEL: c = c
// EXPRESSION: a_DebugLabel
// RESULT: "str1": Ljava/lang/String;
// EXPRESSION: b_DebugLabel
// RESULT: "str2": Ljava/lang/String;
// EXPRESSION: c_DebugLabel
// RESULT: "str3": Ljava/lang/String;
@@ -0,0 +1,15 @@
package lSimple
fun main(args: Array<String>) {
val a = "str"
//Breakpoint!
val b = 1
}
// DEBUG_LABEL: a = aLabel
// EXPRESSION: a
// RESULT: "str": Ljava/lang/String;
// EXPRESSION: aLabel_DebugLabel
// RESULT: "str": Ljava/lang/String;