diff options
-rw-r--r-- | lldb/include/lldb/API/SBType.h | 4 | ||||
-rw-r--r-- | lldb/source/API/SBType.cpp | 15 | ||||
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | 48 | ||||
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 6 |
5 files changed, 50 insertions, 31 deletions
diff --git a/lldb/include/lldb/API/SBType.h b/lldb/include/lldb/API/SBType.h index 981f269a95f..14bd35cf05c 100644 --- a/lldb/include/lldb/API/SBType.h +++ b/lldb/include/lldb/API/SBType.h @@ -71,6 +71,10 @@ public: const char* GetName(); + + // DEPRECATED: but needed for Xcode right now + static bool + IsPointerType (void * clang_type); protected: lldb::TypeImplSP m_opaque_sp; diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp index b3ea2485cf6..64c64acb97d 100644 --- a/lldb/source/API/SBType.cpp +++ b/lldb/source/API/SBType.cpp @@ -356,4 +356,17 @@ SBTypeList::GetSize() const SBTypeList::~SBTypeList() { -}
\ No newline at end of file +} + +bool +SBType::IsPointerType (void *opaque_type) +{ + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + + bool ret_value = ClangASTContext::IsPointerType (opaque_type); + + if (log) + log->Printf ("SBType::IsPointerType (opaque_type=%p) ==> '%s'", opaque_type, (ret_value ? "true" : "false")); + + return ret_value; +} diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index 4eec4c866ef..f735e4fa274 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -929,38 +929,39 @@ DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos () if (ReadAllImageInfosStructure ()) { - if (m_dyld_all_image_infos.dylib_info_count > 0) + // Nothing to load or unload? + if (m_dyld_all_image_infos.dylib_info_count == 0) + return true; + + if (m_dyld_all_image_infos.dylib_info_addr == 0) { - if (m_dyld_all_image_infos.dylib_info_addr == 0) - { - // DYLD is updating the images now. So we should say we have no images, and then we'll - // figure it out when we hit the added breakpoint. - return false; - } - else + // DYLD is updating the images now. So we should say we have no images, and then we'll + // figure it out when we hit the added breakpoint. + return false; + } + else + { + if (!AddModulesUsingImageInfosAddress (m_dyld_all_image_infos.dylib_info_addr, + m_dyld_all_image_infos.dylib_info_count)) { - if (!AddModulesUsingImageInfosAddress (m_dyld_all_image_infos.dylib_info_addr, - m_dyld_all_image_infos.dylib_info_count)) - { - DEBUG_PRINTF( "unable to read all data for all_dylib_infos."); - m_dyld_image_infos.clear(); - } + DEBUG_PRINTF( "unable to read all data for all_dylib_infos."); + m_dyld_image_infos.clear(); } } - + // Now we have one more bit of business. If there is a library left in the images for our target that // doesn't have a load address, then it must be something that we were expecting to load (for instance we // read a load command for it) but it didn't in fact load - probably because DYLD_*_PATH pointed // to an equivalent version. We don't want it to stay in the target's module list or it will confuse // us, so unload it here. - Target *target = m_process->CalculateTarget(); - ModuleList &modules = target->GetImages(); + Target &target = m_process->GetTarget(); + ModuleList &modules = target.GetImages(); ModuleList not_loaded_modules; size_t num_modules = modules.GetSize(); - for (size_t i = 0; i < num_modules; i++) + for (size_t i = 1; i < num_modules; i++) { ModuleSP module_sp = modules.GetModuleAtIndex(i); - if (!module_sp->IsLoadedInTarget (target)) + if (!module_sp->IsLoadedInTarget (&target)) { if (log) { @@ -974,9 +975,9 @@ DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos () if (not_loaded_modules.GetSize() != 0) { - target->ModulesDidUnload(not_loaded_modules); + target.ModulesDidUnload(not_loaded_modules); } - + return true; } else @@ -1182,7 +1183,8 @@ DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(DYLDImageInfo::co if (exe_idx < image_infos.size()) { - ModuleSP exe_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[exe_idx], false, NULL)); + const bool can_create = true; + ModuleSP exe_module_sp (FindTargetModuleForDYLDImageInfo (image_infos[exe_idx], can_create, NULL)); if (!exe_module_sp) { @@ -1198,7 +1200,7 @@ DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(DYLDImageInfo::co { // Don't load dependent images since we are in dyld where we will know // and find out about all images that are loaded - bool get_dependent_images = false; + const bool get_dependent_images = false; m_process->GetTarget().SetExecutableModule (exe_module_sp, get_dependent_images); } diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp index 1bcbbddb9f4..2b83156e759 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -441,8 +441,13 @@ PlatformRemoteiOS::GetSharedModule (const FileSpec &platform_file, error = GetFile (platform_file, uuid_ptr, local_file); if (error.Success()) { + + error = ResolveExecutable (local_file, arch, module_sp); + } + else + { const bool always_create = false; - error = ModuleList::GetSharedModule (local_file, + error = ModuleList::GetSharedModule (platform_file, arch, uuid_ptr, object_name_ptr, @@ -451,6 +456,7 @@ PlatformRemoteiOS::GetSharedModule (const FileSpec &platform_file, old_module_sp_ptr, did_create_ptr, always_create); + } if (module_sp) module_sp->SetPlatformFileSpec(platform_file); diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 6915f7c94b7..8755a437aee 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -413,12 +413,6 @@ ClangASTContext::SetTargetTriple (const char *target_triple) { Clear(); m_target_triple.assign(target_triple); - if (m_target_triple.find("armv7s") == 0) - m_target_triple.erase(5,1); - else if (m_target_triple.find("armv7f") == 0) - m_target_triple.erase(5,1); - else if (m_target_triple.find("armv7k") == 0) - m_target_triple.erase(5,1); } void |