[Lldb-commits] [lldb] r131934 - /lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Greg Clayton gclayton at apple.com
Mon May 23 16:14:34 PDT 2011


Author: gclayton
Date: Mon May 23 18:14:34 2011
New Revision: 131934

URL: http://llvm.org/viewvc/llvm-project?rev=131934&view=rev
Log:
Don't resolve the path when we extract the path from the dyld info or we
can end up with an invalid path if the path resolves to something different
on the local machine. It is very important not to since remote debugging will
mention paths that might exist on the current machine (like 
"/System/Library/Frameworks/CoreFoundation/CoreFoundation" which on the desktop
systems is a symlink to "/System/Library/Frameworks/CoreFoundation/Versions/A/CoreFoundation").

We will let the platform plug-ins resolve the paths in a later stage.


Modified:
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=131934&r1=131933&r2=131934&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Mon May 23 18:14:34 2011
@@ -607,10 +607,9 @@
 
                         char raw_path[PATH_MAX];
                         m_process->ReadCStringFromMemory (path_addr, raw_path, sizeof(raw_path));
-                        char raw_path2[PATH_MAX];// TODO: remove after assertion doesn't assert
-                        m_process->ReadMemory (path_addr, raw_path2, sizeof(raw_path2), error);// TODO: remove after assertion doesn't assert
-                        assert (strcmp (raw_path, raw_path2) == 0);// TODO: remove after assertion doesn't assert
-                        m_dyld_image_infos[i].file_spec.SetFile(raw_path, true);
+                        // don't resolve the path
+                        const bool resolve_path = false;
+                        m_dyld_image_infos[i].file_spec.SetFile(raw_path, resolve_path);
                     }
                     assert(i == m_dyld_all_image_infos.dylib_info_count);
 





More information about the lldb-commits mailing list