diff options
author | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-12 04:51:55 +0000 |
commit | 97206d572797bddc1bba71bb1c18c97f19d69053 (patch) | |
tree | fdf21d24485672cf97c800264d135b9d5d2ecdce /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
parent | 3086b45a2fae833e8419885e78c598d936cc6429 (diff) | |
download | bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.tar.gz bcm5719-llvm-97206d572797bddc1bba71bb1c18c97f19d69053.zip |
Rename Error -> Status.
This renames the LLDB error class to Status, as discussed
on the lldb-dev mailing list.
A change of this magnitude cannot easily be done without
find and replace, but that has potential to catch unwanted
occurrences of common strings such as "Error". Every effort
was made to find all the obvious things such as the word "Error"
appearing in a string, etc, but it's possible there are still
some lingering occurences left around. Hopefully nothing too
serious.
llvm-svn: 302872
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index cfab9b33e66..985a7978c6a 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -723,7 +723,7 @@ bool ScriptInterpreterPython::ExecuteOneLine( // the result object Pipe pipe; - Error pipe_result = pipe.CreateNew(false); + Status pipe_result = pipe.CreateNew(false); if (pipe_result.Success()) { #if defined(_WIN32) lldb::file_t read_file = pipe.GetReadNativeHandle(); @@ -1133,9 +1133,9 @@ bool ScriptInterpreterPython::ExecuteOneLineWithReturn( return ret_success; } -Error ScriptInterpreterPython::ExecuteMultipleLines( +Status ScriptInterpreterPython::ExecuteMultipleLines( const char *in_string, const ExecuteScriptOptions &options) { - Error error; + Status error; Locker locker(this, ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession | @@ -1220,10 +1220,10 @@ void ScriptInterpreterPython::SetBreakpointCommandCallbackFunction( bp_options, oneliner.c_str()); } -Error ScriptInterpreterPython::SetBreakpointCommandCallback( +Status ScriptInterpreterPython::SetBreakpointCommandCallback( BreakpointOptions *bp_options, std::unique_ptr<BreakpointOptions::CommandData> &cmd_data_up) { - Error error; + Status error; error = GenerateBreakpointCommandCallbackData(cmd_data_up->user_source, cmd_data_up->script_source); if (error.Fail()) { @@ -1237,7 +1237,7 @@ Error ScriptInterpreterPython::SetBreakpointCommandCallback( } // Set a Python one-liner as the callback for the breakpoint. -Error ScriptInterpreterPython::SetBreakpointCommandCallback( +Status ScriptInterpreterPython::SetBreakpointCommandCallback( BreakpointOptions *bp_options, const char *command_body_text) { auto data_ap = llvm::make_unique<CommandDataPython>(); @@ -1248,8 +1248,8 @@ Error ScriptInterpreterPython::SetBreakpointCommandCallback( // the callback will actually invoke. data_ap->user_source.SplitIntoLines(command_body_text); - Error error = GenerateBreakpointCommandCallbackData(data_ap->user_source, - data_ap->script_source); + Status error = GenerateBreakpointCommandCallbackData(data_ap->user_source, + data_ap->script_source); if (error.Success()) { auto baton_sp = std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_ap)); @@ -1285,20 +1285,20 @@ void ScriptInterpreterPython::SetWatchpointCommandCallback( return; } -Error ScriptInterpreterPython::ExportFunctionDefinitionToInterpreter( +Status ScriptInterpreterPython::ExportFunctionDefinitionToInterpreter( StringList &function_def) { // Convert StringList to one long, newline delimited, const char *. std::string function_def_string(function_def.CopyList()); - Error error = ExecuteMultipleLines( + Status error = ExecuteMultipleLines( function_def_string.c_str(), ScriptInterpreter::ExecuteScriptOptions().SetEnableIO(false)); return error; } -Error ScriptInterpreterPython::GenerateFunction(const char *signature, - const StringList &input) { - Error error; +Status ScriptInterpreterPython::GenerateFunction(const char *signature, + const StringList &input) { + Status error; int num_lines = input.GetSize(); if (num_lines == 0) { error.SetErrorString("No input data."); @@ -1830,7 +1830,7 @@ lldb::StateType ScriptInterpreterPython::ScriptedThreadPlanGetRunState( StructuredData::ObjectSP ScriptInterpreterPython::LoadPluginModule(const FileSpec &file_spec, - lldb_private::Error &error) { + lldb_private::Status &error) { if (!file_spec.Exists()) { error.SetErrorString("no such file"); return StructuredData::ObjectSP(); @@ -1847,7 +1847,7 @@ ScriptInterpreterPython::LoadPluginModule(const FileSpec &file_spec, StructuredData::DictionarySP ScriptInterpreterPython::GetDynamicSettings( StructuredData::ObjectSP plugin_module_sp, Target *target, - const char *setting_name, lldb_private::Error &error) { + const char *setting_name, lldb_private::Status &error) { if (!plugin_module_sp || !target || !setting_name || !setting_name[0] || !g_swig_plugin_get) return StructuredData::DictionarySP(); @@ -1943,12 +1943,12 @@ bool ScriptInterpreterPython::GenerateTypeSynthClass(const char *oneliner, return GenerateTypeSynthClass(input, output, name_token); } -Error ScriptInterpreterPython::GenerateBreakpointCommandCallbackData( +Status ScriptInterpreterPython::GenerateBreakpointCommandCallbackData( StringList &user_input, std::string &output) { static uint32_t num_created_functions = 0; user_input.RemoveBlankLines(); StreamString sstr; - Error error; + Status error; if (user_input.GetSize() == 0) { error.SetErrorString("No input data."); return error; @@ -2395,7 +2395,7 @@ ConstString ScriptInterpreterPython::GetSyntheticTypeName( bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, Process *process, std::string &output, - Error &error) { + Status &error) { bool ret_val; if (!process) { error.SetErrorString("no process"); @@ -2424,7 +2424,7 @@ bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, Thread *thread, std::string &output, - Error &error) { + Status &error) { bool ret_val; if (!thread) { error.SetErrorString("no thread"); @@ -2453,7 +2453,7 @@ bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, Target *target, std::string &output, - Error &error) { + Status &error) { bool ret_val; if (!target) { error.SetErrorString("no thread"); @@ -2482,7 +2482,7 @@ bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, StackFrame *frame, std::string &output, - Error &error) { + Status &error) { bool ret_val; if (!frame) { error.SetErrorString("no frame"); @@ -2511,7 +2511,7 @@ bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, bool ScriptInterpreterPython::RunScriptFormatKeyword(const char *impl_function, ValueObject *value, std::string &output, - Error &error) { + Status &error) { bool ret_val; if (!value) { error.SetErrorString("no value"); @@ -2551,7 +2551,7 @@ uint64_t replace_all(std::string &str, const std::string &oldStr, bool ScriptInterpreterPython::LoadScriptingModule( const char *pathname, bool can_reload, bool init_session, - lldb_private::Error &error, StructuredData::ObjectSP *module_sp) { + lldb_private::Status &error, StructuredData::ObjectSP *module_sp) { if (!pathname || !pathname[0]) { error.SetErrorString("invalid pathname"); return false; @@ -2742,7 +2742,7 @@ ScriptInterpreterPython::SynchronicityHandler::~SynchronicityHandler() { bool ScriptInterpreterPython::RunScriptBasedCommand( const char *impl_function, const char *args, ScriptedCommandSynchronicity synchronicity, - lldb_private::CommandReturnObject &cmd_retobj, Error &error, + lldb_private::CommandReturnObject &cmd_retobj, Status &error, const lldb_private::ExecutionContext &exe_ctx) { if (!impl_function) { error.SetErrorString("no function to execute"); @@ -2790,7 +2790,7 @@ bool ScriptInterpreterPython::RunScriptBasedCommand( bool ScriptInterpreterPython::RunScriptBasedCommand( StructuredData::GenericSP impl_obj_sp, const char *args, ScriptedCommandSynchronicity synchronicity, - lldb_private::CommandReturnObject &cmd_retobj, Error &error, + lldb_private::CommandReturnObject &cmd_retobj, Status &error, const lldb_private::ExecutionContext &exe_ctx) { if (!impl_obj_sp || !impl_obj_sp->IsValid()) { error.SetErrorString("no function to execute"); |