[Lldb-commits] [PATCH] D93926: [lldb] Don't remove the lldb.debugger var after exiting the interpreter

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 7 10:36:38 PST 2021


JDevlieghere added a comment.

In D93926#2481929 <https://reviews.llvm.org/D93926#2481929>, @labath wrote:

> In D93926#2479749 <https://reviews.llvm.org/D93926#2479749>, @JDevlieghere wrote:
>
>> Your argument is correct because the interactive script interpreter always belongs to a single debugger.
>
> I'm not sure that even this is true (for python, anyway). IIUC all SBDebuggers share the same python interpreter (because python does not allow the creation of completely independent python contexts). We do some trickery to make it it appear as if these were independent, but I am not sure the trickery extends to the `lldb` module...

It depends on your definition of Python interpreter. The `Debugger` owns the `ScriptInterpreterSP` which is what would decide which debugger to put in the convenience variable, but you're right that they all share the same "python instance" under the hood.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93926/new/

https://reviews.llvm.org/D93926



More information about the lldb-commits mailing list