2 Test that the target.process.thread.max-backtrace-depth setting works.
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
12 class BacktraceLimitSettingTest(TestBase):
14 mydir = TestBase.compute_mydir(__file__)
15 NO_DEBUG_INFO_TESTCASE = True
17 def test_backtrace_depth(self):
18 """Test that the max-backtrace-depth setting limits backtraces."""
20 self.main_source_file = lldb.SBFileSpec("main.cpp")
21 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
22 "Set a breakpoint here", self.main_source_file)
23 interp = self.dbg.GetCommandInterpreter()
24 result = lldb.SBCommandReturnObject()
25 interp.HandleCommand("settings set target.process.thread.max-backtrace-depth 30", result)
26 self.assertEqual(True, result.Succeeded())
27 self.assertEqual(30, thread.GetNumFrames())