[Lldb-commits] [lldb] r160963 - /lldb/trunk/source/Host/common/Host.cpp
Filipe Cabecinhas
me at filcab.net
Mon Jul 30 09:46:33 PDT 2012
Author: filcab
Date: Mon Jul 30 11:46:32 2012
New Revision: 160963
URL: http://llvm.org/viewvc/llvm-project?rev=160963&view=rev
Log:
Fixed ePathTypePythonDir for Linux and FreeBSD (at least). This works for non-installed compilations. I will test further.
Modified:
lldb/trunk/source/Host/common/Host.cpp
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=160963&r1=160962&r2=160963&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Mon Jul 30 11:46:32 2012
@@ -992,9 +992,11 @@
case ePathTypePythonDir:
{
// TODO: Anyone know how we can determine this for linux? Other systems?
- // For linux we are currently assuming the location of the lldb
- // binary that contains this function is the directory that will
- // contain lldb.so, lldb.py and embedded_interpreter.py...
+ // For linux and FreeBSD we are currently assuming the
+ // location of the lldb binary that contains this function is
+ // the directory that will contain a python directory which
+ // has our lldb module. This is how files get placed when
+ // compiling with Makefiles.
static ConstString g_lldb_python_dir;
if (!g_lldb_python_dir)
@@ -1013,6 +1015,8 @@
framework_pos += strlen("LLDB.framework");
::strncpy (framework_pos, "/Resources/Python", PATH_MAX - (framework_pos - raw_path));
}
+#else
+ ::strlcat(raw_path, "/python", sizeof(raw_path));
#endif
FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path));
g_lldb_python_dir.SetCString(resolved_path);
More information about the lldb-commits
mailing list