[lldb] Consider all breakpoints in breakpoint detection
authorPavel Kosov <kpdev42@gmail.com>
Wed, 25 Jan 2023 07:50:02 +0000 (10:50 +0300)
committerPavel Kosov <kpdev42@gmail.com>
Wed, 25 Jan 2023 08:06:07 +0000 (11:06 +0300)
commit2af0a478eaee5e6236e7e9fd9b1e3207228ce2ff
tree67a0c1ee505e46a759f819791e4574c80973d336
parent22cdc6a12613e2df2d216ff8f042b1e7ab4cd861
[lldb] Consider all breakpoints in breakpoint detection

Currently in some cases lldb reports stop reason as "step out" or "step over" (from thread plan completion) instead of "breakpoint", if the user breakpoint happens to be set on the same address.
The part of https://github.com/llvm/llvm-project/commit/f08f5c99262ff9eaa08956334accbb2614b0f7a2 seems to overwrite internal breakpoint detection logic, so that only the last breakpoint for the current stop address is considered.
Together with step-out plans not clearing its breakpoint until they are destrouyed, this creates a situation when there is a user breakpoint set for address, but internal breakpoint makes lldb report a plan completion stop reason instead of breakpoint.
This patch reverts that internal breakpoint detection logic to consider all breakpoints

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D140368
lldb/source/Target/StopInfo.cpp
lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/Makefile [new file with mode: 0644]
lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py [new file with mode: 0644]
lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/main.cpp [new file with mode: 0644]