summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-05-20 22:29:23 +0000
committerEnrico Granata <egranata@apple.com>2013-05-20 22:29:23 +0000
commit84a53dfb49f73458bfbbf919ba81c9c14ba1ef7e (patch)
tree39325df296a689c00855c61e23f1dcb73498e663 /lldb/source/Core/Module.cpp
parenteda5418e89d1f7c9ef801b0c5945e0f1d7dcfffb (diff)
downloadbcm5719-llvm-84a53dfb49f73458bfbbf919ba81c9c14ba1ef7e.tar.gz
bcm5719-llvm-84a53dfb49f73458bfbbf919ba81c9c14ba1ef7e.zip
<rdar://problem/13878726>
This changes the setting target.load-script-from-symbol-file to be a ternary enum value: default (the default value) will NOT load the script files but will issue a warning suggesting workarounds yes will load the script files no will not load the script files AND will NOT issue any warning if you change the setting value from default to yes, that will then cause the script files to be loaded (the assumption is you didn't know about the setting, got a warning, and quickly want to remedy it) if you have a settings set command for this in your lldbinit file, be sure to change "true" or "false" into an appropriate "yes" or "no" value llvm-svn: 182323
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 7ce0c1b1f26..86057c17eff 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1243,7 +1243,7 @@ Module::LoadScriptingResourceInTarget (Target *target, Error& error)
return false;
}
- bool shoud_load = target->TargetProperties::GetLoadScriptFromSymbolFile();
+ LoadScriptFromSymFile shoud_load = target->TargetProperties::GetLoadScriptFromSymbolFile();
Debugger &debugger = target->GetDebugger();
const ScriptLanguage script_language = debugger.GetScriptLanguage();
@@ -1273,9 +1273,10 @@ Module::LoadScriptingResourceInTarget (Target *target, Error& error)
FileSpec scripting_fspec (file_specs.GetFileSpecAtIndex(i));
if (scripting_fspec && scripting_fspec.Exists())
{
- if (!shoud_load)
+ if (shoud_load != LoadScriptFromSymFile::eYes)
{
- error.SetErrorString("Target doesn't allow loading scripting resource. Please set target.load-script-from-symbol-file and retry.");
+ if (shoud_load == LoadScriptFromSymFile::eDefault)
+ error.SetErrorStringWithFormat("the setting target.load-script-from-symbol-file disallows loading script files - change it to yes or manually command script import %s",scripting_fspec.GetPath().c_str());
return false;
}
StreamString scripting_stream;
OpenPOWER on IntegriCloud