[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
Thu Feb 12 09:54:53 PST 2026
================
@@ -120,14 +120,30 @@ struct InitializePythonRAII {
return spec.GetPath();
}();
if (!g_python_home.empty()) {
- PyConfig_SetBytesString(&config, &config.home, g_python_home.c_str());
+ PyStatus py_status =
+ PyConfig_SetBytesString(&config, &config.home, g_python_home.c_str());
+ if (py_status._type == PyStatus::_PyStatus_TYPE_ERROR) {
+ PyConfig_Clear(&config);
+ llvm::WithColor::error() << "Failed to set the Python config: '"
----------------
medismailben wrote:
Do we have to do this in the constructor ? Can we move this into a function returning an SBError may be ?
https://github.com/llvm/llvm-project/pull/181160
More information about the lldb-commits
mailing list