[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)
Aleksandr Korepanov via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 24 02:59:13 PDT 2024
AlexK0 wrote:
> Anyway, tl;dr, I believe this will fix it:
>
> ```
> --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
> +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
> @@ -442,6 +442,7 @@ void ProcessWindows::RefreshStateAfterStop() {
> m_session_data->m_debugger->GetProcess().GetProcessId(), pc,
> site->GetID());
>
> + stop_thread->SetThreadHitBreakpointAtAddr(pc);
> if (site->ValidForThisThread(*stop_thread)) {
> LLDB_LOG(log,
> "Breakpoint site {0} is valid for this thread ({1:x}), "
> ```
>
> I'll push it right now. Sorry for my confusion, and thanks again for looking at it, this was a big help.
@jasonmolenda unfortunately, the test still fails :(
I did a little investigation, here is a possible patch that fixes the test:
```
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 231b22f5f189..fb0404f1c4b9 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -382,7 +382,7 @@ void ProcessWindows::RefreshStateAfterStop() {
RegisterContextSP register_context = stop_thread->GetRegisterContext();
const uint64_t pc = register_context->GetPC();
BreakpointSiteSP site(GetBreakpointSiteList().FindByAddress(pc));
- if (site)
+ if (site && site->ValidForThisThread(*stop_thread))
stop_thread->SetThreadStoppedAtBreakpointSite(pc);
auto *reg_ctx = static_cast<RegisterContextWindows *>(
stop_thread->GetRegisterContext().get());
```
https://github.com/llvm/llvm-project/pull/96260
More information about the lldb-commits
mailing list