blob: ff5a94fc9ad17cefa925630574bc62edcb8c4242 [file]
(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 kt42208-2.kt:17
Breakpoint 1: where = lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:main$$inlined$foo$1.invoke#internal + <breakpoint offset> at kt42208-2.kt:17: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_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:main$$inlined$foo$1.invoke#internal(_this=main$$inlined$foo$1<value id>) at kt42208-2.kt:17:5
14 class A
15 val list = mutableListOf<A>()
16 inline fun foo() = { ->
-> 17 list.add(A())
^
18 }
(lldb) bt
* thread #<thread id>, stop reason = breakpoint 1.1
* frame #0: <frame pc> lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:main$$inlined$foo$1.invoke#internal(_this=main$$inlined$foo$1<value id>) at kt42208-2.kt:17:5
frame #1: <frame pc> lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:main$$inlined$foo$1.$<bridge-UN>invoke(_this=main$$inlined$foo$1<value id>){}kotlin.Boolean#internal at kt42208-2.kt:16:20
frame #2: <frame pc> lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:kotlin.Function0#invoke(){}1:0 at [K][Suspend]Functions:1:1
frame #3: <frame pc> lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:#bar(v=main$$inlined$foo$1<value id>){} at kt42208-3.kt:21:5
frame #4: <frame pc> lldb_kt42208WithPassingLambdaTo-cf023500.kexe`kfun:#main(){} at kt42208-1.kt:10:5
(lldb) c
Process <process id> resuming
Process <process id> exited with status = 0 (<memory address>)
(lldb) q