diff options
author | Greg Clayton <gclayton@apple.com> | 2012-03-15 21:01:31 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-03-15 21:01:31 +0000 |
commit | d804d285567f7833b2fb3d14eceac8dbeaae8f87 (patch) | |
tree | 017767f3324050b5b6b1f9896f7f2f9dfe021eb8 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | |
parent | e7fd58006d5ef235f5922f2613640f159ec61acb (diff) | |
download | bcm5719-llvm-d804d285567f7833b2fb3d14eceac8dbeaae8f87.tar.gz bcm5719-llvm-d804d285567f7833b2fb3d14eceac8dbeaae8f87.zip |
<rdar://problem/8196933>
Use the metadata in the dSYM bundle Info.plist to remap source paths when they keys are available.
llvm-svn: 152836
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index dd84595b412..d084bd26aa1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -14,6 +14,7 @@ #include "lldb/Core/FileSpecList.h" #include "lldb/Core/Log.h" +#include "lldb/Core/Module.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" @@ -467,7 +468,11 @@ DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, dw_offset_t* } bool -DWARFDebugLine::ParseSupportFiles(const DataExtractor& debug_line_data, const char *cu_comp_dir, dw_offset_t stmt_list, FileSpecList &support_files) +DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, + const DataExtractor& debug_line_data, + const char *cu_comp_dir, + dw_offset_t stmt_list, + FileSpecList &support_files) { uint32_t offset = stmt_list + 4; // Skip the total length const char * s; @@ -537,7 +542,12 @@ DWARFDebugLine::ParseSupportFiles(const DataExtractor& debug_line_data, const ch // We don't need to realpath files in the debug_line tables. FileSpec file_spec(fullpath.c_str(), false); - support_files.Append(file_spec); + + FileSpec remapped_file_spec; + if (module_sp->FindSourceFile(file_spec, remapped_file_spec)) + support_files.Append(remapped_file_spec); + else + support_files.Append(file_spec); } } |