Dear LLDB enthusiasts,<br><br>I'm wondering if I can use the lldb library/libraries to replace the certain code running on OSX that now returns two lists of symbols-- similar to the output of (dyldinfo -lazy_bind -exports <bundlefile>); i.e. I need to list the symbols imported and exported by a binary shared object or bundle.<br>
<br>My hope was that by using an lldb library, I would be able to use the same client code on OSX as on linux. (The linux version of the code currently uses libbfd and libdld to do the same thing, but the later is getting little love/maintenance).<br>
<br>I'm looking through include/lldb/, as it seems like lldb would need this same info (imported symbol list, and exported symbol list for a Mach-O file) to function, but it's not clear which API to use.  All suggestions/pointers to example code in lldb would be welcome!<br>
<br>Thank you.<br>Jason<br><br># In case it is unclear what dyldinfo does, here is an example: (but I only need the symbol names; not the addresses or segments or sections):<br><br>$ file /tmp/sample_bundle <br>/tmp/sample_bundle: Mach-O 64-bit bundle x86_64<br>
<br>$dyldinfo -lazy_bind -export /tmp/sample_bundle <br><br>lazy binding information (from lazy_bind part of dyld info):<br>segment section          address    index  dylib            symbol<br>__DATA  __la_symbol_ptr  0x00001030 0x0000 flat-namespace   __mm_pop_chunk<br>
__DATA  __la_symbol_ptr  0x00001038 0x0015 flat-namespace   _dh_define<br>export information (from trie):<br>0x000008A0  _C_ipair<br>0x00000920  _init_ipair<br>0x00000BC0  _C_iprot<br>0x00000C40  _C_ipi2<br>0x00000CC0  _C_ipi1<br>
0x00001040  _K_ipair_R43808f40<br>0x00001160  _K_ipi1_R5cb4475d<br>0x00001260  _K_ipi2_R5cb4475d<br>0x00001360  _K_iprot_Rfc8fe739<br>0x00001460  _majver_ipair<br>0x00001464  _minver_ipair<br><br><br>