aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/lang/objcxx/objc-from-cpp-frames-without-debuginfo/TestObjCFromCppFramesWithoutDebugInfo.py
blob: 497c0dd128f4894f19101d1dd763ca8447c96814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Test that the the expression parser enables ObjC support
when stopped in a C++ frame without debug-info.
"""

import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil


class TestObjCFromCppFramesWithoutDebugInfo(TestBase):
    def test(self):
        self.build()
        (_, process, _, _) = lldbutil.run_to_name_breakpoint(self, "main")

        self.assertState(process.GetState(), lldb.eStateStopped)

        # Tests that we can use builtin Objective-C identifiers.
        self.expect("expr id", error=False)

        # Tests that we can lookup Objective-C decls in the ObjC runtime plugin.
        self.expect_expr(
            "NSString *c; c == nullptr", result_value="true", result_type="bool"
        )