From 2ea43cdcabc87264c54eb3e487e43889c5f906f8 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Mon, 13 May 2013 17:03:52 +0000 Subject: 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 --- lldb/source/Core/Module.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index b5874daeb80d..de39a988dd33 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; -- cgit v1.2.3