2 This is a regression test for an assert that happens while setting a breakpoint.
3 The root cause of the assert was attempting to add a ParmVarDecl to a CXXRecordDecl
4 when it should have been added to a CXXMethodDecl.
6 We can reproduce with a module build and setting a breakpoint in a member function
7 of a class with a non-primitive type as a parameter.
11 from lldbsuite.test.decorators import *
12 from lldbsuite.test.lldbtest import *
13 from lldbsuite.test import lldbutil
15 class TestBreakpointInMemberFuncWNonPrimitiveParams(TestBase):
17 mydir = TestBase.compute_mydir(__file__)
19 @add_test_categories(["gmodules"])
20 def test_breakpint_in_member_func_w_non_primitie_params(self):
23 (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
24 lldb.SBFileSpec("main.cpp", False))
26 self.runCmd("b a.cpp:11");