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
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 751ceed..75fcedb 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -287,9 +287,10 @@
LoadPluginCallbackType Debugger::g_load_plugin_callback = nullptr;
-Error Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
- VarSetOperationType op,
- llvm::StringRef property_path, llvm::StringRef value) {
+Status Debugger::SetPropertyValue(const ExecutionContext *exe_ctx,
+ VarSetOperationType op,
+ llvm::StringRef property_path,
+ llvm::StringRef value) {
bool is_load_script = (property_path == "target.load-script-from-symbol-file");
bool is_escape_non_printables = (property_path == "escape-non-printables");
TargetSP target_sp;
@@ -299,7 +300,7 @@
load_script_old_value =
target_sp->TargetProperties::GetLoadScriptFromSymbolFile();
}
- Error error(Properties::SetPropertyValue(exe_ctx, op, property_path, value));
+ Status error(Properties::SetPropertyValue(exe_ctx, op, property_path, value));
if (error.Success()) {
// FIXME it would be nice to have "on-change" callbacks for properties
if (property_path == g_properties[ePropertyPrompt].name) {
@@ -321,7 +322,7 @@
load_script_old_value == eLoadScriptFromSymFileWarn) {
if (target_sp->TargetProperties::GetLoadScriptFromSymbolFile() ==
eLoadScriptFromSymFileTrue) {
- std::list<Error> errors;
+ std::list<Status> errors;
StreamString feedback_stream;
if (!target_sp->LoadScriptingResources(errors, &feedback_stream)) {
StreamFileSP stream_sp(GetErrorFile());
@@ -550,7 +551,7 @@
void Debugger::SettingsTerminate() { Target::SettingsTerminate(); }
-bool Debugger::LoadPlugin(const FileSpec &spec, Error &error) {
+bool Debugger::LoadPlugin(const FileSpec &spec, Status &error) {
if (g_load_plugin_callback) {
llvm::sys::DynamicLibrary dynlib =
g_load_plugin_callback(shared_from_this(), spec, error);
@@ -570,7 +571,7 @@
static FileSpec::EnumerateDirectoryResult
LoadPluginCallback(void *baton, llvm::sys::fs::file_type ft,
const FileSpec &file_spec) {
- Error error;
+ Status error;
static ConstString g_dylibext("dylib");
static ConstString g_solibext("so");
@@ -595,7 +596,7 @@
return FileSpec::eEnumerateDirectoryResultNext;
}
- Error plugin_load_error;
+ Status plugin_load_error;
debugger->LoadPlugin(plugin_file_spec, plugin_load_error);
return FileSpec::eEnumerateDirectoryResultNext;
@@ -1365,7 +1366,7 @@
process = target_sp->GetProcessSP().get();
}
if (process) {
- Error error;
+ Status error;
size_t len;
char stdio_buffer[1024];
while ((len = process->GetSTDOUT(stdio_buffer, sizeof(stdio_buffer),
@@ -1393,7 +1394,7 @@
process = target_sp->GetProcessSP().get();
}
if (process) {
- Error error;
+ Status error;
size_t len;
char stdio_buffer[1024];
while ((len = process->GetSTDERR(stdio_buffer, sizeof(stdio_buffer),
@@ -1463,7 +1464,7 @@
EventDataStructuredData::GetObjectFromEvent(event_sp.get());
if (output_stream_sp) {
StreamString content_stream;
- Error error =
+ Status error =
plugin_sp->GetDescription(structured_data_sp, content_stream);
if (error.Success()) {
if (!content_stream.GetString().empty()) {
@@ -1702,8 +1703,8 @@
return GetDummyTarget();
}
-Error Debugger::RunREPL(LanguageType language, const char *repl_options) {
- Error err;
+Status Debugger::RunREPL(LanguageType language, const char *repl_options) {
+ Status err;
FileSpec repl_executable;
if (language == eLanguageTypeUnknown) {