Debugger: support field watchpoints for kotlin

This commit is contained in:
Natalia Ukhorskaya
2015-05-20 15:13:28 +03:00
parent 7406627e26
commit 2b015ae09a
10 changed files with 493 additions and 0 deletions
@@ -0,0 +1,44 @@
KotlinFieldBreakpoint created at fieldWatchpoints.kt:4
KotlinFieldBreakpoint created at fieldWatchpoints.kt:7
KotlinFieldBreakpoint created at fieldWatchpoints.kt:17
KotlinFieldBreakpoint created at fieldWatchpoints.kt:20
KotlinFieldBreakpoint created at fieldWatchpoints.kt:30
KotlinFieldBreakpoint created at fieldWatchpoints.kt:32
KotlinFieldBreakpoint created at fieldWatchpoints.kt:44
KotlinFieldBreakpoint created at fieldWatchpoints.kt:47
!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! fieldWatchpoints.FieldWatchpointsPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fieldWatchpoints.kt:18
fieldWatchpoints.kt:21
fieldWatchpoints.kt:59
fieldWatchpoints.kt:5
fieldWatchpoints.kt:8
fieldWatchpoints.kt:59
fieldWatchpoints.kt:11
fieldWatchpoints.kt:12
fieldWatchpoints.kt:13
fieldWatchpoints.kt:60
fieldWatchpoints.kt:24
fieldWatchpoints.kt:25
fieldWatchpoints.kt:26
fieldWatchpoints.kt:61
fieldWatchpoints.kt:0
fieldWatchpoints.kt:0
fieldWatchpoints.kt:61
fieldWatchpoints.kt:36
fieldWatchpoints.kt:37
fieldWatchpoints.kt:38
fieldWatchpoints.kt:62
fieldWatchpoints.kt:45
fieldWatchpoints.kt:48
fieldWatchpoints.kt:62
fieldWatchpoints.kt:44
fieldWatchpoints.kt:51
fieldWatchpoints.kt:47
fieldWatchpoints.kt:52
fieldWatchpoints.kt:47
fieldWatchpoints.kt:54
fieldWatchpoints.kt:63
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,5 @@
!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! inapplicableFieldWatchpoints.InapplicableFieldWatchpointsPackage
Connected to 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
@@ -0,0 +1,65 @@
package fieldWatchpoints
class A {
//FieldWatchpoint! (propVal)
val propVal = 1
//FieldWatchpoint! (propVar)
var propVar = 1
fun testPublicPropertyInClass() {
propVal
propVar
propVar = 2
}
}
//FieldWatchpoint! (topPropVal)
val topPropVal = 1
//FieldWatchpoint! (topPropVar)
var topPropVar = 1
fun testPublicTopLevelProperty() {
topPropVal
topPropVar
topPropVar = 2
}
class B(
//FieldWatchpoint! (bPropVal)
val bPropVal: Int,
//FieldWatchpoint! (bPropVar)
var bPropVar: Int
) {
fun testConstructorProperty() {
bPropVal
bPropVar
bPropVar = 2
}
}
class AWithCompanion {
companion object {
//FieldWatchpoint! (compPropVal)
val compPropVal = 1
//FieldWatchpoint! (compPropVar)
var compPropVar = 1
fun testCompanionProperty() {
compPropVal
compPropVar
compPropVar = 2
}
}
}
fun main(args: Array<String>) {
A().testPublicPropertyInClass()
testPublicTopLevelProperty()
B(1, 1).testConstructorProperty()
AWithCompanion.testCompanionProperty()
}
// STEP_OUT: 36
@@ -0,0 +1,23 @@
package inapplicableFieldWatchpoints
class A {
//FieldWatchpoint! (propWithGet)
val propWithGet: Int get() = 1
}
interface T {
//FieldWatchpoint! (propInInterface)
val propInInterface: Int
}
fun main(args: Array<String>) {
//FieldWatchpoint! (localVal)
val localVal = 1
}
fun foo(
//FieldWatchpoint! (funParam)
funParam: Int
) {
}