diff options
author | Caroline Tice <ctice@apple.com> | 2010-09-04 00:03:46 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-09-04 00:03:46 +0000 |
commit | 3df9a8dfd7714dd6d03d5e1a93dbbfee736946bc (patch) | |
tree | 5855b97cff85c66d8e0236d43ed974c031a5bf3b /lldb/source/Interpreter/ScriptInterpreter.cpp | |
parent | 070ebd93d2765e5f88e9739edb673a1fee5cbe9c (diff) | |
download | bcm5719-llvm-3df9a8dfd7714dd6d03d5e1a93dbbfee736946bc.tar.gz bcm5719-llvm-3df9a8dfd7714dd6d03d5e1a93dbbfee736946bc.zip |
This is a very large commit that completely re-does the way lldb
handles user settable internal variables (the equivalent of set/show
variables in gdb). In addition to the basic infrastructure (most of
which is defined in UserSettingsController.{h,cpp}, there are examples
of two classes that have been set up to contain user settable
variables (the Debugger and Process classes). The 'settings' command
has been modified to be a command-subcommand structure, and the 'set',
'show' and 'append' commands have been moved into this sub-commabnd
structure. The old StateVariable class has been completely replaced
by this, and the state variable dictionary has been removed from the
Command Interpreter. Places that formerly accessed the state variable
mechanism have been modified to access the variables in this new
structure instead (checking the term-width; getting/checking the
prompt; etc.)
Variables are attached to classes; there are two basic "flavors" of
variables that can be set: "global" variables (static/class-wide), and
"instance" variables (one per instance of the class). The whole thing
has been set up so that any global or instance variable can be set at
any time (e.g. on start up, in your .lldbinit file), whether or not
any instances actually exist (there's a whole pending and default
values mechanism to help deal with that).
llvm-svn: 113041
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreter.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 9c5c086bfa3..e4b5634258a 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -63,4 +63,21 @@ ScriptInterpreter::CollectDataForBreakpointCommandCallback result.AppendError ("ScriptInterpreter::GetScriptCommands(StringList &) is not implemented."); } +std::string +ScriptInterpreter::LanguageToString (lldb::ScriptLanguage language) +{ + std::string return_value; + switch (language) + { + case eScriptLanguageNone: + return_value = "None"; + break; + case eScriptLanguagePython: + return_value = "Python"; + break; + + } + + return return_value; +} |