[Lldb-commits] [lldb] r175570 - <rdar://problem/13147878>
Enrico Granata
egranata at apple.com
Tue Feb 19 14:34:01 PST 2013
Author: enrico
Date: Tue Feb 19 16:34:01 2013
New Revision: 175570
URL: http://llvm.org/viewvc/llvm-project?rev=175570&view=rev
Log:
<rdar://problem/13147878>
Be more user-friendly about not having scripting enabled:
a) if Python was built-out then tell people about it explicitly
b) if we are told to use none as a scripting language, then tell people about that too
This should limit the cases where the semi-cryptic error message "there is no embedded script interpreter in this mode." actually shows
Modified:
lldb/trunk/source/Interpreter/CommandObjectScript.cpp
Modified: lldb/trunk/source/Interpreter/CommandObjectScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectScript.cpp?rev=175570&r1=175569&r2=175570&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectScript.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectScript.cpp Tue Feb 19 16:34:01 2013
@@ -51,6 +51,19 @@ CommandObjectScript::DoExecute
CommandReturnObject &result
)
{
+#ifdef LLDB_DISABLE_PYTHON
+ // if we ever support languages other than Python this simple #ifdef won't work
+ result.AppendError("your copy of LLDB does not support scripting.")
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+#else
+ if (m_interpreter.GetDebugger().GetScriptLanguage() == lldb::eScriptLanguageNone)
+ {
+ result.AppendError("the script-lang setting is set to none - scripting not available");
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
+
ScriptInterpreter *script_interpreter = m_interpreter.GetScriptInterpreter ();
if (script_interpreter == NULL)
@@ -76,4 +89,5 @@ CommandObjectScript::DoExecute
result.SetStatus(eReturnStatusFailed);
return result.Succeeded();
+#endif
}
More information about the lldb-commits
mailing list