[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 5 11:32:28 PDT 2025


================
@@ -139,19 +140,19 @@ SBModule SBFrame::GetModule() const {
   SBModule sb_module;
   ModuleSP module_sp;
   std::unique_lock<std::recursive_mutex> lock;
-  ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
+  Process::StopLocker stop_locker;
+  ExecutionContext exe_ctx(m_opaque_sp.get(), lock, stop_locker);
+  if (!stop_locker.IsLocked())
----------------
felipepiovezan wrote:

Yeah, as we discussed offline, there is a opportunity for a big simplification pass later to cleanup all of those redundant checks.

https://github.com/llvm/llvm-project/pull/152020


More information about the lldb-commits mailing list