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
This commit is contained in:
Jim Ingham
2016-09-26 19:47:37 +00:00
parent 6477ce2697
commit f7e0725628
12 changed files with 137 additions and 38 deletions

View File

@@ -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) {