[Lldb-commits] [lldb] r364980 - Fix for r364686 - actually set symbol_is_missing_weak...

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 2 16:38:08 PDT 2019


Author: jingham
Date: Tue Jul  2 16:38:07 2019
New Revision: 364980

URL: http://llvm.org/viewvc/llvm-project?rev=364980&view=rev
Log:
Fix for r364686 - actually set symbol_is_missing_weak...

This was set in a std::function, but I was shadowing a
variable that I thought I was capturing.  Even with this bug
we were correctly not raising an error and returning an address
of 0x0.  We were not marking the symbol as weak, but apparently
the JIT didn't need that, so the test still passed.

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=364980&r1=364979&r2=364980&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Jul  2 16:38:07 2019
@@ -791,7 +791,8 @@ lldb::addr_t IRExecutionUnit::FindInSymb
 
     std::function<bool(lldb::addr_t &, SymbolContextList &,
                        const lldb_private::SymbolContext &)>
-        get_external_load_address = [&best_internal_load_address, target](
+        get_external_load_address = [&best_internal_load_address, target,
+                                     &symbol_was_missing_weak](
             lldb::addr_t &load_address, SymbolContextList &sc_list,
             const lldb_private::SymbolContext &sc) -> lldb::addr_t {
       load_address = LLDB_INVALID_ADDRESS;
@@ -801,7 +802,7 @@ lldb::addr_t IRExecutionUnit::FindInSymb
 
       // missing_weak_symbol will be true only if we found only weak undefined 
       // references to this symbol.
-      bool symbol_was_missing_weak = true;      
+      symbol_was_missing_weak = true;      
       for (auto candidate_sc : sc_list.SymbolContexts()) {        
         // Only symbols can be weak undefined:
         if (!candidate_sc.symbol)




More information about the lldb-commits mailing list