diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-05-31 16:28:29 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-05-31 16:28:29 +0000 |
commit | f0f53b86d9aff13b245a16cbf6822f356c0e65bc (patch) | |
tree | 8da3baa396279e63180672c9e92b2d8aafa1384c | |
parent | f34d7ecc15d0f081e0dc1b1030bf8fd6c89d1c08 (diff) | |
download | bcm5719-llvm-f0f53b86d9aff13b245a16cbf6822f356c0e65bc.tar.gz bcm5719-llvm-f0f53b86d9aff13b245a16cbf6822f356c0e65bc.zip |
Remove infinite recursion due to FileSpec change.
Fixes infinite recursion due to change in how FileSpec deals with
removing the last path component.
Fixes timout for TestMiniDumpNew.py
llvm-svn: 333666
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index 63d1860e35e..92ad6608888 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -1763,12 +1763,10 @@ PlatformDarwin::FindBundleBinaryInExecSearchPaths (const ModuleSpec &module_spec FileSpec platform_pull_apart(platform_file); std::vector<std::string> path_parts; - ConstString unix_root_dir("/"); - while (true) { + path_parts.push_back( + platform_pull_apart.GetLastPathComponent().AsCString()); + while (platform_pull_apart.RemoveLastPathComponent()) { ConstString part = platform_pull_apart.GetLastPathComponent(); - platform_pull_apart.RemoveLastPathComponent(); - if (part.IsEmpty() || part == unix_root_dir) - break; path_parts.push_back(part.AsCString()); } const size_t path_parts_size = path_parts.size(); |