[Lldb-commits] [PATCH] D45554: Make sure deleting all breakpoints clears their sites first

Eugene Zemtsov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 12 10:21:38 PDT 2018

eugene added inline comments.

Comment at: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c:13
+    printf("Observable side effect\n");
     return 0; // Set break point at this line.
labath wrote:
> Why did you need to add this? This seems like something that could easily be removed/reshuffled in the future (breaking your test, if it depends on it).
I just need more than one bp location in the function. "bp main" and a breakpoint on the line 14 were the same thing before that.
I'll add a comment.

Comment at: source/Breakpoint/BreakpointList.cpp:120-121
+    auto bp = *pos;
+    if (bp->AllowDelete()) {
+      bp->ClearAllBreakpointSites();
+      pos = m_breakpoints.erase(pos);
labath wrote:
> Don't we need to do the same thing in the other "remove" functions (`Remove`, `RemoveAll`).
RemoveAll does the same at the line 83. 
With Remove it's a more complicated. Target removes sites manually by disabling breakpoint, but it has some extra logic that I don't fully understand and not sure if I should touch. 


More information about the lldb-commits mailing list