summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index b5874daeb80..de39a988dd3 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1243,6 +1243,8 @@ Module::LoadScriptingResourceInTarget (Target *target, Error& error)
return false;
}
+ bool shoud_load = target->TargetProperties::GetLoadScriptFromSymbolFile();
+
Debugger &debugger = target->GetDebugger();
const ScriptLanguage script_language = debugger.GetScriptLanguage();
if (script_language != eScriptLanguageNone)
@@ -1271,7 +1273,11 @@ Module::LoadScriptingResourceInTarget (Target *target, Error& error)
FileSpec scripting_fspec (file_specs.GetFileSpecAtIndex(i));
if (scripting_fspec && scripting_fspec.Exists())
{
-
+ if (!shoud_load)
+ {
+ error.SetErrorString("Target doesn't allow loading scripting resource. Please set target.load-script-from-symbol-file and retry.");
+ return false;
+ }
StreamString scripting_stream;
scripting_fspec.Dump(&scripting_stream);
const bool can_reload = false;
OpenPOWER on IntegriCloud