)]}' { "commit": "a7c03d5d6453b91eae35409c99658d48f661c387", "tree": "b7df73fcba19b6ddf34997cd7d85f35aef03ed0f", "parents": [ "09282f9b99c98603956ceb00e29129a32d6a7ba7" ], "author": { "name": "Pavel Labath", "email": "pavel@labath.sk", "time": "Mon Feb 15 21:51:32 2021 +0100" }, "committer": { "name": "Copybara-Service", "email": "copybara-worker@google.com", "time": "Fri Feb 19 01:15:55 2021 -0800" }, "message": "[lldb] Fix shared library directory computation on windows\n\nOur code for locating the shared library directory works via dladdr (or\nthe windows equivalent) to locate the path of an address known to reside\nin liblldb. This works great for C++ programs, but there\u0027s a catch.\n\nWhen (lib)lldb is used from python (like in our test suite), this dladdr\ncall will return a path to the _lldb.so (or such) file in the python\ndirectory. To compensate for this, we have code which attempts to\nresolve this symlink, to ensure we get the canonical location. However,\nhere\u0027s the second catch.\n\nOn windows, this file is not a symlink (but a copy), so this logic\nfails. Since most of our other paths are derived from the liblldb\nlocation, all of these paths will be wrong, when running the test suite.\nOne effect of this was the failure to find lldb-server in D96202.\n\nTo fix this issue, I add some windows-specific code to locate the\nliblldb directory. Since it cannot rely on symlinks, it works by\nmanually walking the directory tree -- essentially doing the opposite of\nwhat we do when computing the python directory.\n\nTo avoid python leaking back into the host code, I implement this with\nthe help of a callback which can be passed to HostInfo::Initialize in\norder to assist with the directory location. The callback lives inside\nthe python plugin.\n\nI also strenghten the existing path test to ensure the returned path is\nthe right one.\n\nDifferential Revision: https://reviews.llvm.org/D96779\n\nGitOrigin-RevId: 004a264f8c923922ecd34255bcb10f4adaa27ac5\n", "tree_diff": [ { "type": "modify", "old_id": "15bb168aad97f0d1de4c856ddbc2363024adec92", "old_mode": 33188, "old_path": "include/lldb/Host/HostInfoBase.h", "new_id": "b4fbd88c9304404d69c85146432442c90a421b39", "new_mode": 33188, "new_path": "include/lldb/Host/HostInfoBase.h" }, { "type": "modify", "old_id": "b1c7f9c805bfc10fa782d56b110095500456fb03", "old_mode": 33188, "old_path": "include/lldb/Host/linux/HostInfoLinux.h", "new_id": "e8080033cd8f8f940826824406183fefa14b8b23", "new_mode": 33188, "new_path": "include/lldb/Host/linux/HostInfoLinux.h" }, { "type": "modify", "old_id": "209d9da082149444a212cfd3b2e832070358bc0e", "old_mode": 33188, "old_path": "include/lldb/Host/windows/HostInfoWindows.h", "new_id": "400a3f4649bddce9b0af6c667815497f22211987", "new_mode": 33188, "new_path": "include/lldb/Host/windows/HostInfoWindows.h" }, { "type": "modify", "old_id": "3a5081680879a7c031451fe409a0318ea9e0adf1", "old_mode": 33188, "old_path": "include/lldb/Initialization/SystemInitializerCommon.h", "new_id": "d918b1125a570503df201c3da71b1c74ea79896a", "new_mode": 33188, "new_path": "include/lldb/Initialization/SystemInitializerCommon.h" }, { "type": "modify", "old_id": "0530f94580b3e2921786487ef88aa5a61ae1da32", "old_mode": 33188, "old_path": "source/API/SystemInitializerFull.cpp", "new_id": "bac55f647c5d7734073ddd5c5bb399c8ab7536b0", "new_mode": 33188, "new_path": "source/API/SystemInitializerFull.cpp" }, { "type": "modify", "old_id": "333137a7fd25c1e58f2aa30e777178a5010e90c1", "old_mode": 33188, "old_path": "source/Host/common/HostInfoBase.cpp", "new_id": "d923a40cab3bb82bb0dc78f367df5e17bf3f5f6b", "new_mode": 33188, "new_path": "source/Host/common/HostInfoBase.cpp" }, { "type": "modify", "old_id": "a35e5ef9e9703cd9a136d2d9a15cf222b420826f", "old_mode": 33188, "old_path": "source/Host/linux/HostInfoLinux.cpp", "new_id": "9e8a00f4fac1b54d4f375d860ed5eaedff8aac7e", "new_mode": 33188, "new_path": "source/Host/linux/HostInfoLinux.cpp" }, { "type": "modify", "old_id": "ba170b68bbcddc507afff2a4157624084a5c5281", "old_mode": 33188, "old_path": "source/Host/windows/HostInfoWindows.cpp", "new_id": "54a07b71b2cdf375506d1a43b5a4adf2340fe841", "new_mode": 33188, "new_path": "source/Host/windows/HostInfoWindows.cpp" }, { "type": "modify", "old_id": "d9f69f57703c7b19aab6f04cf702930537ff7506", "old_mode": 33188, "old_path": "source/Initialization/SystemInitializerCommon.cpp", "new_id": "004fdb120682a293448c2fc8d09e8172f8418e28", "new_mode": 33188, "new_path": "source/Initialization/SystemInitializerCommon.cpp" }, { "type": "modify", "old_id": "c2fd1f266f07d16f526e5ed7b9ce5a9b3f78c66c", "old_mode": 33188, "old_path": "source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp", "new_id": "68409b7249051434a113d13a3370067cebff1b6a", "new_mode": 33188, "new_path": "source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp" }, { "type": "modify", "old_id": "e59fedbd0971f48b60553ca6baee0394182ca4a2", "old_mode": 33188, "old_path": "source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h", "new_id": "5a75c0a655e58dd7812e9f3b0e56993840e74b08", "new_mode": 33188, "new_path": "source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h" }, { "type": "modify", "old_id": "5c21622d03d808f28db6de459d62fb154d813f90", "old_mode": 33188, "old_path": "test/API/functionalities/paths/TestPaths.py", "new_id": "8ef20c54974b651834e8e0b722c416145c11603a", "new_mode": 33188, "new_path": "test/API/functionalities/paths/TestPaths.py" }, { "type": "modify", "old_id": "f3d015e94f8c06952c63b4aecd9e748f3213ba22", "old_mode": 33188, "old_path": "tools/lldb-server/SystemInitializerLLGS.h", "new_id": "4469a8ba5f60abb4d34d2a88883b448cd666204b", "new_mode": 33188, "new_path": "tools/lldb-server/SystemInitializerLLGS.h" }, { "type": "modify", "old_id": "2f6eb8e21a21b20afb4663c2db5daf9c703ad6a8", "old_mode": 33188, "old_path": "tools/lldb-test/SystemInitializerTest.cpp", "new_id": "2b6e0f26bb491fd758890c99f1403b651fcf59e7", "new_mode": 33188, "new_path": "tools/lldb-test/SystemInitializerTest.cpp" } ] }