diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Core/DynamicLoader.cpp | |
parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) |
Notes
Diffstat (limited to 'source/Core/DynamicLoader.cpp')
-rw-r--r-- | source/Core/DynamicLoader.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/source/Core/DynamicLoader.cpp b/source/Core/DynamicLoader.cpp index 16f1ffca1a20..72ee3cfd6d5b 100644 --- a/source/Core/DynamicLoader.cpp +++ b/source/Core/DynamicLoader.cpp @@ -10,22 +10,22 @@ #include "lldb/Target/DynamicLoader.h" #include "lldb/Core/Module.h" -#include "lldb/Core/ModuleList.h" // for ModuleList +#include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" -#include "lldb/Symbol/ObjectFile.h" // for ObjectFile +#include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" -#include "lldb/Utility/ConstString.h" // for ConstString -#include "lldb/lldb-private-interfaces.h" // for DynamicLoaderCreateInstance +#include "lldb/Utility/ConstString.h" +#include "lldb/lldb-private-interfaces.h" -#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/ADT/StringRef.h" -#include <memory> // for shared_ptr, unique_ptr +#include <memory> -#include <assert.h> // for assert +#include <assert.h> using namespace lldb; using namespace lldb_private; @@ -81,7 +81,7 @@ ModuleSP DynamicLoader::GetTargetExecutable() { ModuleSP executable = target.GetExecutableModule(); if (executable) { - if (executable->GetFileSpec().Exists()) { + if (FileSystem::Instance().Exists(executable->GetFileSpec())) { ModuleSpec module_spec(executable->GetFileSpec(), executable->GetArchitecture()); auto module_sp = std::make_shared<Module>(module_spec); @@ -101,8 +101,7 @@ ModuleSP DynamicLoader::GetTargetExecutable() { if (executable.get() != target.GetExecutableModulePointer()) { // Don't load dependent images since we are in dyld where we will // know and find out about all images that are loaded - const bool get_dependent_images = false; - target.SetExecutableModule(executable, get_dependent_images); + target.SetExecutableModule(executable, eLoadDependentsNo); } } } @@ -196,9 +195,8 @@ ModuleSP DynamicLoader::LoadModuleAtAddress(const FileSpec &file, if (error.Success() && memory_info.GetMapped() && memory_info.GetRange().GetRangeBase() == base_addr && !(memory_info.GetName().IsEmpty())) { - ModuleSpec new_module_spec( - FileSpec(memory_info.GetName().AsCString(), false), - target.GetArchitecture()); + ModuleSpec new_module_spec(FileSpec(memory_info.GetName().AsCString()), + target.GetArchitecture()); if ((module_sp = modules.FindFirstModule(new_module_spec))) { UpdateLoadedSections(module_sp, link_map_addr, base_addr, false); |