[Lldb-commits] [lldb] r264821 - Don't register the addresses of private symbols from expressions.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 29 20:44:51 PDT 2016


Author: spyffe
Date: Tue Mar 29 22:44:51 2016
New Revision: 264821

URL: http://llvm.org/viewvc/llvm-project?rev=264821&view=rev
Log:
Don't register the addresses of private symbols from expressions.

They're not supposed to go in the symbol table, and in fact the way the JIT
is currently implemented it sometimes crashes when you try to get the
address of such a function.  So we skip them.

Modified:
    lldb/trunk/source/Expression/IRExecutionUnit.cpp

Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=264821&r1=264820&r2=264821&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Mar 29 22:44:51 2016
@@ -344,7 +344,7 @@ IRExecutionUnit::GetRunnableInfo(Error &
 
     for (llvm::Function &function : *m_module)
     {
-        if (function.isDeclaration())
+        if (function.isDeclaration() || function.hasPrivateLinkage())
             continue;
         
         const bool external = function.hasExternalLinkage() || function.hasLinkOnceODRLinkage();




More information about the lldb-commits mailing list