[Lldb-commits] [PATCH] D140066: Add a final fallback technique to the old Darwin dynamic loader plugin to find the dyld_all_image_infos structure
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 6 10:46:50 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG75d268d1fa60: When loading mach-o corefile, new fallback for finding images (authored by jasonmolenda).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140066/new/
https://reviews.llvm.org/D140066
Files:
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
Index: lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
===================================================================
--- lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -277,6 +277,16 @@
m_dyld_all_image_infos_addr = symbol->GetLoadAddress(&target);
}
+ if (m_dyld_all_image_infos_addr == LLDB_INVALID_ADDRESS) {
+ ConstString g_sect_name("__all_image_info");
+ SectionSP dyld_aii_section_sp =
+ dyld_module_sp->GetSectionList()->FindSectionByName(g_sect_name);
+ if (dyld_aii_section_sp) {
+ Address dyld_aii_addr(dyld_aii_section_sp, 0);
+ m_dyld_all_image_infos_addr = dyld_aii_addr.GetLoadAddress(&target);
+ }
+ }
+
// Update all image infos
InitializeFromAllImageInfos();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140066.486935.patch
Type: text/x-patch
Size: 920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230106/1903c896/attachment.bin>
More information about the lldb-commits
mailing list