diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 07ce8c843dc..e0a5973f854 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -4414,6 +4414,7 @@ SymbolFileDWARF::ParseVariableDIE GetObjectFile()->GetModule()->ReportError ("0x%8.8x: %s has an invalid location: %s", die.GetOffset(), die.GetTagAsCString(), strm.GetString().c_str()); } } + SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); if (location_DW_OP_addr != LLDB_INVALID_ADDRESS) { @@ -4422,9 +4423,6 @@ SymbolFileDWARF::ParseVariableDIE else scope = eValueTypeVariableStatic; - - SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile(); - if (debug_map_symfile) { // When leaving the DWARF in the .o files on darwin, @@ -4502,7 +4500,22 @@ SymbolFileDWARF::ParseVariableDIE if (location_is_const_value_data) scope = eValueTypeVariableStatic; else + { scope = eValueTypeVariableLocal; + if (debug_map_symfile) + { + // We need to check for TLS addresses that we need to fixup + if (location.ContainsThreadLocalStorage()) + { + location.LinkThreadLocalStorage( + debug_map_symfile->GetObjectFile()->GetModule(), + [this, debug_map_symfile](lldb::addr_t unlinked_file_addr) -> lldb::addr_t { + return debug_map_symfile->LinkOSOFileAddress(this, unlinked_file_addr); + }); + scope = eValueTypeVariableThreadLocal; + } + } + } } } |