<div dir="ltr">Hi All,<div><br></div><div>We are trying to keep the size of lldb-server as small as possible as it have to be copied over to the android device for every debug session. The way we currently achieve this is by using linker garbage collection to get rid of the unused code.</div><div><br></div><div>In the log term it would be nice to be more explicit about the list of dependencies but currently we don't have clear enough boundaries for doing that. Pavel and Zachary spent some time on improving it but I think we are still quite far from that.</div><div><br></div>For your problem I think a better short term option would be to add LLVMRuntimeDyld as a dependency for lldbExpression instead of lldb-server directly (assuming it works). Optionally if you are feeling more adventurous you can try to replace ${LLDB_PLUGINS} and ${LLDB_SYSTEM_LIBS} with a more explicit list of dependencies what might remove the dependency between lldb-server and LLVMRuntimeDyld but I am not certain.<div><br></div><div>Tamas</div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 28, 2017 at 6:00 PM Greg Clayton via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If we are pulling in the expression parser, that would explain our issues. If this currently happens in lldb-server we need to add LLVMRuntimeDyld to the link libraries. I know some people at Google have looked into getting lldb-server to link against as little as possible, and maybe this is just how things are for the time being. We should verify that. It would be nice if lldb-server didn't link against the expression parser if possible.</div><div style="word-wrap:break-word"><div><br></div><div>Greg</div></div><div style="word-wrap:break-word"><div><br><div><blockquote type="cite"><div>On Aug 28, 2017, at 9:56 AM, Peeter Joot <<a href="mailto:peeterjoot@protonmail.com" target="_blank">peeterjoot@protonmail.com</a>> wrote:</div><br class="m_-5754156793404775720m_-5207532858967459322Apple-interchange-newline"><div><div>Hi Greg,<br></div><div><br></div><div>IRExecutionUnit.cpp looks like the origin of at least some of the undefined symbols:<br></div><div><br></div><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">.../llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h:61: undefined reference to `vtable for llvm::RTDyldMemoryManager' <span class="m_-5754156793404775720m_-5207532858967459322Apple-converted-space">                                                 </span></span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">.../llvm/include/llvm/ExecutionEngine/JITSymbol.h:223: undefined reference to `vtable for llvm::JITSymbolResolver'<span class="m_-5754156793404775720m_-5207532858967459322Apple-converted-space">                                                             </span></span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">.../llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:96: undefined reference to `vtable for llvm::RuntimeDyld::MemoryManager'<span class="m_-5754156793404775720m_-5207532858967459322Apple-converted-space">                                                   </span></span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">lib/liblldbExpression.a(IRExecutionUnit.cpp.o):(.<a href="http://data.rel.ro" target="_blank">data.rel.ro</a>+0x90): undefined reference to `llvm::RTDyldMemoryManager::deregisterEHFrames()'</span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">lib/liblldbExpression.a(IRExecutionUnit.cpp.o):(.<a href="http://data.rel.ro" target="_blank">data.rel.ro</a>+0xa8): undefined reference to `llvm::RuntimeDyld::MemoryManager::anchor()'</span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">lib/liblldbExpression.a(IRExecutionUnit.cpp.o):(.<a href="http://data.rel.ro" target="_blank">data.rel.ro</a>+0x118): undefined reference to `llvm::JITSymbolResolver::anchor()'</span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">lib/liblldbExpression.a(IRExecutionUnit.cpp.o):(.data.rel.ro._ZTVN4llvm18MCJITMemoryManagerE[_ZTVN4llvm18MCJITMemoryManagerE]+0x60): undefined reference to `llvm::RuntimeDyld:</span><br></p><p class="m_-5754156793404775720m_-5207532858967459322p1"><span class="m_-5754156793404775720m_-5207532858967459322s1">:MemoryManager::anchor()'</span><br></p><div><br></div><div><span class="m_-5754156793404775720m_-5207532858967459322s1">there are a couple of undefined vtable references in headers (also above), but it's not clear to me if these also neccessarily come from IRExectionUnix.cpp.</span><br></div><div><br></div><div class="m_-5754156793404775720m_-5207532858967459322protonmail_signature_block"><div class="m_-5754156793404775720m_-5207532858967459322protonmail_signature_block-user"><div>--<br></div><div>Peeter<br></div></div><div class="m_-5754156793404775720m_-5207532858967459322protonmail_signature_block-proton m_-5754156793404775720m_-5207532858967459322protonmail_signature_block-empty"><br></div></div><div><br></div></div></blockquote></div><br></div></div>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div></div></div>