print-lldb-path
authorGianfranco Costamagna <locutusofborg@debian.org>
Sun, 1 Jan 2023 14:42:15 +0000 (14:42 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 1 Jan 2023 14:42:15 +0000 (14:42 +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 1bf647e4acfc67a4d3a4cf1817ea6913632478e9..49e49685f5494687863e605eaf73cf99b2770dcf 100644 (file)
@@ -264,6 +264,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(),