diff options
| author | Jim Ingham <jingham@apple.com> | 2016-09-26 19:47:37 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2016-09-26 19:47:37 +0000 |
| commit | f7e07256283cc080b2720ee6587b96d92ef6f9e5 (patch) | |
| tree | c9fb2ed60b237f2def721efcab79b9a749f16a35 /lldb/source/Interpreter | |
| parent | 6477ce2697bf1d9afd2bcc0cf0c16c7cf08713be (diff) | |
| download | bcm5719-llvm-f7e07256283cc080b2720ee6587b96d92ef6f9e5.tar.gz bcm5719-llvm-f7e07256283cc080b2720ee6587b96d92ef6f9e5.zip | |
Fix serialization of Python breakpoint commands.
CommandData breakpoint commands didn't know whether they were
Python or Command line commands, so they couldn't serialize &
deserialize themselves properly. Fix that.
I also changed the "breakpoint list" command to note in the output
when the commands are Python commands. Fortunately only one test
was relying on this explicit bit of text output.
llvm-svn: 282432
Diffstat (limited to 'lldb/source/Interpreter')
| -rw-r--r-- | lldb/source/Interpreter/ScriptInterpreter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 87f4daceac9..d87d24e46db 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -57,11 +57,24 @@ std::string ScriptInterpreter::LanguageToString(lldb::ScriptLanguage language) { case eScriptLanguagePython: return_value = "Python"; break; + case eScriptLanguageUnknown: + return_value = "Unknown"; + break; } return return_value; } +lldb::ScriptLanguage +ScriptInterpreter::StringToLanguage(const llvm::StringRef &language) { + if (language.equals_lower(LanguageToString(eScriptLanguageNone))) + return eScriptLanguageNone; + else if (language.equals_lower(LanguageToString(eScriptLanguagePython))) + return eScriptLanguagePython; + else + return eScriptLanguageUnknown; +} + Error ScriptInterpreter::SetBreakpointCommandCallback( std::vector<BreakpointOptions *> &bp_options_vec, const char *callback_text) { |

