asavonic wrote:

@jimingham, thanks a lot for the explanation! I think `MemoryPressureDetected` 
is a better solution than what I was trying to do originally. 

> I'd suggest adding another API like `RemoveAllSharedModules` that ignores 
> reference count - but that API should only ever be called from 
> Debugger::Terminate.

I almost prepared a patch to add that, but tests highlighted another problem - 
there seems to be no way to recover from `Debugger::Terminate` and 
re-initialize. Initialization fails because Terminate leaves global pointers as 
non-zero and we get `Debugger::Initialize called more than once!`. Without a 
way to re-initialize, this dance around modules in Terminate makes even less 
sense. I think we can drop this patch, I don't see a practical reason to do it.

Thank you @jimingham and @JDevlieghere for your guidance here.

https://github.com/llvm/llvm-project/pull/147289
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to