print-lldb-path
authorGianfranco Costamagna <locutusofborg@debian.org>
Wed, 30 Nov 2022 15:15:42 +0000 (15:15 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Wed, 30 Nov 2022 15:15:42 +0000 (15:15 +0000)
Last-Update: 2020-01-21

Gbp-Pq: Topic lldb
Gbp-Pq: Name print-lldb-path.patch

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

index a21adcfbdbd6035380b9b785d8cecf59610f5330..05cdfb137548af092ffe370fcce4230be9fa0670 100644 (file)
@@ -239,6 +239,8 @@ void ScriptInterpreterPython::ComputePythonDir(
   // x86_64, or bin on Windows).
   llvm::sys::path::remove_filename(path);
   llvm::sys::path::append(path, LLDB_PYTHON_RELATIVE_LIBDIR);
+  // remove double "lib/lib" statement
+  std::replace(path.begin(), path.end(), '/lib/lib/', '/lib/');
 
 #if defined(_WIN32)
   // This will be injected directly through FileSpec.GetDirectory().SetString(),