[Lldb-commits] [PATCH] D30249: Clear expression when breakpoint location becomes unresolved

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 22 03:56:57 PST 2017


labath created this revision.

The compiled expression is not needed once the location goes away. Also,
it holds a reference to the module, which prevents cleanup of the module
if somebody holds a reference to the breakpoint object.

This fixes the StepOverBreakpoint test on windows, but I am unsure how
to make a more generic test for this.


https://reviews.llvm.org/D30249

Files:
  packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
  source/Breakpoint/BreakpointLocation.cpp


Index: source/Breakpoint/BreakpointLocation.cpp
===================================================================
--- source/Breakpoint/BreakpointLocation.cpp
+++ source/Breakpoint/BreakpointLocation.cpp
@@ -458,6 +458,7 @@
       m_bp_site_sp->RemoveOwner(GetBreakpoint().GetID(), GetID());
 
     m_bp_site_sp.reset();
+    m_user_expression_sp.reset();
     return true;
   }
   return false;
Index: packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
@@ -52,7 +52,6 @@
         self.thread = lldbutil.get_one_thread_stopped_at_breakpoint(self.process, self.breakpoint1)
         self.assertIsNotNone(self.thread, "Didn't stop at breakpoint 1.")
 
-    @skipIf(bugnumber="llvm.org/pr31972", hostoslist=["windows"])
     def test_step_instruction(self): 
         # Count instructions between breakpoint_1 and breakpoint_4
         contextList = self.target.FindFunctions('main', lldb.eFunctionNameTypeAuto)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30249.89345.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170222/2f579aa4/attachment.bin>


More information about the lldb-commits mailing list