Use LC_DYLD_EXPORTS_TRIE to locate the dyld trie structure if present
authorJim Ingham <jingham@apple.com>
Fri, 6 Aug 2021 23:36:25 +0000 (16:36 -0700)
committerJim Ingham <jingham@apple.com>
Fri, 6 Aug 2021 23:38:34 +0000 (16:38 -0700)
commitbfeb281fbd8e348edfadf5052e9266e13b832171
tree2a8055867f14164a5aec2b2a424ab7e4c1541c2d
parent0b8cb87e0d6b092a9c94f9cc0f16e56e954eddfd
Use LC_DYLD_EXPORTS_TRIE to locate the dyld trie structure if present

The pointer to the dyld trie data structure which lldb needs to parse to get
"trampoline kinds" on Darwin used to be a field in the LC_DYLD_INFO load command. A
new load command was added recently dedicated to this purpose: LC_DYLD_EXPORTS_TRIE.
The format of the trie did not change, however. So all we have to do is use the new
command if present. The commands are supposed to be mutually exclusive, so I added
an lldb_assert to warn if they are not.

Differential Revision: https://reviews.llvm.org/D107673
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp