Add support for custom commands to set flags on themselves
authorEnrico Granata <egranata@apple.com>
Wed, 27 May 2015 05:04:35 +0000 (05:04 +0000)
committerEnrico Granata <egranata@apple.com>
Wed, 27 May 2015 05:04:35 +0000 (05:04 +0000)
commite87764f2470f6794e432506ebc8beb6ef78dd5fb
tree4bd62c58b76aeaf4d7c6155418838b9933caa56c
parent3273930d9acee986bc3d1bc24556354e26a797fd
Add support for custom commands to set flags on themselves
This works for Python commands defined via a class (implement get_flags on your class) and C++ plugin commands (which can call SBCommand::GetFlags()/SetFlags())

Flags allow features such as not letting the command run if there's no target, or if the process is not stopped, ...
Commands could always check for these things themselves, but having these accessible via flags makes custom commands more consistent with built-in ones

llvm-svn: 238286
26 files changed:
lldb/include/lldb/API/SBCommandInterpreter.h
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/include/lldb/lldb-enumerations.h
lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectRegister.cpp
lldb/source/Commands/CommandObjectSource.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectType.cpp
lldb/source/Commands/CommandObjectWatchpoint.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/ScriptInterpreterPython.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/test/functionalities/command_script/TestCommandScript.py
lldb/test/functionalities/command_script/py_import
lldb/test/functionalities/command_script/welcome.py