diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt index 508b65ac03b..267e5d431a3 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt @@ -1216,7 +1216,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map q """) + @Test + fun `can inspect catch parameter`() = lldbTest(""" + fun main() { + try { + throw Exception("message 1") + } catch (e1: Throwable) { + println(e1.message) + } + + try { + throwError() + } catch (e2: Throwable) { + println(e2.message) + } + } + + fun throwError() { + throw Error("message 2") + } + """, """ + > b main.kt:5 + > ${lldbCommandRunOrContinue()} + > fr var + (ObjHeader *) e1 = [..] + > b main.kt:11 + > c + > fr var + (ObjHeader *) e2 = [..] + > q + """) + @Test fun `swift with kotlin static framework`() = lldbComplexTest { val aKtSrc = """