diff options
author | Greg Clayton <gclayton@apple.com> | 2012-03-19 22:22:41 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-03-19 22:22:41 +0000 |
commit | f9be693369134de1307db75310e71476fb76a017 (patch) | |
tree | e9f258106197426e41d0d8ea47a851d7cc5ce7f6 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | |
parent | c4aa60ffe954780976e3cef233a97446659029ba (diff) | |
download | bcm5719-llvm-f9be693369134de1307db75310e71476fb76a017.tar.gz bcm5719-llvm-f9be693369134de1307db75310e71476fb76a017.zip |
<rdar://problem/11072382>
Fixed a case where the source path remappings on the module were too expensive to
use when we try to verify (stat the file system) that the remapped path points to
a valid file. Now we will use the lldb_private::Module path remappings (if any) when
parsing the debug info without verifying that the paths exist so we don't slow down
line table parsing speeds.
llvm-svn: 153059
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index d084bd26aa1..0367f50e94a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -497,6 +497,7 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, break; } std::string fullpath; + std::string remapped_fullpath; while (offset < end_prologue_offset) { const char* path = debug_line_data.GetCStr( &offset ); @@ -509,7 +510,10 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, if (path[0] == '/') { // The path starts with a directory delimiter, so we are done. - fullpath = path; + if (module_sp->RemapSourceFile (path, fullpath)) + support_files.Append(FileSpec (fullpath.c_str(), false)); + else + support_files.Append(FileSpec (path, false)); } else { @@ -538,16 +542,12 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, fullpath += '/'; } fullpath += path; + if (module_sp->RemapSourceFile (fullpath.c_str(), remapped_fullpath)) + support_files.Append(FileSpec (remapped_fullpath.c_str(), false)); + else + support_files.Append(FileSpec (fullpath.c_str(), false)); } - // We don't need to realpath files in the debug_line tables. - FileSpec file_spec(fullpath.c_str(), false); - - 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); } } |