[Lldb-commits] [lldb] r182325 - Forgot to check for empty error strings in the previous checkin

Enrico Granata egranata at apple.com
Mon May 20 15:40:55 PDT 2013


Author: enrico
Date: Mon May 20 17:40:54 2013
New Revision: 182325

URL: http://llvm.org/viewvc/llvm-project?rev=182325&view=rev
Log:
Forgot to check for empty error strings in the previous checkin


Modified:
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=182325&r1=182324&r2=182325&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Mon May 20 17:40:54 2013
@@ -4377,7 +4377,7 @@ protected:
                             // in the debug info files in case the platform supports that.
                             Error error;
                             module_sp->LoadScriptingResourceInTarget (target, error);
-                            if (error.Fail())
+                            if (error.Fail() && error.AsCString())
                                 result.AppendWarningWithFormat("unable to load scripting data for module %s - error reported was %s",
                                                                module_sp->GetFileSpec().GetFileNameStrippingExtension().GetCString(),
                                                                error.AsCString());

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=182325&r1=182324&r2=182325&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon May 20 17:40:54 2013
@@ -1022,7 +1022,7 @@ ModuleList::LoadScriptingResourcesInTarg
         if (module)
         {
             module->LoadScriptingResourceInTarget(target, error);
-            if (error.Fail())
+            if (error.Fail() && error.AsCString())
             {
                 error.SetErrorStringWithFormat("unable to load scripting data for module %s - error reported was %s",
                                                module->GetFileSpec().GetFileNameStrippingExtension().GetCString(),

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=182325&r1=182324&r2=182325&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon May 20 17:40:54 2013
@@ -984,7 +984,7 @@ static void
 LoadScriptingResourceForModule (const ModuleSP &module_sp, Target *target)
 {
     Error error;
-    if (module_sp && !module_sp->LoadScriptingResourceInTarget(target, error))
+    if (module_sp && !module_sp->LoadScriptingResourceInTarget(target, error) && error.AsCString())
     {
         target->GetDebugger().GetOutputStream().Printf("unable to load scripting data for module %s - error reported was %s\n",
                                                        module_sp->GetFileSpec().GetFileNameStrippingExtension().GetCString(),





More information about the lldb-commits mailing list