[Lldb-commits] [lldb] r122290 - /lldb/trunk/source/Core/ModuleList.cpp

Greg Clayton gclayton at apple.com
Mon Dec 20 15:42:12 PST 2010


Author: gclayton
Date: Mon Dec 20 17:42:12 2010
New Revision: 122290

URL: http://llvm.org/viewvc/llvm-project?rev=122290&view=rev
Log:
Remove an assertion that is causing crashes. We do need to find a way to reproduce when this assertion asserts, but we should crash our debug session because of it. For now we log to stderr in hope of tracking it down.

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

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=122290&r1=122289&r2=122290&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon Dec 20 17:42:12 2010
@@ -502,7 +502,17 @@
     {
         ModuleList &shared_module_list = GetSharedModuleList ();
         module_sp = shared_module_list.FindModule (module_ptr);
-        assert (module_sp.get());   // This might fire off a few times and we need to make sure it never fires...
+        if (module_sp.get() == NULL)
+        {
+            char uuid_cstr[256];
+            const_cast<Module *>(module_ptr)->GetUUID().GetAsCString (uuid_cstr, sizeof(uuid_cstr));
+            const FileSpec &module_file_spec = module_ptr->GetFileSpec();
+            fprintf (stderr, "warning: module not in shared module list: %s (%s) \"%s/%s\"\n", 
+                     uuid_cstr,
+                     module_ptr->GetArchitecture().AsCString(),
+                     module_file_spec.GetDirectory().GetCString(),
+                     module_file_spec.GetFilename().GetCString());
+        }
     }
     return module_sp;
 }





More information about the lldb-commits mailing list