diff options
author | Enrico Granata <egranata@apple.com> | 2013-05-13 17:03:52 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-05-13 17:03:52 +0000 |
commit | 2ea43cdcabc87264c54eb3e487e43889c5f906f8 (patch) | |
tree | 4a195daf210a00a5246feaacb3d6b0c856ab39c2 /lldb/source/Core/Module.cpp | |
parent | 7b4baa91ce2f98bf49a102e17a7fc91ec00e5789 (diff) | |
download | bcm5719-llvm-2ea43cdcabc87264c54eb3e487e43889c5f906f8.tar.gz bcm5719-llvm-2ea43cdcabc87264c54eb3e487e43889c5f906f8.zip |
<rdar://problem/13183720>
Provide a mechanism through which users can disable loading the Python scripts from dSYM files
This relies on a target setting: target.load-script-from-symbol-file which defaults to false ("do NOT load the script")
You need to set it to true before creating your target (or in your lldbinit file if you constantly rely on this feature) to allow the scripts to load
llvm-svn: 181709
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r-- | lldb/source/Core/Module.cpp | 8 |
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; |