[Lldb-commits] [lldb] Handle stepping through "lazy library" stubs (PR #225238)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 22 14:05:36 PDT 2026
================
@@ -0,0 +1,147 @@
+//===-- ThreadPlanRunToBreakpoint.cpp
+//----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/ThreadPlanRunToBreakpoint.h"
+#include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Utility/LLDBLog.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/Stream.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+// ThreadPlanRunToBreakpoint: Use this plan to run to a breakpoint.
+
+ThreadPlanRunToBreakpoint::ThreadPlanRunToBreakpoint(Thread &thread,
+ BreakpointSP bkpt_sp,
+ bool stop_others)
+ : ThreadPlan(ThreadPlan::eKindRunToBreakpoint, "Run to breakpoint plan",
+ thread, eVoteNoOpinion, eVoteNoOpinion),
+ m_stop_others(stop_others) {
+ if (bkpt_sp)
+ m_breakpoints.push_back(std::move(bkpt_sp));
+}
+
+ThreadPlanRunToBreakpoint::ThreadPlanRunToBreakpoint(
+ Thread &thread, const std::vector<BreakpointSP> &breakpoints,
+ bool stop_others)
+ : ThreadPlan(ThreadPlan::eKindRunToBreakpoint, "Run to breakpoint plan",
+ thread, eVoteNoOpinion, eVoteNoOpinion),
+ m_stop_others(stop_others) {
+ for (auto bkpt_sp : breakpoints) {
+ // Make the breakpoints thread specific:
+ if (bkpt_sp) {
+ bkpt_sp->SetThreadID(thread.GetID());
+ m_breakpoints.push_back(bkpt_sp);
+ }
+ }
+}
+
+ThreadPlanRunToBreakpoint::~ThreadPlanRunToBreakpoint() {
+ for (auto bkpt_sp : m_breakpoints)
+ GetTarget().RemoveBreakpointByID(bkpt_sp->GetID());
+ m_breakpoints.clear();
----------------
jimingham wrote:
Nope
https://github.com/llvm/llvm-project/pull/225238
More information about the lldb-commits
mailing list