wallace added inline comments.
================ Comment at: lldb/test/API/functionalities/exec/TestExec.py:133-158 + exe = self.getBuildArtifact("a.out") + secondprog = self.getBuildArtifact("secondprog") + + # Create the target + target = self.dbg.CreateTarget(exe) + + # Create any breakpoints we need ---------------- jingham wrote: > I don't think you need to set the second breakpoint till after you've stopped > at the first one, If not, you should be able to replace everything from the > "exe = self.getBuildArtifact" to the self.assertTrue(len(threads == 1)) with: > > (target, process, thread, breakpoint1) = > lldbutil.run_to_source_breakpoint(self, 'Set breakpoint 1 here', > lldb.SBFileSpec('main.cpp', False)) > breakpoint2 = target.BreakpointCreateBySourceRegex(...) > > and "threads[0]" below -> "thread", which is a lot easier to read. nice! run_to_source_breakpoint is super handy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93874/new/ https://reviews.llvm.org/D93874 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits