brintos

brintos / llvm-project-archived public Read only

0
0
Text · 768 B · 221a20b Raw
25 lines · python
1"""2Test SBprocess and SBThread APIs with printing of the stack traces using lldbutil.3"""4 5 6import lldb7from lldbsuite.test.decorators import *8from lldbsuite.test.lldbtest import *9from lldbsuite.test import lldbutil10 11 12class ThreadsStackTracesTestCase(TestBase):13    def test_stack_traces(self):14        """Test SBprocess and SBThread APIs with printing of the stack traces."""15        self.build()16        (_, process, _, _) = lldbutil.run_to_source_breakpoint(17            self, "// BREAK HERE", lldb.SBFileSpec("main.cpp")18        )19        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)20        self.expect(21            stacktraces,22            exe=False,23            substrs=["(int)x=4", "(int)y=6", "(int)x=3", "(int)argc=1"],24        )25