[Lldb-commits] [lldb] [lldb][windows] print an error if Python fails to initialize (PR #181160)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 16 17:57:11 PST 2026


https://github.com/medismailben commented:

That's not really what I had in mind in my last comment. I wanted to move the logic from the InitializePythonRAII constructor onto a method that could return an `llvm::Error` (apologies for the typo in my last comment) to propagate the error cleanly, not call `llvm::report_fatal_error` which would cause us to abort.

I can see how in the current design this wouldn't be possible since this is called when the ScriptInterpreterPython is initialized, which is at launch ... that's why I thinking may be we could make the scripted interpreter initialization lazy: we wouldn't call Initialize until the user runs the `script` command or loads a scripting resource, so the user can still use lldb **without** python support. This doesn't have to be done as part of this PR but I'm wondering that'd help out with your problem. 

cc. @JDevlieghere

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


More information about the lldb-commits mailing list