[Lldb-commits] [PATCH] D61090: [SBHostOS} Remove getting the python script interpreter path
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 24 16:47:27 PDT 2019
JDevlieghere added a comment.
In D61090#1477912 <https://reviews.llvm.org/D61090#1477912>, @jingham wrote:
> It seems weird to be getting the ScriptInterpreter's ScriptModuleDirectory from the CommandInterpreter. I would have expected:
>
> m_debugger.GetScriptInterpreter().GetScriptModuleDirectory()
>
> I don't think there's any reason to have the Command Interpreter know which ScriptInterpreter is being used, so entangling them like this is awkward.
>
> Am I missing some reason why it makes sense to do this on the CommandInterpreter?
The debugger doesn't know about the script interpreter. The command interpreter is the class that creates it and is in charge of its lifetime. The script interpreter also keeps a reference to the command interpreter, so they're already entangled. The change here just mirrors the relationship as it is in the non-SB variants of the classes.
That being said, I agree that it would be better to not have them entangled. I'll spend some time trying to figure out if we can clean this up, before changing the SB API.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61090/new/
https://reviews.llvm.org/D61090
More information about the lldb-commits
mailing list