diff options
| author | Tamas Berghammer <tberghammer@google.com> | 2015-09-04 12:42:41 +0000 |
|---|---|---|
| committer | Tamas Berghammer <tberghammer@google.com> | 2015-09-04 12:42:41 +0000 |
| commit | 980662ee9db3bbbe851e4e458e2ce71f9be649f6 (patch) | |
| tree | 1e95a5c709a2a073cbd8ac7ccc5442720336201f | |
| parent | a67b2d01174208f63378fd4734791d5c35a79752 (diff) | |
| download | bcm5719-llvm-980662ee9db3bbbe851e4e458e2ce71f9be649f6.tar.gz bcm5719-llvm-980662ee9db3bbbe851e4e458e2ce71f9be649f6.zip | |
Fix TestLoadUnload.test_load_unload for android API > 21
* Change Module::MatchesModuleSpec to return true in case the file spec
in the specified module spec matches with the platform file spec, but
not with the local file spec
* Change the module_resolver used when resolving a remote shared module
to always set the platform file spec to the file spec requested
Differential revision: http://reviews.llvm.org/D12601
llvm-svn: 246852
| -rw-r--r-- | lldb/source/Core/Module.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Target/Platform.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 18ade8500f9..2fbc5e7af16 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1708,7 +1708,8 @@ Module::MatchesModuleSpec (const ModuleSpec &module_ref) const FileSpec &file_spec = module_ref.GetFileSpec(); if (file_spec) { - if (!FileSpec::Equal (file_spec, m_file, (bool)file_spec.GetDirectory())) + if (!FileSpec::Equal (file_spec, m_file, (bool)file_spec.GetDirectory()) && + !FileSpec::Equal (file_spec, m_platform_file, (bool)file_spec.GetDirectory())) return false; } diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index e47c6f36b43..4e07a16044c 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -272,8 +272,11 @@ Platform::GetSharedModule (const ModuleSpec &module_spec, module_sp, [&](const ModuleSpec &spec) { - return ModuleList::GetSharedModule ( + Error error = ModuleList::GetSharedModule ( spec, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr, false); + if (error.Success() && module_sp) + module_sp->SetPlatformFileSpec(spec.GetFileSpec()); + return error; }, did_create_ptr); } |

