[Lldb-commits] [lldb] r155223 - /lldb/trunk/source/Core/Module.cpp

Greg Clayton gclayton at apple.com
Fri Apr 20 12:50:20 PDT 2012


Author: gclayton
Date: Fri Apr 20 14:50:20 2012
New Revision: 155223

URL: http://llvm.org/viewvc/llvm-project?rev=155223&view=rev
Log:
Don't put the address of the module in the module basename as this hoses up our ability to find shared libraries by name. We now put it into the Module object name.


Modified:
    lldb/trunk/source/Core/Module.cpp

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=155223&r1=155222&r2=155223&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Fri Apr 20 14:50:20 2012
@@ -240,11 +240,6 @@
         Mutex::Locker locker (m_mutex);
         if (process_sp)
         {
-            StreamString s;
-            if (m_file.GetFilename())
-                s << m_file.GetFilename();
-                s.Printf("[0x%16.16llx]", header_addr);
-                m_file.GetFilename().SetCString (s.GetData());
             m_did_load_objfile = true;
             std::auto_ptr<DataBufferHeap> data_ap (new DataBufferHeap (512, 0));
             Error readmem_error;
@@ -258,7 +253,11 @@
                 m_objfile_sp = ObjectFile::FindPlugin(shared_from_this(), process_sp, header_addr, data_sp);
                 if (m_objfile_sp)
                 {
-                    // Once we get the object file, update our module with the object file's 
+                    StreamString s;
+                    s.Printf("0x%16.16llx", header_addr);
+                    m_object_name.SetCString (s.GetData());
+
+                    // Once we get the object file, update our module with the object file's
                     // architecture since it might differ in vendor/os if some parts were
                     // unknown.
                     m_objfile_sp->GetArchitecture (m_arch);





More information about the lldb-commits mailing list