Improving the previous checkin about target.load-script-from-symbol-file
There are two settings:
target.load-script-from-symbol-file is a boolean that says load or no load (default: false)
target.warn-on-script-from-symbol-file is also a boolean, it says whether you want to be warned when a script file is not loaded due to security (default: true)
the auto loading on change for target.load-script-from-symbol-file is preserved
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182336 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 8ed3c23..cd2e7c3 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -4376,11 +4376,14 @@
// Make sure we load any scripting resources that may be embedded
// in the debug info files in case the platform supports that.
Error error;
- module_sp->LoadScriptingResourceInTarget (target, error);
+ StreamString feedback_stream;
+ module_sp->LoadScriptingResourceInTarget (target, error,&feedback_stream);
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());
+ else if (feedback_stream.GetSize())
+ result.AppendWarningWithFormat("%s",feedback_stream.GetData());
flush = true;
result.SetStatus (eReturnStatusSuccessFinishResult);