<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
This commit is contained in:
Enrico Granata
2013-05-13 17:03:52 +00:00
parent 7b4baa91ce
commit 2ea43cdcab
4 changed files with 34 additions and 2 deletions

View File

@@ -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;