From d61b076ede88b56f3372a55e7d1eac6a9d717120 Mon Sep 17 00:00:00 2001 From: emaste Date: Mon, 9 Feb 2015 01:44:09 +0000 Subject: Import LLDB as of upstream SVN 228549 (git 39760838) --- source/Core/Module.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'source/Core/Module.cpp') diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp index 900eea2..891bd87 100644 --- a/source/Core/Module.cpp +++ b/source/Core/Module.cpp @@ -152,7 +152,6 @@ Module::Module (const ModuleSpec &module_spec) : m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -257,7 +256,6 @@ Module::Module(const FileSpec& file_spec, m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -304,7 +302,6 @@ Module::Module () : m_did_load_symbol_vendor (false), m_did_parse_uuid (false), m_did_init_ast (false), - m_is_dynamic_loader_module (false), m_file_has_changed (false), m_first_file_changed_log (false) { @@ -1304,10 +1301,14 @@ Module::GetObjectFile() data_offset); if (m_objfile_sp) { - // Once we get the object file, update our module with the object file's + // Once we get the object file, update our module with the object file's // architecture since it might differ in vendor/os if some parts were - // unknown. - m_objfile_sp->GetArchitecture (m_arch); + // unknown. But since the matching arch might already be more specific + // than the generic COFF architecture, only merge in those values that + // overwrite unspecified unknown values. + ArchSpec new_arch; + m_objfile_sp->GetArchitecture(new_arch); + m_arch.MergeFrom(new_arch); } else { @@ -1732,7 +1733,7 @@ Module::PrepareForFunctionNameLookup (const ConstString &name, if (CPPLanguageRuntime::ExtractContextAndIdentifier (name_cstr, context, basename)) lookup_name_type_mask |= (eFunctionNameTypeMethod | eFunctionNameTypeBase); else - lookup_name_type_mask = eFunctionNameTypeFull; + lookup_name_type_mask |= eFunctionNameTypeFull; } else { @@ -1821,3 +1822,13 @@ Module::CreateJITModule (const lldb::ObjectFileJITDelegateSP &delegate_sp) return ModuleSP(); } +bool +Module::GetIsDynamicLinkEditor() +{ + ObjectFile * obj_file = GetObjectFile (); + + if (obj_file) + return obj_file->GetIsDynamicLinkEditor(); + + return false; +} -- cgit v1.1