1import lldb
2from lldbsuite.test.decorators import *
3from lldbsuite.test.lldbtest import *
4from lldbsuite.test import lldbutil
5
6class TestCase(TestBase):
7
8    @expectedFailureAll(oslist=["windows"])
9    def test(self):
10        self.build()
11        lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.c"))
12
13        self.expect_expr("$__lldb_expr_result", result_type="int", result_value="11")
14        self.expect_expr("$foo", result_type="int", result_value="12")
15        self.expect_expr("$R0", result_type="int", result_value="13")
16        self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"])
17        self.expect_expr("$0", result_type="int", result_value="11")
18