| (lldb) target create <path to executable> | |
| Current executable set to <path to executable>. | |
| (lldb) settings set stop-disassembly-display never | |
| (lldb) command script import <path to lldb script> | |
| (lldb) b main.kt:9 | |
| Breakpoint 1: where = lldb_unitArg.kexe`kfun:#main(kotlin.Array<kotlin.String>){} + <breakpoint offset> at main.kt:9:5, address = <memory address> | |
| (lldb) r | |
| Process <process id> launched: <path to executable> | |
| Process <process id> stopped | |
| * thread #<thread id>, stop reason = breakpoint 1.1 | |
| frame #0: <frame pc> lldb_unitArg.kexe`kfun:#main(args=[]){} at main.kt:9:5 | |
| 6 fun test(arg: Unit): Unit {} | |
| 7 | |
| 8 fun main(args: Array<String>) { | |
| -> 9 test(Unit) | |
| ^ | |
| 10 return | |
| 11 } | |
| (lldb) thread step-in | |
| Process <process id> stopped | |
| * thread #<thread id>, stop reason = step in | |
| frame #0: <frame pc> lldb_unitArg.kexe`kfun:#test(arg=kotlin.Unit){} at main.kt:6:1 | |
| 3 // OUTPUT_DATA_FILE: unitArg.out | |
| 4 | |
| 5 | |
| -> 6 fun test(arg: Unit): Unit {} | |
| ^ | |
| 7 | |
| 8 fun main(args: Array<String>) { | |
| 9 test(Unit) | |
| (lldb) fr var arg | |
| (ObjHeader *) arg = kotlin.Unit | |
| (lldb) q |