print-lldb-path
authorGianfranco Costamagna <locutusofborg@debian.org>
Sat, 7 Nov 2020 14:53:51 +0000 (14:53 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 7 Nov 2020 14:53:51 +0000 (14:53 +0000)
Last-Update: 2020-01-21

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

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

index 9f56b4fa60a50a83c9a6558d897faa78712dbcf7..0a287725af14c8e1c554be9e9e1189849da9b6d1 100644 (file)
@@ -365,6 +365,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(),