diff options
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/Target.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index f6aafec29b6..8ed3c239672 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -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()); diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 96dbc4f6e62..449a800949e 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -1022,7 +1022,7 @@ ModuleList::LoadScriptingResourcesInTarget (Target *target, 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(), diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index c40b91b8ffb..490c88e186d 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -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(), |