[Lldb-commits] [lldb] r334442 - Document how lldb uses the DBGSourcePathRemapping

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 11 14:36:40 PDT 2018


Author: jmolenda
Date: Mon Jun 11 14:36:40 2018
New Revision: 334442

URL: http://llvm.org/viewvc/llvm-project?rev=334442&view=rev
Log:
Document how lldb uses the DBGSourcePathRemapping 
source path remapping src/dest path pairs with
respect to the DBGVersion number in the plist.

Modified:
    lldb/trunk/source/Host/macosx/Symbols.cpp
    lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp

Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=334442&r1=334441&r2=334442&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Mon Jun 11 14:36:40 2018
@@ -340,8 +340,13 @@ static bool GetModuleSpecInfoFromUUIDDic
     std::string DBGBuildSourcePath;
     std::string DBGSourcePath;
 
-    // If DBGVersion value 2 or higher, look for DBGSourcePathRemapping
-    // dictionary and append the key-value pairs to our remappings.
+    // If DBGVersion 1 or DBGVersion missing, ignore DBGSourcePathRemapping.
+    // If DBGVersion 2, strip last two components of path remappings from
+    //                  entries to fix an issue with a specific set of
+    //                  DBGSourcePathRemapping entries that lldb worked
+    //                  with.
+    // If DBGVersion 3, trust & use the source path remappings as-is.
+    //
     cf_dict = (CFDictionaryRef)CFDictionaryGetValue(
         (CFDictionaryRef)uuid_dict, CFSTR("DBGSourcePathRemapping"));
     if (cf_dict && CFGetTypeID(cf_dict) == CFDictionaryGetTypeID()) {

Modified: lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp?rev=334442&r1=334441&r2=334442&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp Mon Jun 11 14:36:40 2018
@@ -192,16 +192,14 @@ SymbolVendorMacOSX::CreateInstance(const
                               ->GetValueForKey("DBGSourcePathRemapping")
                               ->GetAsDictionary()) {
 
-                        // In an early version of DBGSourcePathRemapping, the
-                        // DBGSourcePath values were incorrect.  If we have a
-                        // newer style DBGSourcePathRemapping, there will be a
-                        // DBGVersion key in the plist with version 2 or
-                        // higher.
+                        // If DBGVersion 1 or DBGVersion missing, ignore DBGSourcePathRemapping.
+                        // If DBGVersion 2, strip last two components of path remappings from
+                        //                  entries to fix an issue with a specific set of
+                        //                  DBGSourcePathRemapping entries that lldb worked
+                        //                  with.
+                        // If DBGVersion 3, trust & use the source path remappings as-is.
                         //
-                        // If this is an old style DBGSourcePathRemapping,
-                        // ignore the value half of the key-value remappings
-                        // and use reuse the original gloal DBGSourcePath
-                        // string.
+
                         bool new_style_source_remapping_dictionary = false;
                         bool do_truncate_remapping_names = false;
                         std::string original_DBGSourcePath_value =




More information about the lldb-commits mailing list