[Lldb-commits] [lldb] r167248 - in /lldb/branches/windows/source: Host/common/FileSpec.cpp Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp

Carlo Kok ck at remobjects.com
Thu Nov 1 12:52:43 PDT 2012


Author: carlokok
Date: Thu Nov  1 14:52:43 2012
New Revision: 167248

URL: http://llvm.org/viewvc/llvm-project?rev=167248&view=rev
Log:
"is rooted" check in DWARFDebugLine.cpp now supports windows too
reverted: change in filespec from a month ago that shouldn't have gone in.

Modified:
    lldb/branches/windows/source/Host/common/FileSpec.cpp
    lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp

Modified: lldb/branches/windows/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/FileSpec.cpp?rev=167248&r1=167247&r2=167248&view=diff
==============================================================================
--- lldb/branches/windows/source/Host/common/FileSpec.cpp (original)
+++ lldb/branches/windows/source/Host/common/FileSpec.cpp Thu Nov  1 14:52:43 2012
@@ -1013,7 +1013,7 @@
     ConstString extension (GetFileNameExtension());
     if (extension)
     {
-        static RegularExpression g_source_file_regex ("^(c|m|mm|cpp|c\\+\\+|cxx|cc|cp|s|asm|f|f77|f90|f95|f03|for|ftn|fpp|ada|adb|ads|pas)$",
+        static RegularExpression g_source_file_regex ("^(c|m|mm|cpp|c\\+\\+|cxx|cc|cp|s|asm|f|f77|f90|f95|f03|for|ftn|fpp|ada|adb|ads)$",
                                                       llvm::Regex::IgnoreCase);
         return g_source_file_regex.Execute (extension.GetCString());
     }

Modified: lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=167248&r1=167247&r2=167248&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Thu Nov  1 14:52:43 2012
@@ -507,7 +507,8 @@
             debug_line_data.Skip_LEB128(&offset); // Skip mod_time
             debug_line_data.Skip_LEB128(&offset); // Skip length
 
-            if (path[0] == '/')
+            if (path[0] == '/' ||
+                (path[0] && path[1] == ':' && path[2] == '\\'))
             {
                 // The path starts with a directory delimiter, so we are done.
                 if (module_sp->RemapSourceFile (path, fullpath))
@@ -519,7 +520,11 @@
             {
                 if (dir_idx > 0 && dir_idx < include_directories.size())
                 {
-                    if (cu_comp_dir && include_directories[dir_idx][0] != '/')
+                    std::string includedir = include_directories[dir_idx];
+                    bool rooted = (includedir[0] == '/') || 
+                        (includedir.size() > 2 && includedir[1] == ':' && includedir[2] == '\\');
+
+                    if (cu_comp_dir && !rooted)
                     {
                         fullpath = cu_comp_dir;
 





More information about the lldb-commits mailing list