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

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 11 08:25:35 PDT 2025


JDevlieghere wrote:

> I was thinking a bit more about the `Destroy` method, which I was not too too happy with, and thought about just changing it to be a "Resume" method. Something like the below, what do you think?

I see the appeal, but I think it's too specialized. IMHO, conceptually, resuming the process isn't the execution context's business. It also seems like it should be possible to query the target (but probably not the process) while holding the API lock, but after giving up the stop lock. 

Maybe a better name would be `Release`. The `StoppedExecutionContext` is an RAII object with "Stopped" in the name. It seems fairly obvious that the stopped part is what goes away when you destroy/release the object. Maybe a Doxygen comment explaining why you get the API lock back but not the stop lock would address your concerns? 

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


More information about the lldb-commits mailing list