[Lldb-commits] [lldb] r302872 - Rename Error -> Status.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu May 11 21:52:03 PDT 2017


Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h Thu May 11 23:51:55 2017
@@ -38,19 +38,19 @@ public:
 
   virtual ~PlatformAppleSimulator();
 
-  lldb_private::Error
+  lldb_private::Status
   LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  lldb_private::Error ConnectRemote(lldb_private::Args &args) override;
+  lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
 
-  lldb_private::Error DisconnectRemote() override;
+  lldb_private::Status DisconnectRemote() override;
 
   lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
                                lldb_private::Debugger &debugger,
                                lldb_private::Target *target,
-                               lldb_private::Error &error) override;
+                               lldb_private::Status &error) override;
 
 protected:
   std::mutex m_core_sim_path_mutex;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp Thu May 11 23:51:55 2017
@@ -23,9 +23,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "llvm/Support/FileSystem.h"
@@ -171,10 +171,10 @@ void PlatformAppleTVSimulator::GetStatus
     strm.PutCString("  SDK Path: error: unable to locate SDK\n");
 }
 
-Error PlatformAppleTVSimulator::ResolveExecutable(
+Status PlatformAppleTVSimulator::ResolveExecutable(
     const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   ModuleSpec resolved_module_spec(module_spec);
@@ -301,10 +301,10 @@ const char *PlatformAppleTVSimulator::Ge
   return NULL;
 }
 
-Error PlatformAppleTVSimulator::GetSymbolFile(const FileSpec &platform_file,
-                                              const UUID *uuid_ptr,
-                                              FileSpec &local_file) {
-  Error error;
+Status PlatformAppleTVSimulator::GetSymbolFile(const FileSpec &platform_file,
+                                               const UUID *uuid_ptr,
+                                               FileSpec &local_file) {
+  Status error;
   char platform_file_path[PATH_MAX];
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
     char resolved_path[PATH_MAX];
@@ -333,7 +333,7 @@ Error PlatformAppleTVSimulator::GetSymbo
   return error;
 }
 
-Error PlatformAppleTVSimulator::GetSharedModule(
+Status PlatformAppleTVSimulator::GetSharedModule(
     const ModuleSpec &module_spec, lldb_private::Process *process,
     ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr,
     ModuleSP *old_module_sp_ptr, bool *did_create_ptr) {
@@ -341,7 +341,7 @@ Error PlatformAppleTVSimulator::GetShare
   // system. So first we ask for the file in the cached SDK,
   // then we attempt to get a shared module for the right architecture
   // with the right UUID.
-  Error error;
+  Status error;
   ModuleSpec platform_module_spec(module_spec);
   const FileSpec &platform_file = module_spec.GetFileSpec();
   error = GetSymbolFile(platform_file, module_spec.GetUUIDPtr(),

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h Thu May 11 23:51:55 2017
@@ -51,7 +51,7 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  lldb_private::Error ResolveExecutable(
+  lldb_private::Status ResolveExecutable(
       const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr) override;
 
@@ -59,12 +59,12 @@ public:
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  virtual lldb_private::Error
+  virtual lldb_private::Status
   GetSymbolFile(const lldb_private::FileSpec &platform_file,
                 const lldb_private::UUID *uuid_ptr,
                 lldb_private::FileSpec &local_file);
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp Thu May 11 23:51:55 2017
@@ -23,9 +23,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -171,10 +171,10 @@ void PlatformAppleWatchSimulator::GetSta
     strm.PutCString("  SDK Path: error: unable to locate SDK\n");
 }
 
-Error PlatformAppleWatchSimulator::ResolveExecutable(
+Status PlatformAppleWatchSimulator::ResolveExecutable(
     const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   ModuleSpec resolved_module_spec(module_spec);
@@ -301,10 +301,10 @@ const char *PlatformAppleWatchSimulator:
   return NULL;
 }
 
-Error PlatformAppleWatchSimulator::GetSymbolFile(const FileSpec &platform_file,
-                                                 const UUID *uuid_ptr,
-                                                 FileSpec &local_file) {
-  Error error;
+Status PlatformAppleWatchSimulator::GetSymbolFile(const FileSpec &platform_file,
+                                                  const UUID *uuid_ptr,
+                                                  FileSpec &local_file) {
+  Status error;
   char platform_file_path[PATH_MAX];
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
     char resolved_path[PATH_MAX];
@@ -333,7 +333,7 @@ Error PlatformAppleWatchSimulator::GetSy
   return error;
 }
 
-Error PlatformAppleWatchSimulator::GetSharedModule(
+Status PlatformAppleWatchSimulator::GetSharedModule(
     const ModuleSpec &module_spec, lldb_private::Process *process,
     ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr,
     ModuleSP *old_module_sp_ptr, bool *did_create_ptr) {
@@ -341,7 +341,7 @@ Error PlatformAppleWatchSimulator::GetSh
   // system. So first we ask for the file in the cached SDK,
   // then we attempt to get a shared module for the right architecture
   // with the right UUID.
-  Error error;
+  Status error;
   ModuleSpec platform_module_spec(module_spec);
   const FileSpec &platform_file = module_spec.GetFileSpec();
   error = GetSymbolFile(platform_file, module_spec.GetUUIDPtr(),

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h Thu May 11 23:51:55 2017
@@ -51,7 +51,7 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  lldb_private::Error ResolveExecutable(
+  lldb_private::Status ResolveExecutable(
       const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr) override;
 
@@ -59,12 +59,12 @@ public:
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  virtual lldb_private::Error
+  virtual lldb_private::Status
   GetSymbolFile(const lldb_private::FileSpec &platform_file,
                 const lldb_private::UUID *uuid_ptr,
                 lldb_private::FileSpec &local_file);
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu May 11 23:51:55 2017
@@ -36,8 +36,8 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataBufferLLVM.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Threading.h"
@@ -195,10 +195,10 @@ FileSpecList PlatformDarwin::LocateExecu
   return file_list;
 }
 
-Error PlatformDarwin::ResolveSymbolFile(Target &target,
-                                        const ModuleSpec &sym_spec,
-                                        FileSpec &sym_file) {
-  Error error;
+Status PlatformDarwin::ResolveSymbolFile(Target &target,
+                                         const ModuleSpec &sym_spec,
+                                         FileSpec &sym_file) {
+  Status error;
   sym_file = sym_spec.GetSymbolFileSpec();
 
   llvm::sys::fs::file_status st;
@@ -219,23 +219,23 @@ Error PlatformDarwin::ResolveSymbolFile(
   return error;
 }
 
-static lldb_private::Error
+static lldb_private::Status
 MakeCacheFolderForFile(const FileSpec &module_cache_spec) {
   FileSpec module_cache_folder =
       module_cache_spec.CopyByRemovingLastPathComponent();
   return llvm::sys::fs::create_directory(module_cache_folder.GetPath());
 }
 
-static lldb_private::Error
+static lldb_private::Status
 BringInRemoteFile(Platform *platform,
                   const lldb_private::ModuleSpec &module_spec,
                   const FileSpec &module_cache_spec) {
   MakeCacheFolderForFile(module_cache_spec);
-  Error err = platform->GetFile(module_spec.GetFileSpec(), module_cache_spec);
+  Status err = platform->GetFile(module_spec.GetFileSpec(), module_cache_spec);
   return err;
 }
 
-lldb_private::Error PlatformDarwin::GetSharedModuleWithLocalCache(
+lldb_private::Status PlatformDarwin::GetSharedModuleWithLocalCache(
     const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
     const lldb_private::FileSpecList *module_search_paths_ptr,
     lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr) {
@@ -252,7 +252,7 @@ lldb_private::Error PlatformDarwin::GetS
                 module_spec.GetSymbolFileSpec().GetDirectory().AsCString(),
                 module_spec.GetSymbolFileSpec().GetFilename().AsCString());
 
-  Error err;
+  Status err;
 
   err = ModuleList::GetSharedModule(module_spec, module_sp,
                                     module_search_paths_ptr, old_module_sp_ptr,
@@ -286,7 +286,7 @@ lldb_private::Error PlatformDarwin::GetS
                                 module_spec.GetArchitecture());
           module_sp.reset(new Module(local_spec));
           module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
-          return Error();
+          return Status();
         }
       }
 
@@ -300,7 +300,7 @@ lldb_private::Error PlatformDarwin::GetS
           uint64_t high_local, high_remote, low_local, low_remote;
           auto MD5 = llvm::sys::fs::md5_contents(module_cache_spec.GetPath());
           if (!MD5)
-            return Error(MD5.getError());
+            return Status(MD5.getError());
           std::tie(high_local, low_local) = MD5->words();
 
           m_remote_platform_sp->CalculateMD5(module_spec.GetFileSpec(),
@@ -314,7 +314,8 @@ lldb_private::Error PlatformDarwin::GetS
                   (IsHost() ? "host" : "remote"),
                   module_spec.GetFileSpec().GetDirectory().AsCString(),
                   module_spec.GetFileSpec().GetFilename().AsCString());
-            Error err = BringInRemoteFile(this, module_spec, module_cache_spec);
+            Status err =
+                BringInRemoteFile(this, module_spec, module_cache_spec);
             if (err.Fail())
               return err;
           }
@@ -329,7 +330,7 @@ lldb_private::Error PlatformDarwin::GetS
                       (IsHost() ? "host" : "remote"),
                       module_spec.GetFileSpec().GetDirectory().AsCString(),
                       module_spec.GetFileSpec().GetFilename().AsCString());
-        return Error();
+        return Status();
       }
 
       // bring in the remote module file
@@ -338,7 +339,7 @@ lldb_private::Error PlatformDarwin::GetS
                     (IsHost() ? "host" : "remote"),
                     module_spec.GetFileSpec().GetDirectory().AsCString(),
                     module_spec.GetFileSpec().GetFilename().AsCString());
-      Error err = BringInRemoteFile(this, module_spec, module_cache_spec);
+      Status err = BringInRemoteFile(this, module_spec, module_cache_spec);
       if (err.Fail())
         return err;
       if (module_cache_spec.Exists()) {
@@ -351,20 +352,20 @@ lldb_private::Error PlatformDarwin::GetS
         ModuleSpec local_spec(module_cache_spec, module_spec.GetArchitecture());
         module_sp.reset(new Module(local_spec));
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
-        return Error();
+        return Status();
       } else
-        return Error("unable to obtain valid module file");
+        return Status("unable to obtain valid module file");
     } else
-      return Error("no cache path");
+      return Status("no cache path");
   } else
-    return Error("unable to resolve module");
+    return Status("unable to resolve module");
 }
 
-Error PlatformDarwin::GetSharedModule(
+Status PlatformDarwin::GetSharedModule(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, ModuleSP *old_module_sp_ptr,
     bool *did_create_ptr) {
-  Error error;
+  Status error;
   module_sp.reset();
 
   if (IsRemote()) {
@@ -393,7 +394,7 @@ Error PlatformDarwin::GetSharedModule(
           ModuleSpec new_module_spec(module_spec);
           new_module_spec.GetFileSpec() = bundle_directory;
           if (Host::ResolveExecutableInBundle(new_module_spec.GetFileSpec())) {
-            Error new_error(Platform::GetSharedModule(
+            Status new_error(Platform::GetSharedModule(
                 new_module_spec, process, module_sp, NULL, old_module_sp_ptr,
                 did_create_ptr));
 
@@ -420,7 +421,7 @@ Error PlatformDarwin::GetSharedModule(
               if (new_file_spec.Exists()) {
                 ModuleSpec new_module_spec(module_spec);
                 new_module_spec.GetFileSpec() = new_file_spec;
-                Error new_error(Platform::GetSharedModule(
+                Status new_error(Platform::GetSharedModule(
                     new_module_spec, process, module_sp, NULL,
                     old_module_sp_ptr, did_create_ptr));
 
@@ -1185,7 +1186,7 @@ const char *PlatformDarwin::GetDeveloper
         int exit_status = -1;
         int signo = -1;
         std::string command_output;
-        Error error =
+        Status error =
             Host::RunShellCommand("/usr/bin/xcode-select --print-path",
                                   NULL, // current working directory
                                   &exit_status, &signo, &command_output,
@@ -1361,7 +1362,7 @@ static FileSpec GetXcodeContentsPath() {
         int signo = 0;
         std::string output;
         const char *command = "/usr/bin/xcode-select -p";
-        lldb_private::Error error = Host::RunShellCommand(
+        lldb_private::Status error = Host::RunShellCommand(
             command, // shell command to run
             NULL,    // current working directory
             &status, // Put the exit status of the process in here
@@ -1739,7 +1740,7 @@ lldb_private::FileSpec PlatformDarwin::L
   return FileSpec();
 }
 
-lldb_private::Error
+lldb_private::Status
 PlatformDarwin::LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) {
   // Starting in Fall 2016 OSes, NSLog messages only get mirrored to stderr
   // if the OS_ACTIVITY_DT_MODE environment variable is set.  (It doesn't

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Thu May 11 23:51:55 2017
@@ -32,7 +32,7 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  lldb_private::Error
+  lldb_private::Status
   ResolveSymbolFile(lldb_private::Target &target,
                     const lldb_private::ModuleSpec &sym_spec,
                     lldb_private::FileSpec &sym_file) override;
@@ -41,7 +41,7 @@ public:
       lldb_private::Target *target, lldb_private::Module &module,
       lldb_private::Stream *feedback_stream) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,
@@ -79,7 +79,7 @@ public:
 
   lldb_private::FileSpec LocateExecutable(const char *basename) override;
 
-  lldb_private::Error
+  lldb_private::Status
   LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
 
   static std::tuple<uint32_t, uint32_t, uint32_t, llvm::StringRef>
@@ -90,7 +90,7 @@ protected:
 
   void ReadLibdispatchOffsets(lldb_private::Process *process);
 
-  virtual lldb_private::Error GetSharedModuleWithLocalCache(
+  virtual lldb_private::Status GetSharedModuleWithLocalCache(
       const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr,
       lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr);

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Thu May 11 23:51:55 2017
@@ -31,9 +31,9 @@
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "llvm/Support/FileSystem.h"
@@ -664,11 +664,11 @@ bool PlatformDarwinKernel::KernelHasdSYM
   return false;
 }
 
-Error PlatformDarwinKernel::GetSharedModule(
+Status PlatformDarwinKernel::GetSharedModule(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, ModuleSP *old_module_sp_ptr,
     bool *did_create_ptr) {
-  Error error;
+  Status error;
   module_sp.reset();
   const FileSpec &platform_file = module_spec.GetFileSpec();
 
@@ -774,10 +774,10 @@ Error PlatformDarwinKernel::GetSharedMod
                                          old_module_sp_ptr, did_create_ptr);
 }
 
-Error PlatformDarwinKernel::ExamineKextForMatchingUUID(
+Status PlatformDarwinKernel::ExamineKextForMatchingUUID(
     const FileSpec &kext_bundle_path, const lldb_private::UUID &uuid,
     const ArchSpec &arch, ModuleSP &exe_module_sp) {
-  Error error;
+  Status error;
   FileSpec exe_file = kext_bundle_path;
   Host::ResolveExecutableInBundle(exe_file);
   if (exe_file.Exists()) {

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h Thu May 11 23:51:55 2017
@@ -66,7 +66,7 @@ public:
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,
@@ -139,7 +139,7 @@ protected:
   static bool
   KernelHasdSYMSibling(const lldb_private::FileSpec &kext_bundle_filepath);
 
-  lldb_private::Error
+  lldb_private::Status
   ExamineKextForMatchingUUID(const lldb_private::FileSpec &kext_bundle_path,
                              const lldb_private::UUID &uuid,
                              const lldb_private::ArchSpec &arch,

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Thu May 11 23:51:55 2017
@@ -27,9 +27,9 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -190,7 +190,7 @@ ConstString PlatformMacOSX::GetSDKDirect
             int signo = 0;
             std::string output;
             const char *command = "xcrun -sdk macosx --show-sdk-path";
-            lldb_private::Error error = RunShellCommand(
+            lldb_private::Status error = RunShellCommand(
                 command, // shell command to run
                 NULL,    // current working directory
                 &status, // Put the exit status of the process in here
@@ -235,9 +235,9 @@ ConstString PlatformMacOSX::GetSDKDirect
   return ConstString();
 }
 
-Error PlatformMacOSX::GetSymbolFile(const FileSpec &platform_file,
-                                    const UUID *uuid_ptr,
-                                    FileSpec &local_file) {
+Status PlatformMacOSX::GetSymbolFile(const FileSpec &platform_file,
+                                     const UUID *uuid_ptr,
+                                     FileSpec &local_file) {
   if (IsRemote()) {
     if (m_remote_platform_sp)
       return m_remote_platform_sp->GetFileWithUUID(platform_file, uuid_ptr,
@@ -246,10 +246,10 @@ Error PlatformMacOSX::GetSymbolFile(cons
 
   // Default to the local case
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
-lldb_private::Error
+lldb_private::Status
 PlatformMacOSX::GetFileWithUUID(const lldb_private::FileSpec &platform_file,
                                 const lldb_private::UUID *uuid_ptr,
                                 lldb_private::FileSpec &local_file) {
@@ -263,7 +263,7 @@ PlatformMacOSX::GetFileWithUUID(const ll
     if (local_os_build.compare(remote_os_build) == 0) {
       // same OS version: the local file is good enough
       local_file = platform_file;
-      return Error();
+      return Status();
     } else {
       // try to find the file in the cache
       std::string cache_path(GetLocalCacheDirectory());
@@ -272,13 +272,14 @@ PlatformMacOSX::GetFileWithUUID(const ll
       FileSpec module_cache_spec(cache_path, false);
       if (module_cache_spec.Exists()) {
         local_file = module_cache_spec;
-        return Error();
+        return Status();
       }
       // bring in the remote module file
       FileSpec module_cache_folder =
           module_cache_spec.CopyByRemovingLastPathComponent();
       // try to make the local directory first
-      Error err(llvm::sys::fs::create_directory(module_cache_folder.GetPath()));
+      Status err(
+          llvm::sys::fs::create_directory(module_cache_folder.GetPath()));
       if (err.Fail())
         return err;
       err = GetFile(platform_file, module_cache_spec);
@@ -286,13 +287,13 @@ PlatformMacOSX::GetFileWithUUID(const ll
         return err;
       if (module_cache_spec.Exists()) {
         local_file = module_cache_spec;
-        return Error();
+        return Status();
       } else
-        return Error("unable to obtain valid module file");
+        return Status("unable to obtain valid module file");
     }
   }
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
 bool PlatformMacOSX::GetSupportedArchitectureAtIndex(uint32_t idx,
@@ -304,12 +305,12 @@ bool PlatformMacOSX::GetSupportedArchite
 #endif
 }
 
-lldb_private::Error PlatformMacOSX::GetSharedModule(
+lldb_private::Status PlatformMacOSX::GetSharedModule(
     const lldb_private::ModuleSpec &module_spec, Process *process,
     lldb::ModuleSP &module_sp,
     const lldb_private::FileSpecList *module_search_paths_ptr,
     lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr) {
-  Error error = GetSharedModuleWithLocalCache(
+  Status error = GetSharedModuleWithLocalCache(
       module_spec, module_sp, module_search_paths_ptr, old_module_sp_ptr,
       did_create_ptr);
 
@@ -324,7 +325,7 @@ lldb_private::Error PlatformMacOSX::GetS
         lldb::ModuleSP x86_64_module_sp;
         lldb::ModuleSP old_x86_64_module_sp;
         bool did_create = false;
-        Error x86_64_error = GetSharedModuleWithLocalCache(
+        Status x86_64_error = GetSharedModuleWithLocalCache(
             module_spec_x86_64, x86_64_module_sp, module_search_paths_ptr,
             &old_x86_64_module_sp, &did_create);
         if (x86_64_module_sp && x86_64_module_sp->GetObjectFile()) {

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h Thu May 11 23:51:55 2017
@@ -45,7 +45,7 @@ public:
 
   uint32_t GetPluginVersion() override { return 1; }
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,
@@ -56,17 +56,18 @@ public:
     return GetDescriptionStatic(IsHost());
   }
 
-  lldb_private::Error GetSymbolFile(const lldb_private::FileSpec &platform_file,
-                                    const lldb_private::UUID *uuid_ptr,
-                                    lldb_private::FileSpec &local_file);
+  lldb_private::Status
+  GetSymbolFile(const lldb_private::FileSpec &platform_file,
+                const lldb_private::UUID *uuid_ptr,
+                lldb_private::FileSpec &local_file);
 
-  lldb_private::Error
+  lldb_private::Status
   GetFile(const lldb_private::FileSpec &source,
           const lldb_private::FileSpec &destination) override {
     return PlatformDarwin::GetFile(source, destination);
   }
 
-  lldb_private::Error
+  lldb_private::Status
   GetFileWithUUID(const lldb_private::FileSpec &platform_file,
                   const lldb_private::UUID *uuid_ptr,
                   lldb_private::FileSpec &local_file) override;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Thu May 11 23:51:55 2017
@@ -22,9 +22,9 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -75,10 +75,10 @@ void PlatformRemoteDarwinDevice::GetStat
   }
 }
 
-Error PlatformRemoteDarwinDevice::ResolveExecutable(
+Status PlatformRemoteDarwinDevice::ResolveExecutable(
     const ModuleSpec &ms, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   ModuleSpec resolved_module_spec(ms);
@@ -429,11 +429,11 @@ bool PlatformRemoteDarwinDevice::GetFile
   return false;
 }
 
-Error PlatformRemoteDarwinDevice::GetSymbolFile(const FileSpec &platform_file,
-                                       const UUID *uuid_ptr,
-                                       FileSpec &local_file) {
+Status PlatformRemoteDarwinDevice::GetSymbolFile(const FileSpec &platform_file,
+                                                 const UUID *uuid_ptr,
+                                                 FileSpec &local_file) {
   Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-  Error error;
+  Status error;
   char platform_file_path[PATH_MAX];
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
     char resolved_path[PATH_MAX];
@@ -489,7 +489,7 @@ Error PlatformRemoteDarwinDevice::GetSym
   return error;
 }
 
-Error PlatformRemoteDarwinDevice::GetSharedModule(
+Status PlatformRemoteDarwinDevice::GetSharedModule(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, ModuleSP *old_module_sp_ptr,
     bool *did_create_ptr) {
@@ -500,7 +500,7 @@ Error PlatformRemoteDarwinDevice::GetSha
   const FileSpec &platform_file = module_spec.GetFileSpec();
   Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
 
-  Error error;
+  Status error;
   char platform_file_path[PATH_MAX];
 
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
@@ -657,7 +657,7 @@ Error PlatformRemoteDarwinDevice::GetSha
         if (path_to_try.Exists()) {
           ModuleSpec new_module_spec(module_spec);
           new_module_spec.GetFileSpec() = path_to_try;
-          Error new_error(Platform::GetSharedModule(
+          Status new_error(Platform::GetSharedModule(
               new_module_spec, process, module_sp, NULL, old_module_sp_ptr,
               did_create_ptr));
 

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.h Thu May 11 23:51:55 2017
@@ -30,18 +30,18 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  lldb_private::Error ResolveExecutable(
+  lldb_private::Status ResolveExecutable(
       const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr) override;
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  virtual lldb_private::Error
+  virtual lldb_private::Status
   GetSymbolFile(const lldb_private::FileSpec &platform_file,
                 const lldb_private::UUID *uuid_ptr,
                 lldb_private::FileSpec &local_file);
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Thu May 11 23:51:55 2017
@@ -22,9 +22,9 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp Thu May 11 23:51:55 2017
@@ -24,9 +24,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "llvm/Support/FileSystem.h"
@@ -177,10 +177,10 @@ void PlatformiOSSimulator::GetStatus(Str
   PlatformAppleSimulator::GetStatus(strm);
 }
 
-Error PlatformiOSSimulator::ResolveExecutable(
+Status PlatformiOSSimulator::ResolveExecutable(
     const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   ModuleSpec resolved_module_spec(module_spec);
@@ -306,10 +306,10 @@ const char *PlatformiOSSimulator::GetSDK
   return NULL;
 }
 
-Error PlatformiOSSimulator::GetSymbolFile(const FileSpec &platform_file,
-                                          const UUID *uuid_ptr,
-                                          FileSpec &local_file) {
-  Error error;
+Status PlatformiOSSimulator::GetSymbolFile(const FileSpec &platform_file,
+                                           const UUID *uuid_ptr,
+                                           FileSpec &local_file) {
+  Status error;
   char platform_file_path[PATH_MAX];
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
     char resolved_path[PATH_MAX];
@@ -338,7 +338,7 @@ Error PlatformiOSSimulator::GetSymbolFil
   return error;
 }
 
-Error PlatformiOSSimulator::GetSharedModule(
+Status PlatformiOSSimulator::GetSharedModule(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, ModuleSP *old_module_sp_ptr,
     bool *did_create_ptr) {
@@ -346,7 +346,7 @@ Error PlatformiOSSimulator::GetSharedMod
   // system. So first we ask for the file in the cached SDK,
   // then we attempt to get a shared module for the right architecture
   // with the right UUID.
-  Error error;
+  Status error;
   ModuleSpec platform_module_spec(module_spec);
   const FileSpec &platform_file = module_spec.GetFileSpec();
   error = GetSymbolFile(platform_file, module_spec.GetUUIDPtr(),

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h Thu May 11 23:51:55 2017
@@ -51,7 +51,7 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  lldb_private::Error ResolveExecutable(
+  lldb_private::Status ResolveExecutable(
       const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr) override;
 
@@ -59,12 +59,12 @@ public:
 
   void GetStatus(lldb_private::Stream &strm) override;
 
-  virtual lldb_private::Error
+  virtual lldb_private::Status
   GetSymbolFile(const lldb_private::FileSpec &platform_file,
                 const lldb_private::UUID *uuid_ptr,
                 lldb_private::FileSpec &local_file);
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.h Thu May 11 23:51:55 2017
@@ -27,7 +27,7 @@ typedef void *id;
 #include "lldb/Interpreter/Args.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/Optional.h"
 
@@ -39,17 +39,17 @@ public:
 
   explicit operator bool() { return m_pid != LLDB_INVALID_PROCESS_ID; }
 
-  lldb_private::Error GetError() { return m_error; }
+  lldb_private::Status GetError() { return m_error; }
 
 private:
   Process(lldb::pid_t p);
 
-  Process(lldb_private::Error error);
+  Process(lldb_private::Status error);
 
-  Process(lldb::pid_t p, lldb_private::Error error);
+  Process(lldb::pid_t p, lldb_private::Status error);
 
   lldb::pid_t m_pid;
-  lldb_private::Error m_error;
+  lldb_private::Status m_error;
 
   friend class Device;
 };
@@ -165,9 +165,9 @@ public:
 
   State GetState();
 
-  bool Boot(lldb_private::Error &err);
+  bool Boot(lldb_private::Status &err);
 
-  bool Shutdown(lldb_private::Error &err);
+  bool Shutdown(lldb_private::Status &err);
 
   std::string GetUDID() const;
 

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Thu May 11 23:51:55 2017
@@ -61,10 +61,10 @@ using namespace lldb_utility;
 
 CoreSimulatorSupport::Process::Process(lldb::pid_t p) : m_pid(p), m_error() {}
 
-CoreSimulatorSupport::Process::Process(Error error)
+CoreSimulatorSupport::Process::Process(Status error)
     : m_pid(LLDB_INVALID_PROCESS_ID), m_error(error) {}
 
-CoreSimulatorSupport::Process::Process(lldb::pid_t p, Error error)
+CoreSimulatorSupport::Process::Process(lldb::pid_t p, Status error)
     : m_pid(p), m_error(error) {}
 
 CoreSimulatorSupport::DeviceType::DeviceType()
@@ -345,7 +345,7 @@ operator!=(const CoreSimulatorSupport::M
   return false;
 }
 
-bool CoreSimulatorSupport::Device::Boot(Error &err) {
+bool CoreSimulatorSupport::Device::Boot(Status &err) {
   if (m_dev == nil) {
     err.SetErrorString("no valid simulator instance");
     return false;
@@ -371,7 +371,7 @@ bool CoreSimulatorSupport::Device::Boot(
   }
 }
 
-bool CoreSimulatorSupport::Device::Shutdown(Error &err) {
+bool CoreSimulatorSupport::Device::Shutdown(Status &err) {
   NSError *nserror;
   if ([m_dev shutdownWithError:&nserror]) {
     err.Clear();
@@ -382,10 +382,10 @@ bool CoreSimulatorSupport::Device::Shutd
   }
 }
 
-static Error HandleFileAction(ProcessLaunchInfo &launch_info,
-                              NSMutableDictionary *options, NSString *key,
-                              const int fd, File &file) {
-  Error error;
+static Status HandleFileAction(ProcessLaunchInfo &launch_info,
+                               NSMutableDictionary *options, NSString *key,
+                               const int fd, File &file) {
+  Status error;
   const FileAction *file_action = launch_info.GetFileActionForFD(fd);
   if (file_action) {
     switch (file_action->GetAction()) {
@@ -426,7 +426,7 @@ static Error HandleFileAction(ProcessLau
             }
           }
         }
-        Error posix_error;
+        Status posix_error;
         int created_fd =
             open(file_spec.GetPath().c_str(), file_action->GetActionArgument(),
                  S_IRUSR | S_IWUSR);
@@ -499,7 +499,7 @@ CoreSimulatorSupport::Device::Spawn(Proc
     [options setObject:env_dict forKey:kSimDeviceSpawnEnvironment];
   }
 
-  Error error;
+  Status error;
   File stdin_file;
   File stdout_file;
   File stderr_file;

Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 // Define these constants from NetBSD mman.h for use when targeting
@@ -262,11 +262,11 @@ bool PlatformNetBSD::CanDebugProcess() {
 // lldb-launch, llgs-attach.  This differs from current lldb-launch,
 // debugserver-attach
 // approach on MacOSX.
-lldb::ProcessSP
-PlatformNetBSD::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
-                            Target *target, // Can be NULL, if NULL create a new
-                                            // target, else use existing one
-                            Error &error) {
+lldb::ProcessSP PlatformNetBSD::DebugProcess(
+    ProcessLaunchInfo &launch_info, Debugger &debugger,
+    Target *target, // Can be NULL, if NULL create a new
+                    // target, else use existing one
+    Status &error) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log)
     log->Printf("PlatformNetBSD::%s entered (target %p)", __FUNCTION__,

Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h Thu May 11 23:51:55 2017
@@ -55,7 +55,7 @@ public:
 
   lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
                                Debugger &debugger, Target *target,
-                               Error &error) override;
+                               Status &error) override;
 
   void CalculateTrapHandlerSymbolNames() override;
 

Modified: lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 // Define these constants from OpenBSD mman.h for use when targeting

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Thu May 11 23:51:55 2017
@@ -88,7 +88,7 @@ bool PlatformPOSIX::IsConnected() const
   return false;
 }
 
-lldb_private::Error PlatformPOSIX::RunShellCommand(
+lldb_private::Status PlatformPOSIX::RunShellCommand(
     const char *command, // Shouldn't be NULL
     const FileSpec &
         working_dir, // Pass empty FileSpec to use the current working directory
@@ -109,14 +109,15 @@ lldb_private::Error PlatformPOSIX::RunSh
                                                    status_ptr, signo_ptr,
                                                    command_output, timeout_sec);
     else
-      return Error("unable to run a remote command without a platform");
+      return Status("unable to run a remote command without a platform");
   }
 }
 
-Error PlatformPOSIX::ResolveExecutable(const ModuleSpec &module_spec,
-                                  lldb::ModuleSP &exe_module_sp,
-                                  const FileSpecList *module_search_paths_ptr) {
-  Error error;
+Status
+PlatformPOSIX::ResolveExecutable(const ModuleSpec &module_spec,
+                                 lldb::ModuleSP &exe_module_sp,
+                                 const FileSpecList *module_search_paths_ptr) {
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   char exe_path[PATH_MAX];
@@ -250,16 +251,16 @@ Error PlatformPOSIX::ResolveExecutable(c
   return error;
 }
 
-Error PlatformPOSIX::GetFileWithUUID(const FileSpec &platform_file,
-                                       const UUID *uuid_ptr,
-                                       FileSpec &local_file) {
+Status PlatformPOSIX::GetFileWithUUID(const FileSpec &platform_file,
+                                      const UUID *uuid_ptr,
+                                      FileSpec &local_file) {
   if (IsRemote() && m_remote_platform_sp)
       return m_remote_platform_sp->GetFileWithUUID(platform_file, uuid_ptr,
                                                    local_file);
 
   // Default to the local case
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
 bool PlatformPOSIX::GetProcessInfo(lldb::pid_t pid,
@@ -282,16 +283,16 @@ PlatformPOSIX::FindProcesses(const Proce
   return 0;
 }
 
-Error PlatformPOSIX::MakeDirectory(const FileSpec &file_spec,
-                                   uint32_t file_permissions) {
+Status PlatformPOSIX::MakeDirectory(const FileSpec &file_spec,
+                                    uint32_t file_permissions) {
   if (m_remote_platform_sp)
     return m_remote_platform_sp->MakeDirectory(file_spec, file_permissions);
   else
     return Platform::MakeDirectory(file_spec, file_permissions);
 }
 
-Error PlatformPOSIX::GetFilePermissions(const FileSpec &file_spec,
-                                        uint32_t &file_permissions) {
+Status PlatformPOSIX::GetFilePermissions(const FileSpec &file_spec,
+                                         uint32_t &file_permissions) {
   if (m_remote_platform_sp)
     return m_remote_platform_sp->GetFilePermissions(file_spec,
                                                     file_permissions);
@@ -299,8 +300,8 @@ Error PlatformPOSIX::GetFilePermissions(
     return Platform::GetFilePermissions(file_spec, file_permissions);
 }
 
-Error PlatformPOSIX::SetFilePermissions(const FileSpec &file_spec,
-                                        uint32_t file_permissions) {
+Status PlatformPOSIX::SetFilePermissions(const FileSpec &file_spec,
+                                         uint32_t file_permissions) {
   if (m_remote_platform_sp)
     return m_remote_platform_sp->SetFilePermissions(file_spec,
                                                     file_permissions);
@@ -310,7 +311,7 @@ Error PlatformPOSIX::SetFilePermissions(
 
 lldb::user_id_t PlatformPOSIX::OpenFile(const FileSpec &file_spec,
                                         uint32_t flags, uint32_t mode,
-                                        Error &error) {
+                                        Status &error) {
   if (IsHost())
     return FileCache::GetInstance().OpenFile(file_spec, flags, mode, error);
   else if (m_remote_platform_sp)
@@ -319,7 +320,7 @@ lldb::user_id_t PlatformPOSIX::OpenFile(
     return Platform::OpenFile(file_spec, flags, mode, error);
 }
 
-bool PlatformPOSIX::CloseFile(lldb::user_id_t fd, Error &error) {
+bool PlatformPOSIX::CloseFile(lldb::user_id_t fd, Status &error) {
   if (IsHost())
     return FileCache::GetInstance().CloseFile(fd, error);
   else if (m_remote_platform_sp)
@@ -329,7 +330,7 @@ bool PlatformPOSIX::CloseFile(lldb::user
 }
 
 uint64_t PlatformPOSIX::ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
-                                 uint64_t dst_len, Error &error) {
+                                 uint64_t dst_len, Status &error) {
   if (IsHost())
     return FileCache::GetInstance().ReadFile(fd, offset, dst, dst_len, error);
   else if (m_remote_platform_sp)
@@ -340,7 +341,7 @@ uint64_t PlatformPOSIX::ReadFile(lldb::u
 
 uint64_t PlatformPOSIX::WriteFile(lldb::user_id_t fd, uint64_t offset,
                                   const void *src, uint64_t src_len,
-                                  Error &error) {
+                                  Status &error) {
   if (IsHost())
     return FileCache::GetInstance().WriteFile(fd, offset, src, src_len, error);
   else if (m_remote_platform_sp)
@@ -370,7 +371,7 @@ static uint32_t chown_file(Platform *pla
   return status;
 }
 
-lldb_private::Error
+lldb_private::Status
 PlatformPOSIX::PutFile(const lldb_private::FileSpec &source,
                        const lldb_private::FileSpec &destination, uint32_t uid,
                        uint32_t gid) {
@@ -378,34 +379,34 @@ PlatformPOSIX::PutFile(const lldb_privat
 
   if (IsHost()) {
     if (FileSpec::Equal(source, destination, true))
-      return Error();
+      return Status();
     // cp src dst
     // chown uid:gid dst
     std::string src_path(source.GetPath());
     if (src_path.empty())
-      return Error("unable to get file path for source");
+      return Status("unable to get file path for source");
     std::string dst_path(destination.GetPath());
     if (dst_path.empty())
-      return Error("unable to get file path for destination");
+      return Status("unable to get file path for destination");
     StreamString command;
     command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str());
     int status;
     RunShellCommand(command.GetData(), NULL, &status, NULL, NULL, 10);
     if (status != 0)
-      return Error("unable to perform copy");
+      return Status("unable to perform copy");
     if (uid == UINT32_MAX && gid == UINT32_MAX)
-      return Error();
+      return Status();
     if (chown_file(this, dst_path.c_str(), uid, gid) != 0)
-      return Error("unable to perform chown");
-    return Error();
+      return Status("unable to perform chown");
+    return Status();
   } else if (m_remote_platform_sp) {
     if (GetSupportsRSync()) {
       std::string src_path(source.GetPath());
       if (src_path.empty())
-        return Error("unable to get file path for source");
+        return Status("unable to get file path for source");
       std::string dst_path(destination.GetPath());
       if (dst_path.empty())
-        return Error("unable to get file path for destination");
+        return Status("unable to get file path for destination");
       StreamString command;
       if (GetIgnoresRemoteHostname()) {
         if (!GetRSyncPrefix())
@@ -424,8 +425,8 @@ PlatformPOSIX::PutFile(const lldb_privat
       if (retcode == 0) {
         // Don't chown a local file for a remote system
         //                if (chown_file(this,dst_path.c_str(),uid,gid) != 0)
-        //                    return Error("unable to perform chown");
-        return Error();
+        //                    return Status("unable to perform chown");
+        return Status();
       }
       // if we are still here rsync has failed - let's try the slow way before
       // giving up
@@ -446,7 +447,7 @@ lldb::user_id_t PlatformPOSIX::GetFileSi
     return Platform::GetFileSize(file_spec);
 }
 
-Error PlatformPOSIX::CreateSymlink(const FileSpec &src, const FileSpec &dst) {
+Status PlatformPOSIX::CreateSymlink(const FileSpec &src, const FileSpec &dst) {
   if (IsHost())
     return FileSystem::Symlink(src, dst);
   else if (m_remote_platform_sp)
@@ -464,7 +465,7 @@ bool PlatformPOSIX::GetFileExists(const
     return Platform::GetFileExists(file_spec);
 }
 
-Error PlatformPOSIX::Unlink(const FileSpec &file_spec) {
+Status PlatformPOSIX::Unlink(const FileSpec &file_spec) {
   if (IsHost())
     return llvm::sys::fs::remove(file_spec.GetPath());
   else if (m_remote_platform_sp)
@@ -473,7 +474,7 @@ Error PlatformPOSIX::Unlink(const FileSp
     return Platform::Unlink(file_spec);
 }
 
-lldb_private::Error PlatformPOSIX::GetFile(
+lldb_private::Status PlatformPOSIX::GetFile(
     const lldb_private::FileSpec &source,      // remote file path
     const lldb_private::FileSpec &destination) // local file path
 {
@@ -482,22 +483,22 @@ lldb_private::Error PlatformPOSIX::GetFi
   // Check the args, first.
   std::string src_path(source.GetPath());
   if (src_path.empty())
-    return Error("unable to get file path for source");
+    return Status("unable to get file path for source");
   std::string dst_path(destination.GetPath());
   if (dst_path.empty())
-    return Error("unable to get file path for destination");
+    return Status("unable to get file path for destination");
   if (IsHost()) {
     if (FileSpec::Equal(source, destination, true))
-      return Error("local scenario->source and destination are the same file "
-                   "path: no operation performed");
+      return Status("local scenario->source and destination are the same file "
+                    "path: no operation performed");
     // cp src dst
     StreamString cp_command;
     cp_command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str());
     int status;
     RunShellCommand(cp_command.GetData(), NULL, &status, NULL, NULL, 10);
     if (status != 0)
-      return Error("unable to perform copy");
-    return Error();
+      return Status("unable to perform copy");
+    return Status();
   } else if (m_remote_platform_sp) {
     if (GetSupportsRSync()) {
       StreamString command;
@@ -517,7 +518,7 @@ lldb_private::Error PlatformPOSIX::GetFi
       int retcode;
       Host::RunShellCommand(command.GetData(), NULL, &retcode, NULL, NULL, 60);
       if (retcode == 0)
-        return Error();
+        return Status();
       // If we are here, rsync has failed - let's try the slow way before giving
       // up
     }
@@ -527,12 +528,12 @@ lldb_private::Error PlatformPOSIX::GetFi
     // close dst
     if (log)
       log->Printf("[GetFile] Using block by block transfer....\n");
-    Error error;
+    Status error;
     user_id_t fd_src = OpenFile(source, File::eOpenOptionRead,
                                 lldb::eFilePermissionsFileDefault, error);
 
     if (fd_src == UINT64_MAX)
-      return Error("unable to open source file");
+      return Status("unable to open source file");
 
     uint32_t permissions = 0;
     error = GetFilePermissions(source, permissions);
@@ -710,8 +711,8 @@ const char *PlatformPOSIX::GetGroupName(
   return NULL;
 }
 
-Error PlatformPOSIX::ConnectRemote(Args &args) {
-  Error error;
+Status PlatformPOSIX::ConnectRemote(Args &args) {
+  Status error;
   if (IsHost()) {
     error.SetErrorStringWithFormat(
         "can't connect to the host platform '%s', always connected",
@@ -753,8 +754,8 @@ Error PlatformPOSIX::ConnectRemote(Args
   return error;
 }
 
-Error PlatformPOSIX::DisconnectRemote() {
-  Error error;
+Status PlatformPOSIX::DisconnectRemote() {
+  Status error;
 
   if (IsHost()) {
     error.SetErrorStringWithFormat(
@@ -769,8 +770,8 @@ Error PlatformPOSIX::DisconnectRemote()
   return error;
 }
 
-Error PlatformPOSIX::LaunchProcess(ProcessLaunchInfo &launch_info) {
-  Error error;
+Status PlatformPOSIX::LaunchProcess(ProcessLaunchInfo &launch_info) {
+  Status error;
 
   if (IsHost()) {
     error = Platform::LaunchProcess(launch_info);
@@ -783,19 +784,19 @@ Error PlatformPOSIX::LaunchProcess(Proce
   return error;
 }
 
-lldb_private::Error PlatformPOSIX::KillProcess(const lldb::pid_t pid) {
+lldb_private::Status PlatformPOSIX::KillProcess(const lldb::pid_t pid) {
   if (IsHost())
     return Platform::KillProcess(pid);
 
   if (m_remote_platform_sp)
     return m_remote_platform_sp->KillProcess(pid);
 
-  return Error("the platform is not currently connected");
+  return Status("the platform is not currently connected");
 }
 
 lldb::ProcessSP PlatformPOSIX::Attach(ProcessAttachInfo &attach_info,
                                       Debugger &debugger, Target *target,
-                                      Error &error) {
+                                      Status &error) {
   lldb::ProcessSP process_sp;
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
 
@@ -855,7 +856,7 @@ lldb::ProcessSP
 PlatformPOSIX::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
                             Target *target, // Can be NULL, if NULL create a new
                                             // target, else use existing one
-                            Error &error) {
+                            Status &error) {
   ProcessSP process_sp;
 
   if (IsHost()) {
@@ -881,23 +882,23 @@ void PlatformPOSIX::CalculateTrapHandler
   m_trap_handlers.push_back(ConstString("_sigtramp"));
 }
 
-Error PlatformPOSIX::EvaluateLibdlExpression(
+Status PlatformPOSIX::EvaluateLibdlExpression(
     lldb_private::Process *process, const char *expr_cstr,
     const char *expr_prefix, lldb::ValueObjectSP &result_valobj_sp) {
   DynamicLoader *loader = process->GetDynamicLoader();
   if (loader) {
-    Error error = loader->CanLoadImage();
+    Status error = loader->CanLoadImage();
     if (error.Fail())
       return error;
   }
 
   ThreadSP thread_sp(process->GetThreadList().GetExpressionExecutionThread());
   if (!thread_sp)
-    return Error("Selected thread isn't valid");
+    return Status("Selected thread isn't valid");
 
   StackFrameSP frame_sp(thread_sp->GetStackFrameAtIndex(0));
   if (!frame_sp)
-    return Error("Frame 0 isn't valid");
+    return Status("Frame 0 isn't valid");
 
   ExecutionContext exe_ctx;
   frame_sp->CalculateExecutionContext(exe_ctx);
@@ -910,7 +911,7 @@ Error PlatformPOSIX::EvaluateLibdlExpres
                                          // don't do the work to trap them.
   expr_options.SetTimeout(std::chrono::seconds(2));
 
-  Error expr_error;
+  Status expr_error;
   ExpressionResults result =
       UserExpression::Evaluate(exe_ctx, expr_options, expr_cstr, expr_prefix,
                                result_valobj_sp, expr_error);
@@ -919,12 +920,12 @@ Error PlatformPOSIX::EvaluateLibdlExpres
 
   if (result_valobj_sp->GetError().Fail())
     return result_valobj_sp->GetError();
-  return Error();
+  return Status();
 }
 
 uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process,
                                     const lldb_private::FileSpec &remote_file,
-                                    lldb_private::Error &error) {
+                                    lldb_private::Status &error) {
   char path[PATH_MAX];
   remote_file.GetPath(path, sizeof(path));
 
@@ -983,18 +984,18 @@ uint32_t PlatformPOSIX::DoLoadImage(lldb
   return LLDB_INVALID_IMAGE_TOKEN;
 }
 
-Error PlatformPOSIX::UnloadImage(lldb_private::Process *process,
-                                 uint32_t image_token) {
+Status PlatformPOSIX::UnloadImage(lldb_private::Process *process,
+                                  uint32_t image_token) {
   const addr_t image_addr = process->GetImagePtrFromToken(image_token);
   if (image_addr == LLDB_INVALID_ADDRESS)
-    return Error("Invalid image token");
+    return Status("Invalid image token");
 
   StreamString expr;
   expr.Printf("dlclose((void *)0x%" PRIx64 ")", image_addr);
   const char *prefix = GetLibdlFunctionDeclarations();
   lldb::ValueObjectSP result_valobj_sp;
-  Error error = EvaluateLibdlExpression(process, expr.GetData(), prefix,
-                                        result_valobj_sp);
+  Status error = EvaluateLibdlExpression(process, expr.GetData(), prefix,
+                                         result_valobj_sp);
   if (error.Fail())
     return error;
 
@@ -1004,17 +1005,17 @@ Error PlatformPOSIX::UnloadImage(lldb_pr
   Scalar scalar;
   if (result_valobj_sp->ResolveValue(scalar)) {
     if (scalar.UInt(1))
-      return Error("expression failed: \"%s\"", expr.GetData());
+      return Status("expression failed: \"%s\"", expr.GetData());
     process->ResetImageToken(image_token);
   }
-  return Error();
+  return Status();
 }
 
 lldb::ProcessSP PlatformPOSIX::ConnectProcess(llvm::StringRef connect_url,
                                               llvm::StringRef plugin_name,
                                               lldb_private::Debugger &debugger,
                                               lldb_private::Target *target,
-                                              lldb_private::Error &error) {
+                                              lldb_private::Status &error) {
   if (m_remote_platform_sp)
     return m_remote_platform_sp->ConnectProcess(connect_url, plugin_name,
                                                 debugger, target, error);
@@ -1033,7 +1034,7 @@ const char *PlatformPOSIX::GetLibdlFunct
 }
 
 size_t PlatformPOSIX::ConnectToWaitingProcesses(Debugger &debugger,
-                                                Error &error) {
+                                                Status &error) {
   if (m_remote_platform_sp)
     return m_remote_platform_sp->ConnectToWaitingProcesses(debugger, error);
   return Platform::ConnectToWaitingProcesses(debugger, error);

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h Thu May 11 23:51:55 2017
@@ -43,29 +43,30 @@ public:
 
   const char *GetGroupName(uint32_t gid) override;
 
-  lldb_private::Error PutFile(const lldb_private::FileSpec &source,
-                              const lldb_private::FileSpec &destination,
-                              uint32_t uid = UINT32_MAX,
-                              uint32_t gid = UINT32_MAX) override;
+  lldb_private::Status PutFile(const lldb_private::FileSpec &source,
+                               const lldb_private::FileSpec &destination,
+                               uint32_t uid = UINT32_MAX,
+                               uint32_t gid = UINT32_MAX) override;
 
   lldb::user_id_t OpenFile(const lldb_private::FileSpec &file_spec,
                            uint32_t flags, uint32_t mode,
-                           lldb_private::Error &error) override;
+                           lldb_private::Status &error) override;
 
-  bool CloseFile(lldb::user_id_t fd, lldb_private::Error &error) override;
+  bool CloseFile(lldb::user_id_t fd, lldb_private::Status &error) override;
 
   uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
-                    uint64_t dst_len, lldb_private::Error &error) override;
+                    uint64_t dst_len, lldb_private::Status &error) override;
 
   uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src,
-                     uint64_t src_len, lldb_private::Error &error) override;
+                     uint64_t src_len, lldb_private::Status &error) override;
 
   lldb::user_id_t GetFileSize(const lldb_private::FileSpec &file_spec) override;
 
-  lldb_private::Error CreateSymlink(const lldb_private::FileSpec &src,
-                                    const lldb_private::FileSpec &dst) override;
+  lldb_private::Status
+  CreateSymlink(const lldb_private::FileSpec &src,
+                const lldb_private::FileSpec &dst) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetFile(const lldb_private::FileSpec &source,
           const lldb_private::FileSpec &destination) override;
 
@@ -88,7 +89,7 @@ public:
 
   bool IsConnected() const override;
 
-  lldb_private::Error RunShellCommand(
+  lldb_private::Status RunShellCommand(
       const char *command,                       // Shouldn't be nullptr
       const lldb_private::FileSpec &working_dir, // Pass empty FileSpec to use
                                                  // the current working
@@ -101,37 +102,39 @@ public:
       uint32_t timeout_sec)
       override; // Timeout in seconds to wait for shell program to finish
 
-  lldb_private::Error ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
-      lldb::ModuleSP &module_sp,
+  lldb_private::Status ResolveExecutable(
+      const lldb_private::ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
       const lldb_private::FileSpecList *module_search_paths_ptr) override;
 
-  lldb_private::Error GetFileWithUUID(const lldb_private::FileSpec &platform_file, const lldb_private::UUID *uuid,
-                        lldb_private::FileSpec &local_file) override;
+  lldb_private::Status
+  GetFileWithUUID(const lldb_private::FileSpec &platform_file,
+                  const lldb_private::UUID *uuid,
+                  lldb_private::FileSpec &local_file) override;
 
   bool GetProcessInfo(lldb::pid_t pid, lldb_private::ProcessInstanceInfo &proc_info) override;
 
   uint32_t FindProcesses(const lldb_private::ProcessInstanceInfoMatch &match_info,
                          lldb_private::ProcessInstanceInfoList &process_infos) override;
 
-  lldb_private::Error MakeDirectory(const lldb_private::FileSpec &file_spec,
-                                    uint32_t mode) override;
+  lldb_private::Status MakeDirectory(const lldb_private::FileSpec &file_spec,
+                                     uint32_t mode) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetFilePermissions(const lldb_private::FileSpec &file_spec,
                      uint32_t &file_permissions) override;
 
-  lldb_private::Error
+  lldb_private::Status
   SetFilePermissions(const lldb_private::FileSpec &file_spec,
                      uint32_t file_permissions) override;
 
   bool GetFileExists(const lldb_private::FileSpec &file_spec) override;
 
-  lldb_private::Error Unlink(const lldb_private::FileSpec &file_spec) override;
+  lldb_private::Status Unlink(const lldb_private::FileSpec &file_spec) override;
 
-  lldb_private::Error
+  lldb_private::Status
   LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
 
-  lldb_private::Error KillProcess(const lldb::pid_t pid) override;
+  lldb_private::Status KillProcess(const lldb::pid_t pid) override;
 
   lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info,
                          lldb_private::Debugger &debugger,
@@ -139,7 +142,7 @@ public:
                                                        // nullptr create a new
                                                        // target, else use
                                                        // existing one
-                         lldb_private::Error &error) override;
+                         lldb_private::Status &error) override;
 
   lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
                                lldb_private::Debugger &debugger,
@@ -148,7 +151,7 @@ public:
                                                              // create a new
                                                              // target, else use
                                                              // existing one
-                               lldb_private::Error &error) override;
+                               lldb_private::Status &error) override;
 
   std::string GetPlatformSpecificConnectionInformation() override;
 
@@ -157,25 +160,25 @@ public:
 
   void CalculateTrapHandlerSymbolNames() override;
 
-  lldb_private::Error ConnectRemote(lldb_private::Args &args) override;
+  lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
 
-  lldb_private::Error DisconnectRemote() override;
+  lldb_private::Status DisconnectRemote() override;
 
   uint32_t DoLoadImage(lldb_private::Process *process,
                        const lldb_private::FileSpec &remote_file,
-                       lldb_private::Error &error) override;
+                       lldb_private::Status &error) override;
 
-  lldb_private::Error UnloadImage(lldb_private::Process *process,
-                                  uint32_t image_token) override;
+  lldb_private::Status UnloadImage(lldb_private::Process *process,
+                                   uint32_t image_token) override;
 
   lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url,
                                  llvm::StringRef plugin_name,
                                  lldb_private::Debugger &debugger,
                                  lldb_private::Target *target,
-                                 lldb_private::Error &error) override;
+                                 lldb_private::Status &error) override;
 
   size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
-                                   lldb_private::Error &error) override;
+                                   lldb_private::Status &error) override;
 
   lldb_private::ConstString GetFullNameForDylib(lldb_private::ConstString basename) override;
 
@@ -193,7 +196,7 @@ protected:
   lldb::PlatformSP m_remote_platform_sp; // Allow multiple ways to connect to a
                                          // remote POSIX-compliant OS
 
-  lldb_private::Error
+  lldb_private::Status
   EvaluateLibdlExpression(lldb_private::Process *process, const char *expr_cstr,
                           const char *expr_prefix,
                           lldb::ValueObjectSP &result_valobj_sp);

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Thu May 11 23:51:55 2017
@@ -27,7 +27,7 @@
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -180,10 +180,10 @@ bool PlatformWindows::GetModuleSpec(cons
   return Platform::GetModuleSpec(module_file_spec, arch, module_spec);
 }
 
-Error PlatformWindows::ResolveExecutable(
+Status PlatformWindows::ResolveExecutable(
     const ModuleSpec &ms, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   char exe_path[PATH_MAX];
@@ -323,8 +323,8 @@ bool PlatformWindows::IsConnected() cons
   return false;
 }
 
-Error PlatformWindows::ConnectRemote(Args &args) {
-  Error error;
+Status PlatformWindows::ConnectRemote(Args &args) {
+  Status error;
   if (IsHost()) {
     error.SetErrorStringWithFormat(
         "can't connect to the host platform '%s', always connected",
@@ -353,8 +353,8 @@ Error PlatformWindows::ConnectRemote(Arg
   return error;
 }
 
-Error PlatformWindows::DisconnectRemote() {
-  Error error;
+Status PlatformWindows::DisconnectRemote() {
+  Status error;
 
   if (IsHost()) {
     error.SetErrorStringWithFormat(
@@ -396,8 +396,8 @@ PlatformWindows::FindProcesses(const Pro
   return match_count;
 }
 
-Error PlatformWindows::LaunchProcess(ProcessLaunchInfo &launch_info) {
-  Error error;
+Status PlatformWindows::LaunchProcess(ProcessLaunchInfo &launch_info) {
+  Status error;
   if (IsHost()) {
     error = Platform::LaunchProcess(launch_info);
   } else {
@@ -411,7 +411,7 @@ Error PlatformWindows::LaunchProcess(Pro
 
 ProcessSP PlatformWindows::DebugProcess(ProcessLaunchInfo &launch_info,
                                         Debugger &debugger, Target *target,
-                                        Error &error) {
+                                        Status &error) {
   // Windows has special considerations that must be followed when launching or
   // attaching to a process.  The
   // key requirement is that when launching or attaching to a process, you must
@@ -457,7 +457,7 @@ ProcessSP PlatformWindows::DebugProcess(
 
 lldb::ProcessSP PlatformWindows::Attach(ProcessAttachInfo &attach_info,
                                         Debugger &debugger, Target *target,
-                                        Error &error) {
+                                        Status &error) {
   error.Clear();
   lldb::ProcessSP process_sp;
   if (!IsHost()) {
@@ -516,9 +516,9 @@ const char *PlatformWindows::GetGroupNam
   return nullptr;
 }
 
-Error PlatformWindows::GetFileWithUUID(const FileSpec &platform_file,
-                                       const UUID *uuid_ptr,
-                                       FileSpec &local_file) {
+Status PlatformWindows::GetFileWithUUID(const FileSpec &platform_file,
+                                        const UUID *uuid_ptr,
+                                        FileSpec &local_file) {
   if (IsRemote()) {
     if (m_remote_platform_sp)
       return m_remote_platform_sp->GetFileWithUUID(platform_file, uuid_ptr,
@@ -527,14 +527,14 @@ Error PlatformWindows::GetFileWithUUID(c
 
   // Default to the local case
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
-Error PlatformWindows::GetSharedModule(
+Status PlatformWindows::GetSharedModule(
     const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, ModuleSP *old_module_sp_ptr,
     bool *did_create_ptr) {
-  Error error;
+  Status error;
   module_sp.reset();
 
   if (IsRemote()) {

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h Thu May 11 23:51:55 2017
@@ -49,9 +49,10 @@ public:
                      const lldb_private::ArchSpec &arch,
                      lldb_private::ModuleSpec &module_spec) override;
 
-  Error ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
-                          lldb::ModuleSP &module_sp,
-                          const FileSpecList *module_search_paths_ptr) override;
+  Status
+  ResolveExecutable(const lldb_private::ModuleSpec &module_spec,
+                    lldb::ModuleSP &module_sp,
+                    const FileSpecList *module_search_paths_ptr) override;
 
   const char *GetDescription() override {
     return GetPluginDescriptionStatic(IsHost());
@@ -68,9 +69,9 @@ public:
 
   bool IsConnected() const override;
 
-  lldb_private::Error ConnectRemote(lldb_private::Args &args) override;
+  lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
 
-  lldb_private::Error DisconnectRemote() override;
+  lldb_private::Status DisconnectRemote() override;
 
   const char *GetHostname() override;
 
@@ -85,25 +86,25 @@ public:
   FindProcesses(const lldb_private::ProcessInstanceInfoMatch &match_info,
                 lldb_private::ProcessInstanceInfoList &process_infos) override;
 
-  lldb_private::Error
+  lldb_private::Status
   LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) override;
 
   lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
                                lldb_private::Debugger &debugger,
                                lldb_private::Target *target,
-                               lldb_private::Error &error) override;
+                               lldb_private::Status &error) override;
 
   lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info,
                          lldb_private::Debugger &debugger,
                          lldb_private::Target *target,
-                         lldb_private::Error &error) override;
+                         lldb_private::Status &error) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetFileWithUUID(const lldb_private::FileSpec &platform_file,
                   const lldb_private::UUID *uuid,
                   lldb_private::FileSpec &local_file) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetSharedModule(const lldb_private::ModuleSpec &module_spec,
                   lldb_private::Process *process, lldb::ModuleSP &module_sp,
                   const lldb_private::FileSpecList *module_search_paths_ptr,

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/UriParser.h"
 
@@ -93,12 +93,12 @@ const char *PlatformRemoteGDBServer::Get
   return GetDescriptionStatic();
 }
 
-Error PlatformRemoteGDBServer::ResolveExecutable(
+Status PlatformRemoteGDBServer::ResolveExecutable(
     const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
     const FileSpecList *module_search_paths_ptr) {
   // copied from PlatformRemoteiOS
 
-  Error error;
+  Status error;
   // Nothing special to do here, just use the actual file and architecture
 
   ModuleSpec resolved_module_spec(module_spec);
@@ -189,12 +189,12 @@ bool PlatformRemoteGDBServer::GetModuleS
   return true;
 }
 
-Error PlatformRemoteGDBServer::GetFileWithUUID(const FileSpec &platform_file,
-                                               const UUID *uuid_ptr,
-                                               FileSpec &local_file) {
+Status PlatformRemoteGDBServer::GetFileWithUUID(const FileSpec &platform_file,
+                                                const UUID *uuid_ptr,
+                                                FileSpec &local_file) {
   // Default to the local case
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
 //------------------------------------------------------------------
@@ -291,8 +291,8 @@ bool PlatformRemoteGDBServer::IsConnecte
   return m_gdb_client.IsConnected();
 }
 
-Error PlatformRemoteGDBServer::ConnectRemote(Args &args) {
-  Error error;
+Status PlatformRemoteGDBServer::ConnectRemote(Args &args) {
+  Status error;
   if (IsConnected()) {
     error.SetErrorStringWithFormat("the platform is already connected to '%s', "
                                    "execute 'platform disconnect' to close the "
@@ -306,10 +306,10 @@ Error PlatformRemoteGDBServer::ConnectRe
       std::string path;
       const char *url = args.GetArgumentAtIndex(0);
       if (!url)
-        return Error("URL is null.");
+        return Status("URL is null.");
       llvm::StringRef scheme, hostname, pathname;
       if (!UriParser::Parse(url, scheme, hostname, port, pathname))
-        return Error("Invalid URL: %s", url);
+        return Status("Invalid URL: %s", url);
       m_platform_scheme = scheme;
       m_platform_hostname = hostname;
       path = pathname;
@@ -336,8 +336,8 @@ Error PlatformRemoteGDBServer::ConnectRe
   return error;
 }
 
-Error PlatformRemoteGDBServer::DisconnectRemote() {
-  Error error;
+Status PlatformRemoteGDBServer::DisconnectRemote() {
+  Status error;
   m_gdb_client.Disconnect(&error);
   m_remote_signals_sp.reset();
   return error;
@@ -386,9 +386,9 @@ bool PlatformRemoteGDBServer::GetProcess
   return m_gdb_client.GetProcessInfo(pid, process_info);
 }
 
-Error PlatformRemoteGDBServer::LaunchProcess(ProcessLaunchInfo &launch_info) {
+Status PlatformRemoteGDBServer::LaunchProcess(ProcessLaunchInfo &launch_info) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  Error error;
+  Status error;
 
   if (log)
     log->Printf("PlatformRemoteGDBServer::%s() called", __FUNCTION__);
@@ -480,17 +480,17 @@ Error PlatformRemoteGDBServer::LaunchPro
   return error;
 }
 
-Error PlatformRemoteGDBServer::KillProcess(const lldb::pid_t pid) {
+Status PlatformRemoteGDBServer::KillProcess(const lldb::pid_t pid) {
   if (!KillSpawnedProcess(pid))
-    return Error("failed to kill remote spawned process");
-  return Error();
+    return Status("failed to kill remote spawned process");
+  return Status();
 }
 
 lldb::ProcessSP PlatformRemoteGDBServer::DebugProcess(
     ProcessLaunchInfo &launch_info, Debugger &debugger,
     Target *target, // Can be NULL, if NULL create a new target, else use
                     // existing one
-    Error &error) {
+    Status &error) {
   lldb::ProcessSP process_sp;
   if (IsRemote()) {
     if (IsConnected()) {
@@ -577,7 +577,7 @@ lldb::ProcessSP PlatformRemoteGDBServer:
     ProcessAttachInfo &attach_info, Debugger &debugger,
     Target *target, // Can be NULL, if NULL create a new target, else use
                     // existing one
-    Error &error) {
+    Status &error) {
   lldb::ProcessSP process_sp;
   if (IsRemote()) {
     if (IsConnected()) {
@@ -625,9 +625,9 @@ lldb::ProcessSP PlatformRemoteGDBServer:
   return process_sp;
 }
 
-Error PlatformRemoteGDBServer::MakeDirectory(const FileSpec &file_spec,
-                                             uint32_t mode) {
-  Error error = m_gdb_client.MakeDirectory(file_spec, mode);
+Status PlatformRemoteGDBServer::MakeDirectory(const FileSpec &file_spec,
+                                              uint32_t mode) {
+  Status error = m_gdb_client.MakeDirectory(file_spec, mode);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
     log->Printf("PlatformRemoteGDBServer::MakeDirectory(path='%s', mode=%o) "
@@ -637,9 +637,9 @@ Error PlatformRemoteGDBServer::MakeDirec
   return error;
 }
 
-Error PlatformRemoteGDBServer::GetFilePermissions(const FileSpec &file_spec,
-                                                  uint32_t &file_permissions) {
-  Error error = m_gdb_client.GetFilePermissions(file_spec, file_permissions);
+Status PlatformRemoteGDBServer::GetFilePermissions(const FileSpec &file_spec,
+                                                   uint32_t &file_permissions) {
+  Status error = m_gdb_client.GetFilePermissions(file_spec, file_permissions);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
     log->Printf("PlatformRemoteGDBServer::GetFilePermissions(path='%s', "
@@ -649,9 +649,9 @@ Error PlatformRemoteGDBServer::GetFilePe
   return error;
 }
 
-Error PlatformRemoteGDBServer::SetFilePermissions(const FileSpec &file_spec,
-                                                  uint32_t file_permissions) {
-  Error error = m_gdb_client.SetFilePermissions(file_spec, file_permissions);
+Status PlatformRemoteGDBServer::SetFilePermissions(const FileSpec &file_spec,
+                                                   uint32_t file_permissions) {
+  Status error = m_gdb_client.SetFilePermissions(file_spec, file_permissions);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
     log->Printf("PlatformRemoteGDBServer::SetFilePermissions(path='%s', "
@@ -663,11 +663,11 @@ Error PlatformRemoteGDBServer::SetFilePe
 
 lldb::user_id_t PlatformRemoteGDBServer::OpenFile(const FileSpec &file_spec,
                                                   uint32_t flags, uint32_t mode,
-                                                  Error &error) {
+                                                  Status &error) {
   return m_gdb_client.OpenFile(file_spec, flags, mode, error);
 }
 
-bool PlatformRemoteGDBServer::CloseFile(lldb::user_id_t fd, Error &error) {
+bool PlatformRemoteGDBServer::CloseFile(lldb::user_id_t fd, Status &error) {
   return m_gdb_client.CloseFile(fd, error);
 }
 
@@ -678,27 +678,27 @@ PlatformRemoteGDBServer::GetFileSize(con
 
 uint64_t PlatformRemoteGDBServer::ReadFile(lldb::user_id_t fd, uint64_t offset,
                                            void *dst, uint64_t dst_len,
-                                           Error &error) {
+                                           Status &error) {
   return m_gdb_client.ReadFile(fd, offset, dst, dst_len, error);
 }
 
 uint64_t PlatformRemoteGDBServer::WriteFile(lldb::user_id_t fd, uint64_t offset,
                                             const void *src, uint64_t src_len,
-                                            Error &error) {
+                                            Status &error) {
   return m_gdb_client.WriteFile(fd, offset, src, src_len, error);
 }
 
-Error PlatformRemoteGDBServer::PutFile(const FileSpec &source,
-                                       const FileSpec &destination,
-                                       uint32_t uid, uint32_t gid) {
+Status PlatformRemoteGDBServer::PutFile(const FileSpec &source,
+                                        const FileSpec &destination,
+                                        uint32_t uid, uint32_t gid) {
   return Platform::PutFile(source, destination, uid, gid);
 }
 
-Error PlatformRemoteGDBServer::CreateSymlink(
+Status PlatformRemoteGDBServer::CreateSymlink(
     const FileSpec &src, // The name of the link is in src
     const FileSpec &dst) // The symlink points to dst
 {
-  Error error = m_gdb_client.CreateSymlink(src, dst);
+  Status error = m_gdb_client.CreateSymlink(src, dst);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
     log->Printf("PlatformRemoteGDBServer::CreateSymlink(src='%s', dst='%s') "
@@ -708,8 +708,8 @@ Error PlatformRemoteGDBServer::CreateSym
   return error;
 }
 
-Error PlatformRemoteGDBServer::Unlink(const FileSpec &file_spec) {
-  Error error = m_gdb_client.Unlink(file_spec);
+Status PlatformRemoteGDBServer::Unlink(const FileSpec &file_spec) {
+  Status error = m_gdb_client.Unlink(file_spec);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
     log->Printf("PlatformRemoteGDBServer::Unlink(path='%s') error = %u (%s)",
@@ -721,7 +721,7 @@ bool PlatformRemoteGDBServer::GetFileExi
   return m_gdb_client.GetFileExists(file_spec);
 }
 
-Error PlatformRemoteGDBServer::RunShellCommand(
+Status PlatformRemoteGDBServer::RunShellCommand(
     const char *command, // Shouldn't be NULL
     const FileSpec &
         working_dir, // Pass empty FileSpec to use the current working directory
@@ -852,7 +852,7 @@ std::string PlatformRemoteGDBServer::Mak
 lldb::ProcessSP PlatformRemoteGDBServer::ConnectProcess(
     llvm::StringRef connect_url, llvm::StringRef plugin_name,
     lldb_private::Debugger &debugger, lldb_private::Target *target,
-    lldb_private::Error &error) {
+    lldb_private::Status &error) {
   if (!IsRemote() || !IsConnected()) {
     error.SetErrorString("Not connected to remote gdb server");
     return nullptr;
@@ -862,7 +862,7 @@ lldb::ProcessSP PlatformRemoteGDBServer:
 }
 
 size_t PlatformRemoteGDBServer::ConnectToWaitingProcesses(Debugger &debugger,
-                                                          Error &error) {
+                                                          Status &error) {
   std::vector<std::string> connection_urls;
   GetPendingGdbServerList(connection_urls);
 

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Thu May 11 23:51:55 2017
@@ -50,38 +50,38 @@ public:
   //------------------------------------------------------------
   // lldb_private::Platform functions
   //------------------------------------------------------------
-  Error ResolveExecutable(const ModuleSpec &module_spec,
-                          lldb::ModuleSP &module_sp,
-                          const FileSpecList *module_search_paths_ptr) override;
+  Status
+  ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
+                    const FileSpecList *module_search_paths_ptr) override;
 
   bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
                      ModuleSpec &module_spec) override;
 
   const char *GetDescription() override;
 
-  Error GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid_ptr,
-                        FileSpec &local_file) override;
+  Status GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid_ptr,
+                         FileSpec &local_file) override;
 
   bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info) override;
 
   uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info,
                          ProcessInstanceInfoList &process_infos) override;
 
-  Error LaunchProcess(ProcessLaunchInfo &launch_info) override;
+  Status LaunchProcess(ProcessLaunchInfo &launch_info) override;
 
-  Error KillProcess(const lldb::pid_t pid) override;
+  Status KillProcess(const lldb::pid_t pid) override;
 
   lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
                                Debugger &debugger,
                                Target *target, // Can be NULL, if NULL create a
                                                // new target, else use existing
                                                // one
-                               Error &error) override;
+                               Status &error) override;
 
   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
                          Target *target, // Can be NULL, if NULL create a new
                                          // target, else use existing one
-                         Error &error) override;
+                         Status &error) override;
 
   bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
 
@@ -111,42 +111,42 @@ public:
 
   bool IsConnected() const override;
 
-  Error ConnectRemote(Args &args) override;
+  Status ConnectRemote(Args &args) override;
 
-  Error DisconnectRemote() override;
+  Status DisconnectRemote() override;
 
-  Error MakeDirectory(const FileSpec &file_spec,
-                      uint32_t file_permissions) override;
+  Status MakeDirectory(const FileSpec &file_spec,
+                       uint32_t file_permissions) override;
 
-  Error GetFilePermissions(const FileSpec &file_spec,
-                           uint32_t &file_permissions) override;
+  Status GetFilePermissions(const FileSpec &file_spec,
+                            uint32_t &file_permissions) override;
 
-  Error SetFilePermissions(const FileSpec &file_spec,
-                           uint32_t file_permissions) override;
+  Status SetFilePermissions(const FileSpec &file_spec,
+                            uint32_t file_permissions) override;
 
   lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
-                           uint32_t mode, Error &error) override;
+                           uint32_t mode, Status &error) override;
 
-  bool CloseFile(lldb::user_id_t fd, Error &error) override;
+  bool CloseFile(lldb::user_id_t fd, Status &error) override;
 
   uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *data_ptr,
-                    uint64_t len, Error &error) override;
+                    uint64_t len, Status &error) override;
 
   uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *data,
-                     uint64_t len, Error &error) override;
+                     uint64_t len, Status &error) override;
 
   lldb::user_id_t GetFileSize(const FileSpec &file_spec) override;
 
-  Error PutFile(const FileSpec &source, const FileSpec &destination,
-                uint32_t uid = UINT32_MAX, uint32_t gid = UINT32_MAX) override;
+  Status PutFile(const FileSpec &source, const FileSpec &destination,
+                 uint32_t uid = UINT32_MAX, uint32_t gid = UINT32_MAX) override;
 
-  Error CreateSymlink(const FileSpec &src, const FileSpec &dst) override;
+  Status CreateSymlink(const FileSpec &src, const FileSpec &dst) override;
 
   bool GetFileExists(const FileSpec &file_spec) override;
 
-  Error Unlink(const FileSpec &path) override;
+  Status Unlink(const FileSpec &path) override;
 
-  Error RunShellCommand(
+  Status RunShellCommand(
       const char *command,         // Shouldn't be NULL
       const FileSpec &working_dir, // Pass empty FileSpec to use the current
                                    // working directory
@@ -166,10 +166,10 @@ public:
                                  llvm::StringRef plugin_name,
                                  lldb_private::Debugger &debugger,
                                  lldb_private::Target *target,
-                                 lldb_private::Error &error) override;
+                                 lldb_private::Status &error) override;
 
   size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
-                                   lldb_private::Error &error) override;
+                                   lldb_private::Status &error) override;
 
   virtual size_t
   GetPendingGdbServerList(std::vector<std::string> &connection_urls);

Modified: lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp Thu May 11 23:51:55 2017
@@ -32,8 +32,8 @@
 
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "CFBundle.h"
@@ -131,10 +131,10 @@ static bool ResolveExecutablePath(const
 
 // TODO check if we have a general purpose fork and exec.  We may be
 // able to get rid of this entirely.
-static Error ForkChildForPTraceDebugging(const char *path, char const *argv[],
-                                         char const *envp[], ::pid_t *pid,
-                                         int *pty_fd) {
-  Error error;
+static Status ForkChildForPTraceDebugging(const char *path, char const *argv[],
+                                          char const *envp[], ::pid_t *pid,
+                                          int *pty_fd) {
+  Status error;
   if (!path || !argv || !envp || !pid || !pty_fd) {
     error.SetErrorString("invalid arguments");
     return error;
@@ -149,7 +149,7 @@ static Error ForkChildForPTraceDebugging
   *pid = static_cast<::pid_t>(pty.Fork(fork_error, sizeof(fork_error)));
   if (*pid < 0) {
     //--------------------------------------------------------------
-    // Error during fork.
+    // Status during fork.
     //--------------------------------------------------------------
     *pid = static_cast<::pid_t>(LLDB_INVALID_PROCESS_ID);
     error.SetErrorStringWithFormat("%s(): fork failed: %s", __FUNCTION__,
@@ -205,10 +205,10 @@ static Error ForkChildForPTraceDebugging
   return error;
 }
 
-static Error
+static Status
 CreatePosixSpawnFileAction(const FileAction &action,
                            posix_spawn_file_actions_t *file_actions) {
-  Error error;
+  Status error;
 
   // Log it.
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
@@ -270,11 +270,11 @@ CreatePosixSpawnFileAction(const FileAct
   return error;
 }
 
-static Error PosixSpawnChildForPTraceDebugging(const char *path,
-                                               ProcessLaunchInfo &launch_info,
-                                               ::pid_t *pid,
-                                               cpu_type_t *actual_cpu_type) {
-  Error error;
+static Status PosixSpawnChildForPTraceDebugging(const char *path,
+                                                ProcessLaunchInfo &launch_info,
+                                                ::pid_t *pid,
+                                                cpu_type_t *actual_cpu_type) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (!pid) {
@@ -436,9 +436,9 @@ static Error PosixSpawnChildForPTraceDeb
   return error;
 }
 
-Error LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
-                     LaunchFlavor *launch_flavor) {
-  Error error;
+Status LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
+                      LaunchFlavor *launch_flavor) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (!launch_flavor) {

Modified: lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.h Thu May 11 23:51:55 2017
@@ -39,8 +39,9 @@ namespace darwin_process_launcher {
 /// @param[out] launch_flavor
 ///     Contains the launch flavor used when launching the process.
 // =============================================================================
-Error LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
-                     lldb_private::process_darwin::LaunchFlavor *launch_flavor);
+Status
+LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
+               lldb_private::process_darwin::LaunchFlavor *launch_flavor);
 
 } // darwin_process_launcher
 } // lldb_private

Modified: lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp Thu May 11 23:51:55 2017
@@ -23,9 +23,9 @@
 
 // LLDB includes
 #include "lldb/Target/UnixSignals.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/Stream.h"
 
 using namespace lldb;
@@ -211,11 +211,11 @@ bool MachException::Data::GetStopInfo(st
   return true;
 }
 
-Error MachException::Message::Receive(mach_port_t port,
-                                      mach_msg_option_t options,
-                                      mach_msg_timeout_t timeout,
-                                      mach_port_t notify_port) {
-  Error error;
+Status MachException::Message::Receive(mach_port_t port,
+                                       mach_msg_option_t options,
+                                       mach_msg_timeout_t timeout,
+                                       mach_port_t notify_port) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
   mach_msg_timeout_t mach_msg_timeout =
@@ -312,10 +312,10 @@ bool MachException::Message::CatchExcept
   return success;
 }
 
-Error MachException::Message::Reply(::pid_t inferior_pid, task_t inferior_task,
-                                    int signal) {
+Status MachException::Message::Reply(::pid_t inferior_pid, task_t inferior_task,
+                                     int signal) {
   // Reply to the exception...
-  Error error;
+  Status error;
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
@@ -412,8 +412,8 @@ Error MachException::Message::Reply(::pi
 
 #define LLDB_EXC_MASK (EXC_MASK_ALL & ~EXC_MASK_RESOURCE)
 
-Error MachException::PortInfo::Save(task_t task) {
-  Error error;
+Status MachException::PortInfo::Save(task_t task) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
   if (log)
@@ -471,8 +471,8 @@ Error MachException::PortInfo::Save(task
   return error;
 }
 
-Error MachException::PortInfo::Restore(task_t task) {
-  Error error;
+Status MachException::PortInfo::Restore(task_t task) {
+  Status error;
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 

Modified: lldb/trunk/source/Plugins/Process/Darwin/MachException.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/MachException.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/MachException.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/MachException.h Thu May 11 23:51:55 2017
@@ -40,9 +40,9 @@ public:
     thread_state_flavor_t flavors[EXC_TYPES_COUNT];
     mach_msg_type_number_t count;
 
-    Error Save(task_t task);
+    Status Save(task_t task);
 
-    Error Restore(task_t task);
+    Status Restore(task_t task);
   };
 
   struct Data {
@@ -96,11 +96,11 @@ public:
 
     bool CatchExceptionRaise(task_t task);
 
-    Error Reply(::pid_t inferior_pid, task_t inferior_task, int signal);
+    Status Reply(::pid_t inferior_pid, task_t inferior_task, int signal);
 
-    Error Receive(mach_port_t receive_port, mach_msg_option_t options,
-                  mach_msg_timeout_t timeout,
-                  mach_port_t notify_port = MACH_PORT_NULL);
+    Status Receive(mach_port_t receive_port, mach_msg_option_t options,
+                   mach_msg_timeout_t timeout,
+                   mach_port_t notify_port = MACH_PORT_NULL);
 
     void Dump(Stream &stream) const;
 

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp Thu May 11 23:51:55 2017
@@ -53,13 +53,13 @@ struct hack_task_dyld_info {
 // Public Static Methods
 // -----------------------------------------------------------------------------
 
-Error NativeProcessProtocol::Launch(
+Status NativeProcessProtocol::Launch(
     ProcessLaunchInfo &launch_info,
     NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
     NativeProcessProtocolSP &native_process_sp) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-  Error error;
+  Status error;
 
   // Verify the working directory is valid if one was specified.
   FileSpec working_dir(launch_info.GetWorkingDirectory());
@@ -120,7 +120,7 @@ Error NativeProcessProtocol::Launch(
   return error;
 }
 
-Error NativeProcessProtocol::Attach(
+Status NativeProcessProtocol::Attach(
     lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
     MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
@@ -130,7 +130,7 @@ Error NativeProcessProtocol::Attach(
 
   // Retrieve the architecture for the running process.
   ArchSpec process_arch;
-  Error error = ResolveProcessArchitecture(pid, process_arch);
+  Status error = ResolveProcessArchitecture(pid, process_arch);
   if (!error.Success())
     return error;
 
@@ -174,9 +174,9 @@ NativeProcessDarwin::~NativeProcessDarwi
 // Instance methods
 // -----------------------------------------------------------------------------
 
-Error NativeProcessDarwin::FinalizeLaunch(LaunchFlavor launch_flavor,
-                                          MainLoop &main_loop) {
-  Error error;
+Status NativeProcessDarwin::FinalizeLaunch(LaunchFlavor launch_flavor,
+                                           MainLoop &main_loop) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
 #if 0
@@ -261,7 +261,7 @@ Error NativeProcessDarwin::FinalizeLaunc
   return error;
 }
 
-Error NativeProcessDarwin::SaveExceptionPortInfo() {
+Status NativeProcessDarwin::SaveExceptionPortInfo() {
   return m_exc_port_info.Save(m_task);
 }
 
@@ -348,7 +348,7 @@ void *NativeProcessDarwin::DoExceptionTh
   // polling is expensive.  On devices, we need to minimize overhead caused
   // by the process monitor.
   uint32_t num_exceptions_received = 0;
-  Error error;
+  Status error;
   task_t task = m_task;
   mach_msg_timeout_t periodic_timeout = 0;
 
@@ -550,8 +550,8 @@ void *NativeProcessDarwin::DoExceptionTh
   return nullptr;
 }
 
-Error NativeProcessDarwin::StartExceptionThread() {
-  Error error;
+Status NativeProcessDarwin::StartExceptionThread() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log)
     log->Printf("NativeProcessDarwin::%s() called", __FUNCTION__);
@@ -640,7 +640,7 @@ Error NativeProcessDarwin::StartExceptio
 }
 
 lldb::addr_t
-NativeProcessDarwin::GetDYLDAllImageInfosAddress(Error &error) const {
+NativeProcessDarwin::GetDYLDAllImageInfosAddress(Status &error) const {
   error.Clear();
 
   struct hack_task_dyld_info dyld_info;
@@ -694,7 +694,7 @@ uint32_t NativeProcessDarwin::GetCPUType
 
 task_t NativeProcessDarwin::ExceptionMessageBundleComplete() {
   // We have a complete bundle of exceptions for our child process.
-  Error error;
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
   std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
@@ -737,7 +737,7 @@ task_t NativeProcessDarwin::ExceptionMes
         const addr_t info_array_count_addr = aii_addr + 4;
         uint32_t info_array_count = 0;
         size_t bytes_read = 0;
-        Error read_error;
+        Status read_error;
         read_error = ReadMemory(info_array_count_addr, // source addr
                                 &info_array_count,     // dest addr
                                 4,                     // byte count
@@ -885,8 +885,8 @@ void NativeProcessDarwin::StartSTDIOThre
   // TODO implement
 }
 
-Error NativeProcessDarwin::StartWaitpidThread(MainLoop &main_loop) {
-  Error error;
+Status NativeProcessDarwin::StartWaitpidThread(MainLoop &main_loop) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   // Strategy: create a thread that sits on waitpid(), waiting for the
@@ -973,7 +973,7 @@ void *NativeProcessDarwin::DoWaitpidThre
   // Ensure we don't get CPU starved.
   MaybeRaiseThreadPriority();
 
-  Error error;
+  Status error;
   int status = -1;
 
   while (1) {
@@ -1038,9 +1038,9 @@ void *NativeProcessDarwin::DoWaitpidThre
   return nullptr;
 }
 
-Error NativeProcessDarwin::SendInferiorExitStatusToMainLoop(::pid_t pid,
-                                                            int status) {
-  Error error;
+Status NativeProcessDarwin::SendInferiorExitStatusToMainLoop(::pid_t pid,
+                                                             int status) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   size_t bytes_written = 0;
@@ -1069,8 +1069,8 @@ Error NativeProcessDarwin::SendInferiorE
   return error;
 }
 
-Error NativeProcessDarwin::HandleWaitpidResult() {
-  Error error;
+Status NativeProcessDarwin::HandleWaitpidResult() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   // Read the pid.
@@ -1126,7 +1126,7 @@ Error NativeProcessDarwin::HandleWaitpid
   return error;
 }
 
-task_t NativeProcessDarwin::TaskPortForProcessID(Error &error,
+task_t NativeProcessDarwin::TaskPortForProcessID(Status &error,
                                                  bool force) const {
   if ((m_task == TASK_NULL) || force) {
     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
@@ -1178,12 +1178,12 @@ task_t NativeProcessDarwin::TaskPortForP
 }
 
 void NativeProcessDarwin::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
-                                           Error &error) {
+                                           Status &error) {
   error.SetErrorString("TODO: implement");
 }
 
-Error NativeProcessDarwin::PrivateResume() {
-  Error error;
+Status NativeProcessDarwin::PrivateResume() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
@@ -1225,8 +1225,8 @@ Error NativeProcessDarwin::PrivateResume
   return error;
 }
 
-Error NativeProcessDarwin::ReplyToAllExceptions() {
-  Error error;
+Status NativeProcessDarwin::ReplyToAllExceptions() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
   TaskPortForProcessID(error);
@@ -1282,8 +1282,8 @@ Error NativeProcessDarwin::ReplyToAllExc
   return error;
 }
 
-Error NativeProcessDarwin::ResumeTask() {
-  Error error;
+Status NativeProcessDarwin::ResumeTask() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   TaskPortForProcessID(error);
@@ -1364,9 +1364,10 @@ bool NativeProcessDarwin::IsExceptionPor
   return MACH_PORT_VALID(m_exception_port);
 }
 
-Error NativeProcessDarwin::GetTaskBasicInfo(
-    task_t task, struct task_basic_info *info) const {
-  Error error;
+Status
+NativeProcessDarwin::GetTaskBasicInfo(task_t task,
+                                      struct task_basic_info *info) const {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   // Validate args.
@@ -1412,8 +1413,8 @@ Error NativeProcessDarwin::GetTaskBasicI
   return error;
 }
 
-Error NativeProcessDarwin::SuspendTask() {
-  Error error;
+Status NativeProcessDarwin::SuspendTask() {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (m_task == TASK_NULL) {
@@ -1432,8 +1433,8 @@ Error NativeProcessDarwin::SuspendTask()
   return error;
 }
 
-Error NativeProcessDarwin::Resume(const ResumeActionList &resume_actions) {
-  Error error;
+Status NativeProcessDarwin::Resume(const ResumeActionList &resume_actions) {
+  Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (log)
@@ -1461,74 +1462,74 @@ Error NativeProcessDarwin::Resume(const
   return error;
 }
 
-Error NativeProcessDarwin::Halt() {
-  Error error;
+Status NativeProcessDarwin::Halt() {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::Detach() {
-  Error error;
+Status NativeProcessDarwin::Detach() {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::Signal(int signo) {
-  Error error;
+Status NativeProcessDarwin::Signal(int signo) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::Interrupt() {
-  Error error;
+Status NativeProcessDarwin::Interrupt() {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::Kill() {
-  Error error;
+Status NativeProcessDarwin::Kill() {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                               MemoryRegionInfo &range_info) {
-  Error error;
+Status NativeProcessDarwin::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                                MemoryRegionInfo &range_info) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                      size_t &bytes_read) {
-  Error error;
+Status NativeProcessDarwin::ReadMemory(lldb::addr_t addr, void *buf,
+                                       size_t size, size_t &bytes_read) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
-                                                 size_t size,
-                                                 size_t &bytes_read) {
-  Error error;
+Status NativeProcessDarwin::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
+                                                  size_t size,
+                                                  size_t &bytes_read) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::WriteMemory(lldb::addr_t addr, const void *buf,
-                                       size_t size, size_t &bytes_written) {
-  Error error;
+Status NativeProcessDarwin::WriteMemory(lldb::addr_t addr, const void *buf,
+                                        size_t size, size_t &bytes_written) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::AllocateMemory(size_t size, uint32_t permissions,
-                                          lldb::addr_t &addr) {
-  Error error;
+Status NativeProcessDarwin::AllocateMemory(size_t size, uint32_t permissions,
+                                           lldb::addr_t &addr) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::DeallocateMemory(lldb::addr_t addr) {
-  Error error;
+Status NativeProcessDarwin::DeallocateMemory(lldb::addr_t addr) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
@@ -1543,25 +1544,25 @@ bool NativeProcessDarwin::GetArchitectur
   return false;
 }
 
-Error NativeProcessDarwin::SetBreakpoint(lldb::addr_t addr, uint32_t size,
-                                         bool hardware) {
-  Error error;
+Status NativeProcessDarwin::SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                                          bool hardware) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
 void NativeProcessDarwin::DoStopIDBumped(uint32_t newBumpId) {}
 
-Error NativeProcessDarwin::GetLoadedModuleFileSpec(const char *module_path,
-                                                   FileSpec &file_spec) {
-  Error error;
+Status NativeProcessDarwin::GetLoadedModuleFileSpec(const char *module_path,
+                                                    FileSpec &file_spec) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
 
-Error NativeProcessDarwin::GetFileLoadAddress(const llvm::StringRef &file_name,
-                                              lldb::addr_t &load_addr) {
-  Error error;
+Status NativeProcessDarwin::GetFileLoadAddress(const llvm::StringRef &file_name,
+                                               lldb::addr_t &load_addr) {
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }
@@ -1569,10 +1570,10 @@ Error NativeProcessDarwin::GetFileLoadAd
 // -----------------------------------------------------------------
 // NativeProcessProtocol protected interface
 // -----------------------------------------------------------------
-Error NativeProcessDarwin::GetSoftwareBreakpointTrapOpcode(
+Status NativeProcessDarwin::GetSoftwareBreakpointTrapOpcode(
     size_t trap_opcode_size_hint, size_t &actual_opcode_size,
     const uint8_t *&trap_opcode_bytes) {
-  Error error;
+  Status error;
   error.SetErrorString("TODO: implement");
   return error;
 }

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.h Thu May 11 23:51:55 2017
@@ -37,7 +37,7 @@
 #include "NativeThreadListDarwin.h"
 
 namespace lldb_private {
-class Error;
+class Status;
 class Scalar;
 
 namespace process_darwin {
@@ -50,11 +50,11 @@ namespace process_darwin {
 ///
 /// Changes in the inferior process state are broadcasted.
 class NativeProcessDarwin : public NativeProcessProtocol {
-  friend Error NativeProcessProtocol::Launch(
+  friend Status NativeProcessProtocol::Launch(
       ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
-  friend Error NativeProcessProtocol::Attach(
+  friend Status NativeProcessProtocol::Attach(
       lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
@@ -64,34 +64,34 @@ public:
   // -----------------------------------------------------------------
   // NativeProcessProtocol Interface
   // -----------------------------------------------------------------
-  Error Resume(const ResumeActionList &resume_actions) override;
+  Status Resume(const ResumeActionList &resume_actions) override;
 
-  Error Halt() override;
+  Status Halt() override;
 
-  Error Detach() override;
+  Status Detach() override;
 
-  Error Signal(int signo) override;
+  Status Signal(int signo) override;
 
-  Error Interrupt() override;
+  Status Interrupt() override;
 
-  Error Kill() override;
+  Status Kill() override;
 
-  Error GetMemoryRegionInfo(lldb::addr_t load_addr,
-                            MemoryRegionInfo &range_info) override;
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &range_info) override;
 
-  Error ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                   size_t &bytes_read) override;
+  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                    size_t &bytes_read) override;
 
-  Error ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
-                              size_t &bytes_read) override;
+  Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
+                               size_t &bytes_read) override;
 
-  Error WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                    size_t &bytes_written) override;
+  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
+                     size_t &bytes_written) override;
 
-  Error AllocateMemory(size_t size, uint32_t permissions,
-                       lldb::addr_t &addr) override;
+  Status AllocateMemory(size_t size, uint32_t permissions,
+                        lldb::addr_t &addr) override;
 
-  Error DeallocateMemory(lldb::addr_t addr) override;
+  Status DeallocateMemory(lldb::addr_t addr) override;
 
   lldb::addr_t GetSharedLibraryInfoAddress() override;
 
@@ -99,15 +99,16 @@ public:
 
   bool GetArchitecture(ArchSpec &arch) const override;
 
-  Error SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware) override;
+  Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                       bool hardware) override;
 
   void DoStopIDBumped(uint32_t newBumpId) override;
 
-  Error GetLoadedModuleFileSpec(const char *module_path,
-                                FileSpec &file_spec) override;
+  Status GetLoadedModuleFileSpec(const char *module_path,
+                                 FileSpec &file_spec) override;
 
-  Error GetFileLoadAddress(const llvm::StringRef &file_name,
-                           lldb::addr_t &load_addr) override;
+  Status GetFileLoadAddress(const llvm::StringRef &file_name,
+                            lldb::addr_t &load_addr) override;
 
   NativeThreadDarwinSP GetThreadByID(lldb::tid_t id);
 
@@ -116,9 +117,9 @@ public:
   // -----------------------------------------------------------------
   // Interface used by NativeRegisterContext-derived classes.
   // -----------------------------------------------------------------
-  static Error PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
-                             void *data = nullptr, size_t data_size = 0,
-                             long *result = nullptr);
+  static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
+                              void *data = nullptr, size_t data_size = 0,
+                              long *result = nullptr);
 
   bool SupportHardwareSingleStepping() const;
 
@@ -126,7 +127,7 @@ protected:
   // -----------------------------------------------------------------
   // NativeProcessProtocol protected interface
   // -----------------------------------------------------------------
-  Error
+  Status
   GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
                                   size_t &actual_opcode_size,
                                   const uint8_t *&trap_opcode_bytes) override;
@@ -236,19 +237,19 @@ private:
   ///     operations.  Failure here will force termination of the
   ///     launched process and debugging session.
   // -----------------------------------------------------------------
-  Error FinalizeLaunch(LaunchFlavor launch_flavor, MainLoop &main_loop);
+  Status FinalizeLaunch(LaunchFlavor launch_flavor, MainLoop &main_loop);
 
-  Error SaveExceptionPortInfo();
+  Status SaveExceptionPortInfo();
 
   void ExceptionMessageReceived(const MachException::Message &message);
 
   void MaybeRaiseThreadPriority();
 
-  Error StartExceptionThread();
+  Status StartExceptionThread();
 
-  Error SendInferiorExitStatusToMainLoop(::pid_t pid, int status);
+  Status SendInferiorExitStatusToMainLoop(::pid_t pid, int status);
 
-  Error HandleWaitpidResult();
+  Status HandleWaitpidResult();
 
   bool ProcessUsingSpringBoard() const;
 
@@ -258,7 +259,7 @@ private:
 
   void *DoExceptionThread();
 
-  lldb::addr_t GetDYLDAllImageInfosAddress(Error &error) const;
+  lldb::addr_t GetDYLDAllImageInfosAddress(Status &error) const;
 
   static uint32_t GetCPUTypeForLocalProcess(::pid_t pid);
 
@@ -268,25 +269,25 @@ private:
 
   void StartSTDIOThread();
 
-  Error StartWaitpidThread(MainLoop &main_loop);
+  Status StartWaitpidThread(MainLoop &main_loop);
 
   static void *WaitpidThread(void *arg);
 
   void *DoWaitpidThread();
 
-  task_t TaskPortForProcessID(Error &error, bool force = false) const;
+  task_t TaskPortForProcessID(Status &error, bool force = false) const;
 
   /// Attaches to an existing process.  Forms the
   /// implementation of Process::DoAttach.
-  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Error &error);
+  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Status &error);
 
-  ::pid_t Attach(lldb::pid_t pid, Error &error);
+  ::pid_t Attach(lldb::pid_t pid, Status &error);
 
-  Error PrivateResume();
+  Status PrivateResume();
 
-  Error ReplyToAllExceptions();
+  Status ReplyToAllExceptions();
 
-  Error ResumeTask();
+  Status ResumeTask();
 
   bool IsTaskValid() const;
 
@@ -296,11 +297,11 @@ private:
 
   bool IsExceptionPortValid() const;
 
-  Error GetTaskBasicInfo(task_t task, struct task_basic_info *info) const;
+  Status GetTaskBasicInfo(task_t task, struct task_basic_info *info) const;
 
-  Error SuspendTask();
+  Status SuspendTask();
 
-  static Error SetDefaultPtraceOpts(const lldb::pid_t);
+  static Status SetDefaultPtraceOpts(const lldb::pid_t);
 
   static void *MonitorThread(void *baton);
 
@@ -319,7 +320,7 @@ private:
   void MonitorSignal(const siginfo_t &info, NativeThreadDarwin &thread,
                      bool exited);
 
-  Error SetupSoftwareSingleStepping(NativeThreadDarwin &thread);
+  Status SetupSoftwareSingleStepping(NativeThreadDarwin &thread);
 
 #if 0
             static ::ProcessMessage::CrashReason
@@ -341,22 +342,22 @@ private:
 
   NativeThreadDarwinSP AddThread(lldb::tid_t thread_id);
 
-  Error GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
+  Status GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
 
-  Error FixupBreakpointPCAsNeeded(NativeThreadDarwin &thread);
+  Status FixupBreakpointPCAsNeeded(NativeThreadDarwin &thread);
 
   /// Writes a siginfo_t structure corresponding to the given thread
   /// ID to the memory region pointed to by @p siginfo.
-  Error GetSignalInfo(lldb::tid_t tid, void *siginfo);
+  Status GetSignalInfo(lldb::tid_t tid, void *siginfo);
 
   /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG)
   /// corresponding to the given thread ID to the memory pointed to
   /// by @p message.
-  Error GetEventMessage(lldb::tid_t tid, unsigned long *message);
+  Status GetEventMessage(lldb::tid_t tid, unsigned long *message);
 
   void NotifyThreadDeath(lldb::tid_t tid);
 
-  Error Detach(lldb::tid_t tid);
+  Status Detach(lldb::tid_t tid);
 
   // This method is requests a stop on all threads which are still
   // running. It sets up a deferred delegate notification, which will
@@ -370,8 +371,8 @@ private:
   // Resume the given thread, optionally passing it the given signal.
   // The type of resume operation (continue, single-step) depends on
   // the state parameter.
-  Error ResumeThread(NativeThreadDarwin &thread, lldb::StateType state,
-                     int signo);
+  Status ResumeThread(NativeThreadDarwin &thread, lldb::StateType state,
+                      int signo);
 
   void ThreadWasCreated(NativeThreadDarwin &thread);
 

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp Thu May 11 23:51:55 2017
@@ -94,15 +94,15 @@ NativeRegisterContextSP NativeThreadDarw
   return NativeRegisterContextSP();
 }
 
-Error NativeThreadDarwin::SetWatchpoint(lldb::addr_t addr, size_t size,
-                                        uint32_t watch_flags, bool hardware) {
-  Error error;
+Status NativeThreadDarwin::SetWatchpoint(lldb::addr_t addr, size_t size,
+                                         uint32_t watch_flags, bool hardware) {
+  Status error;
   error.SetErrorString("not yet implemented");
   return error;
 }
 
-Error NativeThreadDarwin::RemoveWatchpoint(lldb::addr_t addr) {
-  Error error;
+Status NativeThreadDarwin::RemoveWatchpoint(lldb::addr_t addr) {
+  Status error;
   error.SetErrorString("not yet implemented");
   return error;
 }

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadDarwin.h Thu May 11 23:51:55 2017
@@ -58,10 +58,10 @@ public:
 
   NativeRegisterContextSP GetRegisterContext() override;
 
-  Error SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
-                      bool hardware) override;
+  Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
+                       bool hardware) override;
 
-  Error RemoveWatchpoint(lldb::addr_t addr) override;
+  Status RemoveWatchpoint(lldb::addr_t addr) override;
 
   // -----------------------------------------------------------------
   // New methods that are fine for others to call.
@@ -75,11 +75,11 @@ private:
 
   /// Resumes the thread.  If @p signo is anything but
   /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Error Resume(uint32_t signo);
+  Status Resume(uint32_t signo);
 
   /// Single steps the thread.  If @p signo is anything but
   /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Error SingleStep(uint32_t signo);
+  Status SingleStep(uint32_t signo);
 
   bool NotifyException(MachException::Data &exc);
 
@@ -117,7 +117,7 @@ private:
 
   void SetExited();
 
-  Error RequestStop();
+  Status RequestStop();
 
   // -------------------------------------------------------------------------
   /// Return the mach thread port number for this thread.

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp Thu May 11 23:51:55 2017
@@ -20,8 +20,8 @@
 #include <sys/sysctl.h>
 
 // LLDB includes
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/lldb-enumerations.h"
 
@@ -343,7 +343,7 @@ uint32_t NativeThreadListDarwin::UpdateT
     mach_msg_type_number_t thread_list_count = 0;
     task_t task = process.GetTask();
 
-    Error error;
+    Status error;
     auto mach_err = ::task_threads(task, &thread_list, &thread_list_count);
     error.SetError(mach_err, eErrorTypeMachKernel);
     if (error.Fail()) {

Modified: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.h (original)
+++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.h Thu May 11 23:51:55 2017
@@ -123,7 +123,7 @@ protected:
   typedef collection::iterator iterator;
   typedef collection::const_iterator const_iterator;
 
-  // Consider having this return an lldb_private::Error.
+  // Consider having this return an lldb_private::Status.
   uint32_t UpdateThreadList(NativeProcessDarwin &process, bool update,
                             collection *num_threads = nullptr);
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Thu May 11 23:51:55 2017
@@ -111,8 +111,8 @@ uint32_t ProcessFreeBSD::GetPluginVersio
 
 void ProcessFreeBSD::Terminate() {}
 
-Error ProcessFreeBSD::DoDetach(bool keep_stopped) {
-  Error error;
+Status ProcessFreeBSD::DoDetach(bool keep_stopped) {
+  Status error;
   if (keep_stopped) {
     error.SetErrorString("Detaching with keep_stopped true is not currently "
                          "supported on FreeBSD.");
@@ -127,7 +127,7 @@ Error ProcessFreeBSD::DoDetach(bool keep
   return error;
 }
 
-Error ProcessFreeBSD::DoResume() {
+Status ProcessFreeBSD::DoResume() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
   SetPrivateState(eStateRunning);
@@ -147,7 +147,7 @@ Error ProcessFreeBSD::DoResume() {
     m_monitor->ThreadSuspend(*t_pos, false);
     do_step = true;
     if (software_single_step) {
-      Error error = SetupSoftwareSingleStepping(*t_pos);
+      Status error = SetupSoftwareSingleStepping(*t_pos);
       if (error.Fail())
         return error;
     }
@@ -168,7 +168,7 @@ Error ProcessFreeBSD::DoResume() {
   else
     m_monitor->Resume(GetID(), m_resume_signo);
 
-  return Error();
+  return Status();
 }
 
 bool ProcessFreeBSD::UpdateThreadList(ThreadList &old_thread_list,
@@ -209,7 +209,7 @@ bool ProcessFreeBSD::UpdateThreadList(Th
   return true;
 }
 
-Error ProcessFreeBSD::WillResume() {
+Status ProcessFreeBSD::WillResume() {
   m_resume_signo = 0;
   m_suspend_tids.clear();
   m_run_tids.clear();
@@ -293,9 +293,10 @@ bool ProcessFreeBSD::CanDebug(lldb::Targ
   return true;
 }
 
-Error ProcessFreeBSD::DoAttachToProcessWithID(
-    lldb::pid_t pid, const ProcessAttachInfo &attach_info) {
-  Error error;
+Status
+ProcessFreeBSD::DoAttachToProcessWithID(lldb::pid_t pid,
+                                        const ProcessAttachInfo &attach_info) {
+  Status error;
   assert(m_monitor == NULL);
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
@@ -343,8 +344,8 @@ Error ProcessFreeBSD::DoAttachToProcessW
   return error;
 }
 
-Error ProcessFreeBSD::WillLaunch(Module *module) {
-  Error error;
+Status ProcessFreeBSD::WillLaunch(Module *module) {
+  Status error;
   return error;
 }
 
@@ -366,8 +367,9 @@ ProcessFreeBSD::GetFileSpec(const lldb_p
   return file_spec;
 }
 
-Error ProcessFreeBSD::DoLaunch(Module *module, ProcessLaunchInfo &launch_info) {
-  Error error;
+Status ProcessFreeBSD::DoLaunch(Module *module,
+                                ProcessLaunchInfo &launch_info) {
+  Status error;
   assert(m_monitor == NULL);
 
   FileSpec working_dir = launch_info.GetWorkingDirectory();
@@ -456,8 +458,8 @@ addr_t ProcessFreeBSD::GetImageInfoAddre
   return LLDB_INVALID_ADDRESS;
 }
 
-Error ProcessFreeBSD::DoHalt(bool &caused_stop) {
-  Error error;
+Status ProcessFreeBSD::DoHalt(bool &caused_stop) {
+  Status error;
 
   if (IsStopped()) {
     caused_stop = false;
@@ -470,8 +472,8 @@ Error ProcessFreeBSD::DoHalt(bool &cause
   return error;
 }
 
-Error ProcessFreeBSD::DoSignal(int signal) {
-  Error error;
+Status ProcessFreeBSD::DoSignal(int signal) {
+  Status error;
 
   if (kill(GetID(), signal))
     error.SetErrorToErrno();
@@ -479,8 +481,8 @@ Error ProcessFreeBSD::DoSignal(int signa
   return error;
 }
 
-Error ProcessFreeBSD::DoDestroy() {
-  Error error;
+Status ProcessFreeBSD::DoDestroy() {
+  Status error;
 
   if (!HasExited()) {
     assert(m_monitor);
@@ -513,7 +515,7 @@ void ProcessFreeBSD::DoDidExec() {
                                  target->GetArchitecture());
       FileSpecList executable_search_paths(
           Target::GetDefaultExecutableSearchPaths());
-      Error error = platform_sp->ResolveExecutable(
+      Status error = platform_sp->ResolveExecutable(
           exe_module_spec, exe_module_sp,
           executable_search_paths.GetSize() ? &executable_search_paths : NULL);
       if (!error.Success())
@@ -589,19 +591,19 @@ bool ProcessFreeBSD::IsAlive() {
 }
 
 size_t ProcessFreeBSD::DoReadMemory(addr_t vm_addr, void *buf, size_t size,
-                                    Error &error) {
+                                    Status &error) {
   assert(m_monitor);
   return m_monitor->ReadMemory(vm_addr, buf, size, error);
 }
 
 size_t ProcessFreeBSD::DoWriteMemory(addr_t vm_addr, const void *buf,
-                                     size_t size, Error &error) {
+                                     size_t size, Status &error) {
   assert(m_monitor);
   return m_monitor->WriteMemory(vm_addr, buf, size, error);
 }
 
 addr_t ProcessFreeBSD::DoAllocateMemory(size_t size, uint32_t permissions,
-                                        Error &error) {
+                                        Status &error) {
   addr_t allocated_addr = LLDB_INVALID_ADDRESS;
 
   unsigned prot = 0;
@@ -626,8 +628,8 @@ addr_t ProcessFreeBSD::DoAllocateMemory(
   return allocated_addr;
 }
 
-Error ProcessFreeBSD::DoDeallocateMemory(lldb::addr_t addr) {
-  Error error;
+Status ProcessFreeBSD::DoDeallocateMemory(lldb::addr_t addr) {
+  Status error;
   MMapMap::iterator pos = m_addr_to_mmap_size.find(addr);
   if (pos != m_addr_to_mmap_size.end() &&
       InferiorCallMunmap(this, addr, pos->second))
@@ -691,16 +693,16 @@ ProcessFreeBSD::GetSoftwareBreakpointTra
   return opcode_size;
 }
 
-Error ProcessFreeBSD::EnableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessFreeBSD::EnableBreakpointSite(BreakpointSite *bp_site) {
   return EnableSoftwareBreakpoint(bp_site);
 }
 
-Error ProcessFreeBSD::DisableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessFreeBSD::DisableBreakpointSite(BreakpointSite *bp_site) {
   return DisableSoftwareBreakpoint(bp_site);
 }
 
-Error ProcessFreeBSD::EnableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessFreeBSD::EnableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   if (wp) {
     user_id_t watchID = wp->GetID();
     addr_t addr = wp->GetLoadAddress();
@@ -754,8 +756,8 @@ Error ProcessFreeBSD::EnableWatchpoint(W
   return error;
 }
 
-Error ProcessFreeBSD::DisableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessFreeBSD::DisableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   if (wp) {
     user_id_t watchID = wp->GetID();
     addr_t addr = wp->GetLoadAddress();
@@ -797,8 +799,8 @@ Error ProcessFreeBSD::DisableWatchpoint(
   return error;
 }
 
-Error ProcessFreeBSD::GetWatchpointSupportInfo(uint32_t &num) {
-  Error error;
+Status ProcessFreeBSD::GetWatchpointSupportInfo(uint32_t &num) {
+  Status error;
   std::lock_guard<std::recursive_mutex> guard(m_thread_list.GetMutex());
   FreeBSDThread *thread = static_cast<FreeBSDThread *>(
       m_thread_list.GetThreadAtIndex(0, false).get());
@@ -809,8 +811,8 @@ Error ProcessFreeBSD::GetWatchpointSuppo
   return error;
 }
 
-Error ProcessFreeBSD::GetWatchpointSupportInfo(uint32_t &num, bool &after) {
-  Error error = GetWatchpointSupportInfo(num);
+Status ProcessFreeBSD::GetWatchpointSupportInfo(uint32_t &num, bool &after) {
+  Status error = GetWatchpointSupportInfo(num);
   // Watchpoints trigger and halt the inferior after
   // the corresponding instruction has been executed.
   after = true;
@@ -855,7 +857,7 @@ ByteOrder ProcessFreeBSD::GetByteOrder()
   return m_byte_order;
 }
 
-size_t ProcessFreeBSD::PutSTDIN(const char *buf, size_t len, Error &error) {
+size_t ProcessFreeBSD::PutSTDIN(const char *buf, size_t len, Status &error) {
   ssize_t status;
   if ((status = write(m_monitor->GetTerminalFD(), buf, len)) < 0) {
     error.SetErrorToErrno();
@@ -943,7 +945,7 @@ static size_t ReadMemoryCallback(Emulate
                                  lldb::addr_t addr, void *dst, size_t length) {
   EmulatorBaton *emulator_baton = static_cast<EmulatorBaton *>(baton);
 
-  Error error;
+  Status error;
   size_t bytes_read =
       emulator_baton->m_process->DoReadMemory(addr, dst, length, error);
   if (!error.Success())
@@ -998,9 +1000,9 @@ bool ProcessFreeBSD::SingleStepBreakpoin
   return false;
 }
 
-Error ProcessFreeBSD::SetSoftwareSingleStepBreakpoint(lldb::tid_t tid,
-                                                      lldb::addr_t addr) {
-  Error error;
+Status ProcessFreeBSD::SetSoftwareSingleStepBreakpoint(lldb::tid_t tid,
+                                                       lldb::addr_t addr) {
+  Status error;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   if (log) {
@@ -1010,8 +1012,8 @@ Error ProcessFreeBSD::SetSoftwareSingleS
 
   // Validate the address.
   if (addr == LLDB_INVALID_ADDRESS)
-    return Error("ProcessFreeBSD::%s invalid load address specified.",
-                 __FUNCTION__);
+    return Status("ProcessFreeBSD::%s invalid load address specified.",
+                  __FUNCTION__);
 
   Breakpoint *const sw_step_break =
       m_process->GetTarget().CreateBreakpoint(addr, true, false).get();
@@ -1023,7 +1025,7 @@ Error ProcessFreeBSD::SetSoftwareSingleS
                 __FUNCTION__, addr);
 
   m_threads_stepping_with_breakpoint.insert({tid, sw_step_break->GetID()});
-  return Error();
+  return Status();
 }
 
 bool ProcessFreeBSD::IsSoftwareStepBreakpoint(lldb::tid_t tid) {
@@ -1063,18 +1065,18 @@ bool ProcessFreeBSD::SupportHardwareSing
   return true;
 }
 
-Error ProcessFreeBSD::SetupSoftwareSingleStepping(lldb::tid_t tid) {
+Status ProcessFreeBSD::SetupSoftwareSingleStepping(lldb::tid_t tid) {
   std::unique_ptr<EmulateInstruction> emulator_ap(
       EmulateInstruction::FindPlugin(GetTarget().GetArchitecture(),
                                      eInstructionTypePCModifying, nullptr));
 
   if (emulator_ap == nullptr)
-    return Error("Instruction emulator not found!");
+    return Status("Instruction emulator not found!");
 
   FreeBSDThread *thread = static_cast<FreeBSDThread *>(
       m_thread_list.FindThreadByID(tid, false).get());
   if (thread == NULL)
-    return Error("Thread not found not found!");
+    return Status("Thread not found not found!");
 
   lldb::RegisterContextSP register_context_sp = thread->GetRegisterContext();
 
@@ -1086,7 +1088,7 @@ Error ProcessFreeBSD::SetupSoftwareSingl
   emulator_ap->SetWriteRegCallback(&WriteRegisterCallback);
 
   if (!emulator_ap->ReadInstruction())
-    return Error("Read instruction failed!");
+    return Status("Read instruction failed!");
 
   bool emulation_result =
       emulator_ap->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC);
@@ -1111,9 +1113,9 @@ Error ProcessFreeBSD::SetupSoftwareSingl
     // The instruction emulation failed after it modified the PC. It is an
     // unknown error where we can't continue because the next instruction is
     // modifying the PC but we don't  know how.
-    return Error("Instruction emulation failed unexpectedly");
+    return Status("Instruction emulation failed unexpectedly");
   }
 
   SetSoftwareSingleStepBreakpoint(tid, next_pc);
-  return Error();
+  return Status();
 }

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h Thu May 11 23:51:55 2017
@@ -47,7 +47,7 @@ public:
 
   ~ProcessFreeBSD();
 
-  virtual lldb_private::Error WillResume() override;
+  virtual lldb_private::Status WillResume() override;
 
   //------------------------------------------------------------------
   // PluginInterface protocol
@@ -65,27 +65,27 @@ public:
   bool CanDebug(lldb::TargetSP target_sp,
                 bool plugin_specified_by_name) override;
 
-  lldb_private::Error WillLaunch(lldb_private::Module *module) override;
+  lldb_private::Status WillLaunch(lldb_private::Module *module) override;
 
-  lldb_private::Error DoAttachToProcessWithID(
+  lldb_private::Status DoAttachToProcessWithID(
       lldb::pid_t pid,
       const lldb_private::ProcessAttachInfo &attach_info) override;
 
-  lldb_private::Error
+  lldb_private::Status
   DoLaunch(lldb_private::Module *exe_module,
            lldb_private::ProcessLaunchInfo &launch_info) override;
 
   void DidLaunch() override;
 
-  lldb_private::Error DoResume() override;
+  lldb_private::Status DoResume() override;
 
-  lldb_private::Error DoHalt(bool &caused_stop) override;
+  lldb_private::Status DoHalt(bool &caused_stop) override;
 
-  lldb_private::Error DoDetach(bool keep_stopped) override;
+  lldb_private::Status DoDetach(bool keep_stopped) override;
 
-  lldb_private::Error DoSignal(int signal) override;
+  lldb_private::Status DoSignal(int signal) override;
 
-  lldb_private::Error DoDestroy() override;
+  lldb_private::Status DoDestroy() override;
 
   void DoDidExec() override;
 
@@ -94,35 +94,35 @@ public:
   bool IsAlive() override;
 
   size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
-                      lldb_private::Error &error) override;
+                      lldb_private::Status &error) override;
 
   size_t DoWriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size,
-                       lldb_private::Error &error) override;
+                       lldb_private::Status &error) override;
 
   lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions,
-                                lldb_private::Error &error) override;
+                                lldb_private::Status &error) override;
 
-  lldb_private::Error DoDeallocateMemory(lldb::addr_t ptr) override;
+  lldb_private::Status DoDeallocateMemory(lldb::addr_t ptr) override;
 
   virtual size_t
   GetSoftwareBreakpointTrapOpcode(lldb_private::BreakpointSite *bp_site);
 
-  lldb_private::Error
+  lldb_private::Status
   EnableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
 
-  lldb_private::Error
+  lldb_private::Status
   DisableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
 
-  lldb_private::Error EnableWatchpoint(lldb_private::Watchpoint *wp,
-                                       bool notify = true) override;
-
-  lldb_private::Error DisableWatchpoint(lldb_private::Watchpoint *wp,
+  lldb_private::Status EnableWatchpoint(lldb_private::Watchpoint *wp,
                                         bool notify = true) override;
 
-  lldb_private::Error GetWatchpointSupportInfo(uint32_t &num) override;
+  lldb_private::Status DisableWatchpoint(lldb_private::Watchpoint *wp,
+                                         bool notify = true) override;
+
+  lldb_private::Status GetWatchpointSupportInfo(uint32_t &num) override;
 
-  lldb_private::Error GetWatchpointSupportInfo(uint32_t &num,
-                                               bool &after) override;
+  lldb_private::Status GetWatchpointSupportInfo(uint32_t &num,
+                                                bool &after) override;
 
   virtual uint32_t UpdateThreadListIfNeeded();
 
@@ -134,7 +134,7 @@ public:
   lldb::addr_t GetImageInfoAddress() override;
 
   size_t PutSTDIN(const char *buf, size_t len,
-                  lldb_private::Error &error) override;
+                  lldb_private::Status &error) override;
 
   const lldb::DataBufferSP GetAuxvData() override;
 
@@ -169,10 +169,10 @@ public:
       void *baton, lldb_private::StoppointCallbackContext *context,
       lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
 
-  lldb_private::Error SetupSoftwareSingleStepping(lldb::tid_t tid);
+  lldb_private::Status SetupSoftwareSingleStepping(lldb::tid_t tid);
 
-  lldb_private::Error SetSoftwareSingleStepBreakpoint(lldb::tid_t tid,
-                                                      lldb::addr_t addr);
+  lldb_private::Status SetSoftwareSingleStepBreakpoint(lldb::tid_t tid,
+                                                       lldb::addr_t addr);
 
   bool IsSoftwareStepBreakpoint(lldb::tid_t tid);
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Thu May 11 23:51:55 2017
@@ -29,7 +29,7 @@
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/UnixSignals.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "FreeBSDThread.h"
 #include "Plugins/Process/POSIX/CrashReason.h"
@@ -154,7 +154,7 @@ PtraceWrapper((req), (pid), (addr), (dat
 // functions without needed to go thru the thread funnel.
 
 static size_t DoReadMemory(lldb::pid_t pid, lldb::addr_t vm_addr, void *buf,
-                           size_t size, Error &error) {
+                           size_t size, Status &error) {
   struct ptrace_io_desc pi_desc;
 
   pi_desc.piod_op = PIOD_READ_D;
@@ -168,7 +168,7 @@ static size_t DoReadMemory(lldb::pid_t p
 }
 
 static size_t DoWriteMemory(lldb::pid_t pid, lldb::addr_t vm_addr,
-                            const void *buf, size_t size, Error &error) {
+                            const void *buf, size_t size, Status &error) {
   struct ptrace_io_desc pi_desc;
 
   pi_desc.piod_op = PIOD_WRITE_D;
@@ -183,7 +183,7 @@ static size_t DoWriteMemory(lldb::pid_t
 
 // Simple helper function to ensure flags are enabled on the given file
 // descriptor.
-static bool EnsureFDFlags(int fd, int flags, Error &error) {
+static bool EnsureFDFlags(int fd, int flags, Status &error) {
   int status;
 
   if ((status = fcntl(fd, F_GETFL)) == -1) {
@@ -221,7 +221,7 @@ public:
 /// @brief Implements ProcessMonitor::ReadMemory.
 class ReadOperation : public Operation {
 public:
-  ReadOperation(lldb::addr_t addr, void *buff, size_t size, Error &error,
+  ReadOperation(lldb::addr_t addr, void *buff, size_t size, Status &error,
                 size_t &result)
       : m_addr(addr), m_buff(buff), m_size(size), m_error(error),
         m_result(result) {}
@@ -232,7 +232,7 @@ private:
   lldb::addr_t m_addr;
   void *m_buff;
   size_t m_size;
-  Error &m_error;
+  Status &m_error;
   size_t &m_result;
 };
 
@@ -247,8 +247,8 @@ void ReadOperation::Execute(ProcessMonit
 /// @brief Implements ProcessMonitor::WriteMemory.
 class WriteOperation : public Operation {
 public:
-  WriteOperation(lldb::addr_t addr, const void *buff, size_t size, Error &error,
-                 size_t &result)
+  WriteOperation(lldb::addr_t addr, const void *buff, size_t size,
+                 Status &error, size_t &result)
       : m_addr(addr), m_buff(buff), m_size(size), m_error(error),
         m_result(result) {}
 
@@ -258,7 +258,7 @@ private:
   lldb::addr_t m_addr;
   const void *m_buff;
   size_t m_size;
-  Error &m_error;
+  Status &m_error;
   size_t &m_result;
 };
 
@@ -672,12 +672,12 @@ void KillOperation::Execute(ProcessMonit
 /// @brief Implements ProcessMonitor::Detach.
 class DetachOperation : public Operation {
 public:
-  DetachOperation(Error &result) : m_error(result) {}
+  DetachOperation(Status &result) : m_error(result) {}
 
   void Execute(ProcessMonitor *monitor);
 
 private:
-  Error &m_error;
+  Status &m_error;
 };
 
 void DetachOperation::Execute(ProcessMonitor *monitor) {
@@ -731,7 +731,7 @@ ProcessMonitor::ProcessMonitor(
     const FileSpec &stdout_file_spec, const FileSpec &stderr_file_spec,
     const FileSpec &working_dir,
     const lldb_private::ProcessLaunchInfo & /* launch_info */,
-    lldb_private::Error &error)
+    lldb_private::Status &error)
     : m_process(static_cast<ProcessFreeBSD *>(process)),
       m_pid(LLDB_INVALID_PROCESS_ID), m_terminal_fd(-1), m_operation(0) {
   using namespace std::placeholders;
@@ -777,7 +777,7 @@ WAIT_AGAIN:
 }
 
 ProcessMonitor::ProcessMonitor(ProcessFreeBSD *process, lldb::pid_t pid,
-                               lldb_private::Error &error)
+                               lldb_private::Status &error)
     : m_process(static_cast<ProcessFreeBSD *>(process)), m_pid(pid),
       m_terminal_fd(-1), m_operation(0) {
   using namespace std::placeholders;
@@ -824,7 +824,7 @@ ProcessMonitor::~ProcessMonitor() { Stop
 
 //------------------------------------------------------------------------------
 // Thread setup and tear down.
-void ProcessMonitor::StartLaunchOpThread(LaunchArgs *args, Error &error) {
+void ProcessMonitor::StartLaunchOpThread(LaunchArgs *args, Status &error) {
   static const char *g_thread_name = "lldb.process.freebsd.operation";
 
   if (m_operation_thread.IsJoinable())
@@ -992,7 +992,7 @@ FINISH:
 }
 
 void ProcessMonitor::StartAttachOpThread(AttachArgs *args,
-                                         lldb_private::Error &error) {
+                                         lldb_private::Status &error) {
   static const char *g_thread_name = "lldb.process.freebsd.operation";
 
   if (m_operation_thread.IsJoinable())
@@ -1240,7 +1240,7 @@ void ProcessMonitor::DoOperation(Operati
 }
 
 size_t ProcessMonitor::ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
-                                  Error &error) {
+                                  Status &error) {
   size_t result;
   ReadOperation op(vm_addr, buf, size, error, result);
   DoOperation(&op);
@@ -1248,7 +1248,7 @@ size_t ProcessMonitor::ReadMemory(lldb::
 }
 
 size_t ProcessMonitor::WriteMemory(lldb::addr_t vm_addr, const void *buf,
-                                   size_t size, lldb_private::Error &error) {
+                                   size_t size, lldb_private::Status &error) {
   size_t result;
   WriteOperation op(vm_addr, buf, size, error, result);
   DoOperation(&op);
@@ -1389,8 +1389,8 @@ bool ProcessMonitor::GetEventMessage(lld
   return result;
 }
 
-lldb_private::Error ProcessMonitor::Detach(lldb::tid_t tid) {
-  lldb_private::Error error;
+lldb_private::Status ProcessMonitor::Detach(lldb::tid_t tid) {
+  lldb_private::Status error;
   if (tid != LLDB_INVALID_THREAD_ID) {
     DetachOperation op(error);
     DoOperation(&op);

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.h Thu May 11 23:51:55 2017
@@ -23,7 +23,7 @@
 #include "lldb/lldb-types.h"
 
 namespace lldb_private {
-class Error;
+class Status;
 class Module;
 class Scalar;
 } // End lldb_private namespace.
@@ -54,10 +54,10 @@ public:
                  const lldb_private::FileSpec &stderr_file_spec,
                  const lldb_private::FileSpec &working_dir,
                  const lldb_private::ProcessLaunchInfo &launch_info,
-                 lldb_private::Error &error);
+                 lldb_private::Status &error);
 
   ProcessMonitor(ProcessFreeBSD *process, lldb::pid_t pid,
-                 lldb_private::Error &error);
+                 lldb_private::Status &error);
 
   ~ProcessMonitor();
 
@@ -86,14 +86,14 @@ public:
   ///
   /// This method is provided to implement Process::DoReadMemory.
   size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
-                    lldb_private::Error &error);
+                    lldb_private::Status &error);
 
   /// Writes @p size bytes from address @p vm_adder in the inferior process
   /// address space.
   ///
   /// This method is provided to implement Process::DoWriteMemory.
   size_t WriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size,
-                     lldb_private::Error &error);
+                     lldb_private::Status &error);
 
   /// Reads the contents from the register identified by the given (architecture
   /// dependent) offset.
@@ -178,7 +178,7 @@ public:
   /// Terminate the traced process.
   bool Kill();
 
-  lldb_private::Error Detach(lldb::tid_t tid);
+  lldb_private::Status Detach(lldb::tid_t tid);
 
   void StopMonitor();
 
@@ -210,7 +210,7 @@ private:
 
     ProcessMonitor *m_monitor;   // The monitor performing the attach.
     sem_t m_semaphore;           // Posted to once operation complete.
-    lldb_private::Error m_error; // Set if process operation failed.
+    lldb_private::Status m_error; // Set if process operation failed.
   };
 
   /// @class LauchArgs
@@ -238,7 +238,7 @@ private:
     const lldb_private::FileSpec m_working_dir; // Working directory or empty.
   };
 
-  void StartLaunchOpThread(LaunchArgs *args, lldb_private::Error &error);
+  void StartLaunchOpThread(LaunchArgs *args, lldb_private::Status &error);
 
   static void *LaunchOpThread(void *arg);
 
@@ -252,7 +252,7 @@ private:
     lldb::pid_t m_pid; // pid of the process to be attached.
   };
 
-  void StartAttachOpThread(AttachArgs *args, lldb_private::Error &error);
+  void StartAttachOpThread(AttachArgs *args, lldb_private::Status &error);
 
   static void *AttachOpThread(void *args);
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp Thu May 11 23:51:55 2017
@@ -75,7 +75,7 @@ bool RegisterContextPOSIXProcessMonitor_
 
     // Read the full register.
     if (ReadRegister(full_reg_info, full_value)) {
-      Error error;
+      Status error;
       ByteOrder byte_order = GetByteOrder();
       uint8_t dst[RegisterValue::kMaxRegisterByteSize];
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp Thu May 11 23:51:55 2017
@@ -77,7 +77,7 @@ bool RegisterContextPOSIXProcessMonitor_
 
     // Read the full register.
     if (ReadRegister(full_reg_info, full_value)) {
-      lldb_private::Error error;
+      lldb_private::Status error;
       lldb::ByteOrder byte_order = GetByteOrder();
       uint8_t dst[lldb_private::RegisterValue::kMaxRegisterByteSize];
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_mips64.cpp Thu May 11 23:51:55 2017
@@ -76,7 +76,7 @@ bool RegisterContextPOSIXProcessMonitor_
 
     // Read the full register.
     if (ReadRegister(full_reg_info, full_value)) {
-      Error error;
+      Status error;
       ByteOrder byte_order = GetByteOrder();
       uint8_t dst[RegisterValue::kMaxRegisterByteSize];
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp Thu May 11 23:51:55 2017
@@ -88,7 +88,7 @@ bool RegisterContextPOSIXProcessMonitor_
 
     // Read the full register.
     if (ReadRegister(full_reg_info, full_value)) {
-      Error error;
+      Status error;
       ByteOrder byte_order = GetByteOrder();
       uint8_t dst[RegisterValue::kMaxRegisterByteSize];
 

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_x86.cpp Thu May 11 23:51:55 2017
@@ -130,7 +130,7 @@ bool RegisterContextPOSIXProcessMonitor_
 
     // Read the full register.
     if (ReadRegister(full_reg_info, full_value)) {
-      Error error;
+      Status error;
       ByteOrder byte_order = GetByteOrder();
       uint8_t dst[RegisterValue::kMaxRegisterByteSize];
 

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Thu May 11 23:51:55 2017
@@ -40,8 +40,8 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/LLDBAssert.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StringExtractor.h"
 
 #include "NativeThreadLinux.h"
@@ -193,8 +193,8 @@ static_assert(sizeof(long) >= k_ptrace_w
 
 // Simple helper function to ensure flags are enabled on the given file
 // descriptor.
-static Error EnsureFDFlags(int fd, int flags) {
-  Error error;
+static Status EnsureFDFlags(int fd, int flags) {
+  Status error;
 
   int status = fcntl(fd, F_GETFL);
   if (status == -1) {
@@ -214,13 +214,13 @@ static Error EnsureFDFlags(int fd, int f
 // Public Static Methods
 // -----------------------------------------------------------------------------
 
-Error NativeProcessProtocol::Launch(
+Status NativeProcessProtocol::Launch(
     ProcessLaunchInfo &launch_info,
     NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
     NativeProcessProtocolSP &native_process_sp) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
-  Error error;
+  Status error;
 
   // Verify the working directory is valid if one was specified.
   FileSpec working_dir{launch_info.GetWorkingDirectory()};
@@ -254,7 +254,7 @@ Error NativeProcessProtocol::Launch(
   return error;
 }
 
-Error NativeProcessProtocol::Attach(
+Status NativeProcessProtocol::Attach(
     lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
     MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
@@ -262,7 +262,7 @@ Error NativeProcessProtocol::Attach(
 
   // Retrieve the architecture for the running process.
   ArchSpec process_arch;
-  Error error = ResolveProcessArchitecture(pid, process_arch);
+  Status error = ResolveProcessArchitecture(pid, process_arch);
   if (!error.Success())
     return error;
 
@@ -292,7 +292,7 @@ NativeProcessLinux::NativeProcessLinux()
       m_pending_notification_tid(LLDB_INVALID_THREAD_ID) {}
 
 void NativeProcessLinux::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
-                                          Error &error) {
+                                          Status &error) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid = {0:x}", pid);
 
@@ -314,9 +314,9 @@ void NativeProcessLinux::AttachToInferio
   Attach(pid, error);
 }
 
-Error NativeProcessLinux::LaunchInferior(MainLoop &mainloop,
-                                         ProcessLaunchInfo &launch_info) {
-  Error error;
+Status NativeProcessLinux::LaunchInferior(MainLoop &mainloop,
+                                          ProcessLaunchInfo &launch_info) {
+  Status error;
   m_sigchld_handle = mainloop.RegisterSignal(
       SIGCHLD, [this](MainLoopBase &) { SigchldHandler(); }, error);
   if (!m_sigchld_handle)
@@ -402,7 +402,7 @@ Error NativeProcessLinux::LaunchInferior
   return error;
 }
 
-::pid_t NativeProcessLinux::Attach(lldb::pid_t pid, Error &error) {
+::pid_t NativeProcessLinux::Attach(lldb::pid_t pid, Status &error) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
   // Use a map to keep track of the threads which we have attached/need to
@@ -484,7 +484,7 @@ Error NativeProcessLinux::LaunchInferior
   return pid;
 }
 
-Error NativeProcessLinux::SetDefaultPtraceOpts(lldb::pid_t pid) {
+Status NativeProcessLinux::SetDefaultPtraceOpts(lldb::pid_t pid) {
   long ptrace_opts = 0;
 
   // Have the child raise an event on exit.  This is used to keep the child in
@@ -857,7 +857,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
   {
     // If a watchpoint was hit, report it
     uint32_t wp_index;
-    Error error = thread.GetRegisterContext()->GetWatchpointHitIndex(
+    Status error = thread.GetRegisterContext()->GetWatchpointHitIndex(
         wp_index, (uintptr_t)info.si_addr);
     if (error.Fail())
       LLDB_LOG(log,
@@ -894,7 +894,7 @@ void NativeProcessLinux::MonitorSIGTRAP(
     {
       // If a watchpoint was hit, report it
       uint32_t wp_index;
-      Error error = thread.GetRegisterContext()->GetWatchpointHitIndex(
+      Status error = thread.GetRegisterContext()->GetWatchpointHitIndex(
           wp_index, LLDB_INVALID_ADDRESS);
       if (error.Fail())
         LLDB_LOG(log,
@@ -950,7 +950,7 @@ void NativeProcessLinux::MonitorBreakpoi
 
   // Mark the thread as stopped at breakpoint.
   thread.SetStoppedByBreakpoint();
-  Error error = FixupBreakpointPCAsNeeded(thread);
+  Status error = FixupBreakpointPCAsNeeded(thread);
   if (error.Fail())
     LLDB_LOG(log, "pid = {0} fixup: {1}", thread.GetID(), error);
 
@@ -1032,7 +1032,7 @@ void NativeProcessLinux::MonitorSignal(c
       } else {
         // We can end up here if stop was initiated by LLGS but by this time a
         // thread stop has occurred - maybe initiated by another event.
-        Error error = ResumeThread(thread, thread.GetState(), 0);
+        Status error = ResumeThread(thread, thread.GetState(), 0);
         if (error.Fail())
           LLDB_LOG(log, "failed to resume thread {0}: {1}", thread.GetID(),
                    error);
@@ -1108,7 +1108,7 @@ static bool ReadRegisterCallback(Emulate
       emulator_baton->m_reg_context->GetRegisterInfo(
           eRegisterKindDWARF, reg_info->kinds[eRegisterKindDWARF]);
 
-  Error error =
+  Status error =
       emulator_baton->m_reg_context->ReadRegister(full_reg_info, reg_value);
   if (error.Success())
     return true;
@@ -1140,9 +1140,9 @@ static lldb::addr_t ReadFlags(NativeRegi
                                                   LLDB_INVALID_ADDRESS);
 }
 
-Error NativeProcessLinux::SetupSoftwareSingleStepping(
-    NativeThreadLinux &thread) {
-  Error error;
+Status
+NativeProcessLinux::SetupSoftwareSingleStepping(NativeThreadLinux &thread) {
+  Status error;
   NativeRegisterContextSP register_context_sp = thread.GetRegisterContext();
 
   std::unique_ptr<EmulateInstruction> emulator_ap(
@@ -1150,7 +1150,7 @@ Error NativeProcessLinux::SetupSoftwareS
                                      nullptr));
 
   if (emulator_ap == nullptr)
-    return Error("Instruction emulator not found!");
+    return Status("Instruction emulator not found!");
 
   EmulatorBaton baton(this, register_context_sp.get());
   emulator_ap->SetBaton(&baton);
@@ -1160,7 +1160,7 @@ Error NativeProcessLinux::SetupSoftwareS
   emulator_ap->SetWriteRegCallback(&WriteRegisterCallback);
 
   if (!emulator_ap->ReadInstruction())
-    return Error("Read instruction failed!");
+    return Status("Read instruction failed!");
 
   bool emulation_result =
       emulator_ap->EvaluateInstruction(eEmulateInstructionOptionAutoAdvancePC);
@@ -1198,7 +1198,7 @@ Error NativeProcessLinux::SetupSoftwareS
     // The instruction emulation failed after it modified the PC. It is an
     // unknown error where we can't continue because the next instruction is
     // modifying the PC but we don't  know how.
-    return Error("Instruction emulation failed unexpectedly.");
+    return Status("Instruction emulation failed unexpectedly.");
   }
 
   if (m_arch.GetMachine() == llvm::Triple::arm) {
@@ -1222,13 +1222,13 @@ Error NativeProcessLinux::SetupSoftwareS
   // If setting the breakpoint fails because next_pc is out of
   // the address space, ignore it and let the debugee segfault.
   if (error.GetError() == EIO || error.GetError() == EFAULT) {
-    return Error();
+    return Status();
   } else if (error.Fail())
     return error;
 
   m_threads_stepping_with_breakpoint.insert({thread.GetID(), next_pc});
 
-  return Error();
+  return Status();
 }
 
 bool NativeProcessLinux::SupportHardwareSingleStepping() const {
@@ -1241,7 +1241,7 @@ bool NativeProcessLinux::SupportHardware
   return true;
 }
 
-Error NativeProcessLinux::Resume(const ResumeActionList &resume_actions) {
+Status NativeProcessLinux::Resume(const ResumeActionList &resume_actions) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
 
@@ -1257,7 +1257,7 @@ Error NativeProcessLinux::Resume(const R
         continue;
 
       if (action->state == eStateStepping) {
-        Error error = SetupSoftwareSingleStepping(
+        Status error = SetupSoftwareSingleStepping(
             static_cast<NativeThreadLinux &>(*thread_sp));
         if (error.Fail())
           return error;
@@ -1295,18 +1295,18 @@ Error NativeProcessLinux::Resume(const R
       llvm_unreachable("Unexpected state");
 
     default:
-      return Error("NativeProcessLinux::%s (): unexpected state %s specified "
-                   "for pid %" PRIu64 ", tid %" PRIu64,
-                   __FUNCTION__, StateAsCString(action->state), GetID(),
-                   thread_sp->GetID());
+      return Status("NativeProcessLinux::%s (): unexpected state %s specified "
+                    "for pid %" PRIu64 ", tid %" PRIu64,
+                    __FUNCTION__, StateAsCString(action->state), GetID(),
+                    thread_sp->GetID());
     }
   }
 
-  return Error();
+  return Status();
 }
 
-Error NativeProcessLinux::Halt() {
-  Error error;
+Status NativeProcessLinux::Halt() {
+  Status error;
 
   if (kill(GetID(), SIGSTOP) != 0)
     error.SetErrorToErrno();
@@ -1314,8 +1314,8 @@ Error NativeProcessLinux::Halt() {
   return error;
 }
 
-Error NativeProcessLinux::Detach() {
-  Error error;
+Status NativeProcessLinux::Detach() {
+  Status error;
 
   // Stop monitoring the inferior.
   m_sigchld_handle.reset();
@@ -1325,7 +1325,7 @@ Error NativeProcessLinux::Detach() {
     return error;
 
   for (auto thread_sp : m_threads) {
-    Error e = Detach(thread_sp->GetID());
+    Status e = Detach(thread_sp->GetID());
     if (e.Fail())
       error =
           e; // Save the error, but still attempt to detach from other threads.
@@ -1334,8 +1334,8 @@ Error NativeProcessLinux::Detach() {
   return error;
 }
 
-Error NativeProcessLinux::Signal(int signo) {
-  Error error;
+Status NativeProcessLinux::Signal(int signo) {
+  Status error;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "sending signal {0} ({1}) to pid {1}", signo,
@@ -1347,7 +1347,7 @@ Error NativeProcessLinux::Signal(int sig
   return error;
 }
 
-Error NativeProcessLinux::Interrupt() {
+Status NativeProcessLinux::Interrupt() {
   // Pick a running thread (or if none, a not-dead stopped thread) as
   // the chosen thread that will be the stop-reason thread.
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
@@ -1375,8 +1375,8 @@ Error NativeProcessLinux::Interrupt() {
   }
 
   if (!running_thread_sp && !stopped_thread_sp) {
-    Error error("found no running/stepping or live stopped threads as target "
-                "for interrupt");
+    Status error("found no running/stepping or live stopped threads as target "
+                 "for interrupt");
     LLDB_LOG(log, "skipping due to error: {0}", error);
 
     return error;
@@ -1391,14 +1391,14 @@ Error NativeProcessLinux::Interrupt() {
 
   StopRunningThreads(deferred_signal_thread_sp->GetID());
 
-  return Error();
+  return Status();
 }
 
-Error NativeProcessLinux::Kill() {
+Status NativeProcessLinux::Kill() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
 
-  Error error;
+  Status error;
 
   switch (m_state) {
   case StateType::eStateInvalid:
@@ -1430,7 +1430,7 @@ Error NativeProcessLinux::Kill() {
   return error;
 }
 
-static Error
+static Status
 ParseMemoryRegionInfoFromProcMapsLine(llvm::StringRef &maps_line,
                                       MemoryRegionInfo &memory_region_info) {
   memory_region_info.Clear();
@@ -1447,7 +1447,7 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
 
   // Parse out hyphen separating start and end address from range.
   if (!line_extractor.GetBytesLeft() || (line_extractor.GetChar() != '-'))
-    return Error(
+    return Status(
         "malformed /proc/{pid}/maps entry, missing dash between address range");
 
   // Parse out the ending address
@@ -1455,7 +1455,8 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
 
   // Parse out the space after the address.
   if (!line_extractor.GetBytesLeft() || (line_extractor.GetChar() != ' '))
-    return Error("malformed /proc/{pid}/maps entry, missing space after range");
+    return Status(
+        "malformed /proc/{pid}/maps entry, missing space after range");
 
   // Save the range.
   memory_region_info.GetRange().SetRangeBase(start_address);
@@ -1467,8 +1468,8 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
 
   // Parse out each permission entry.
   if (line_extractor.GetBytesLeft() < 4)
-    return Error("malformed /proc/{pid}/maps entry, missing some portion of "
-                 "permissions");
+    return Status("malformed /proc/{pid}/maps entry, missing some portion of "
+                  "permissions");
 
   // Handle read permission.
   const char read_perm_char = line_extractor.GetChar();
@@ -1477,7 +1478,7 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
   else if (read_perm_char == '-')
     memory_region_info.SetReadable(MemoryRegionInfo::OptionalBool::eNo);
   else
-    return Error("unexpected /proc/{pid}/maps read permission char");
+    return Status("unexpected /proc/{pid}/maps read permission char");
 
   // Handle write permission.
   const char write_perm_char = line_extractor.GetChar();
@@ -1486,7 +1487,7 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
   else if (write_perm_char == '-')
     memory_region_info.SetWritable(MemoryRegionInfo::OptionalBool::eNo);
   else
-    return Error("unexpected /proc/{pid}/maps write permission char");
+    return Status("unexpected /proc/{pid}/maps write permission char");
 
   // Handle execute permission.
   const char exec_perm_char = line_extractor.GetChar();
@@ -1495,7 +1496,7 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
   else if (exec_perm_char == '-')
     memory_region_info.SetExecutable(MemoryRegionInfo::OptionalBool::eNo);
   else
-    return Error("unexpected /proc/{pid}/maps exec permission char");
+    return Status("unexpected /proc/{pid}/maps exec permission char");
 
   line_extractor.GetChar();              // Read the private bit
   line_extractor.SkipSpaces();           // Skip the separator
@@ -1511,11 +1512,11 @@ ParseMemoryRegionInfoFromProcMapsLine(ll
   if (name)
     memory_region_info.SetName(name);
 
-  return Error();
+  return Status();
 }
 
-Error NativeProcessLinux::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                              MemoryRegionInfo &range_info) {
+Status NativeProcessLinux::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                               MemoryRegionInfo &range_info) {
   // FIXME review that the final memory region returned extends to the end of
   // the virtual address space,
   // with no perms if it is not mapped.
@@ -1526,10 +1527,10 @@ Error NativeProcessLinux::GetMemoryRegio
 
   if (m_supports_mem_region == LazyBool::eLazyBoolNo) {
     // We're done.
-    return Error("unsupported");
+    return Status("unsupported");
   }
 
-  Error error = PopulateMemoryRegionCache();
+  Status error = PopulateMemoryRegionCache();
   if (error.Fail()) {
     return error;
   }
@@ -1585,7 +1586,7 @@ Error NativeProcessLinux::GetMemoryRegio
   return error;
 }
 
-Error NativeProcessLinux::PopulateMemoryRegionCache() {
+Status NativeProcessLinux::PopulateMemoryRegionCache() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
   // If our cache is empty, pull the latest.  There should always be at least
@@ -1593,7 +1594,7 @@ Error NativeProcessLinux::PopulateMemory
   if (!m_mem_region_cache.empty()) {
     LLDB_LOG(log, "reusing {0} cached memory region entries",
              m_mem_region_cache.size());
-    return Error();
+    return Status();
   }
 
   auto BufferOrError = getProcFile(GetID(), "maps");
@@ -1606,7 +1607,8 @@ Error NativeProcessLinux::PopulateMemory
     StringRef Line;
     std::tie(Line, Rest) = Rest.split('\n');
     MemoryRegionInfo info;
-    const Error parse_error = ParseMemoryRegionInfoFromProcMapsLine(Line, info);
+    const Status parse_error =
+        ParseMemoryRegionInfoFromProcMapsLine(Line, info);
     if (parse_error.Fail()) {
       LLDB_LOG(log, "failed to parse proc maps line '{0}': {1}", Line,
                parse_error);
@@ -1625,7 +1627,7 @@ Error NativeProcessLinux::PopulateMemory
     LLDB_LOG(log,
              "failed to find any procfs maps entries, assuming no support "
              "for memory region metadata retrieval");
-    return Error("not supported");
+    return Status("not supported");
   }
 
   LLDB_LOG(log, "read {0} memory region entries from /proc/{1}/maps",
@@ -1633,7 +1635,7 @@ Error NativeProcessLinux::PopulateMemory
 
   // We support memory retrieval, remember that.
   m_supports_mem_region = LazyBool::eLazyBoolYes;
-  return Error();
+  return Status();
 }
 
 void NativeProcessLinux::DoStopIDBumped(uint32_t newBumpId) {
@@ -1644,13 +1646,13 @@ void NativeProcessLinux::DoStopIDBumped(
   m_mem_region_cache.clear();
 }
 
-Error NativeProcessLinux::AllocateMemory(size_t size, uint32_t permissions,
-                                         lldb::addr_t &addr) {
+Status NativeProcessLinux::AllocateMemory(size_t size, uint32_t permissions,
+                                          lldb::addr_t &addr) {
 // FIXME implementing this requires the equivalent of
 // InferiorCallPOSIX::InferiorCallMmap, which depends on
 // functional ThreadPlans working with Native*Protocol.
 #if 1
-  return Error("not implemented yet");
+  return Status("not implemented yet");
 #else
   addr = LLDB_INVALID_ADDRESS;
 
@@ -1668,20 +1670,20 @@ Error NativeProcessLinux::AllocateMemory
   if (InferiorCallMmap(this, addr, 0, size, prot,
                        eMmapFlagsAnon | eMmapFlagsPrivate, -1, 0)) {
     m_addr_to_mmap_size[addr] = size;
-    return Error();
+    return Status();
   } else {
     addr = LLDB_INVALID_ADDRESS;
-    return Error("unable to allocate %" PRIu64
-                 " bytes of memory with permissions %s",
-                 size, GetPermissionsAsCString(permissions));
+    return Status("unable to allocate %" PRIu64
+                  " bytes of memory with permissions %s",
+                  size, GetPermissionsAsCString(permissions));
   }
 #endif
 }
 
-Error NativeProcessLinux::DeallocateMemory(lldb::addr_t addr) {
+Status NativeProcessLinux::DeallocateMemory(lldb::addr_t addr) {
   // FIXME see comments in AllocateMemory - required lower-level
   // bits not in place yet (ThreadPlans)
-  return Error("not implemented");
+  return Status("not implemented");
 }
 
 lldb::addr_t NativeProcessLinux::GetSharedLibraryInfoAddress() {
@@ -1702,7 +1704,7 @@ bool NativeProcessLinux::GetArchitecture
   return true;
 }
 
-Error NativeProcessLinux::GetSoftwareBreakpointPCOffset(
+Status NativeProcessLinux::GetSoftwareBreakpointPCOffset(
     uint32_t &actual_opcode_size) {
   // FIXME put this behind a breakpoint protocol class that can be
   // set per architecture.  Need ARM, MIPS support here.
@@ -1713,11 +1715,11 @@ Error NativeProcessLinux::GetSoftwareBre
   case llvm::Triple::x86:
   case llvm::Triple::x86_64:
     actual_opcode_size = static_cast<uint32_t>(sizeof(g_i386_opcode));
-    return Error();
+    return Status();
 
   case llvm::Triple::systemz:
     actual_opcode_size = static_cast<uint32_t>(sizeof(g_s390x_opcode));
-    return Error();
+    return Status();
 
   case llvm::Triple::arm:
   case llvm::Triple::aarch64:
@@ -1727,30 +1729,30 @@ Error NativeProcessLinux::GetSoftwareBre
   case llvm::Triple::mipsel:
     // On these architectures the PC don't get updated for breakpoint hits
     actual_opcode_size = 0;
-    return Error();
+    return Status();
 
   default:
     assert(false && "CPU type not supported!");
-    return Error("CPU type not supported");
+    return Status("CPU type not supported");
   }
 }
 
-Error NativeProcessLinux::SetBreakpoint(lldb::addr_t addr, uint32_t size,
-                                        bool hardware) {
+Status NativeProcessLinux::SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                                         bool hardware) {
   if (hardware)
     return SetHardwareBreakpoint(addr, size);
   else
     return SetSoftwareBreakpoint(addr, size);
 }
 
-Error NativeProcessLinux::RemoveBreakpoint(lldb::addr_t addr, bool hardware) {
+Status NativeProcessLinux::RemoveBreakpoint(lldb::addr_t addr, bool hardware) {
   if (hardware)
     return RemoveHardwareBreakpoint(addr);
   else
     return NativeProcessProtocol::RemoveBreakpoint(addr);
 }
 
-Error NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(
+Status NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(
     size_t trap_opcode_size_hint, size_t &actual_opcode_size,
     const uint8_t *&trap_opcode_bytes) {
   // FIXME put this behind a breakpoint protocol class that can be set per
@@ -1769,49 +1771,49 @@ Error NativeProcessLinux::GetSoftwareBre
   case llvm::Triple::aarch64:
     trap_opcode_bytes = g_aarch64_opcode;
     actual_opcode_size = sizeof(g_aarch64_opcode);
-    return Error();
+    return Status();
 
   case llvm::Triple::arm:
     switch (trap_opcode_size_hint) {
     case 2:
       trap_opcode_bytes = g_thumb_breakpoint_opcode;
       actual_opcode_size = sizeof(g_thumb_breakpoint_opcode);
-      return Error();
+      return Status();
     case 4:
       trap_opcode_bytes = g_arm_breakpoint_opcode;
       actual_opcode_size = sizeof(g_arm_breakpoint_opcode);
-      return Error();
+      return Status();
     default:
       assert(false && "Unrecognised trap opcode size hint!");
-      return Error("Unrecognised trap opcode size hint!");
+      return Status("Unrecognised trap opcode size hint!");
     }
 
   case llvm::Triple::x86:
   case llvm::Triple::x86_64:
     trap_opcode_bytes = g_i386_opcode;
     actual_opcode_size = sizeof(g_i386_opcode);
-    return Error();
+    return Status();
 
   case llvm::Triple::mips:
   case llvm::Triple::mips64:
     trap_opcode_bytes = g_mips64_opcode;
     actual_opcode_size = sizeof(g_mips64_opcode);
-    return Error();
+    return Status();
 
   case llvm::Triple::mipsel:
   case llvm::Triple::mips64el:
     trap_opcode_bytes = g_mips64el_opcode;
     actual_opcode_size = sizeof(g_mips64el_opcode);
-    return Error();
+    return Status();
 
   case llvm::Triple::systemz:
     trap_opcode_bytes = g_s390x_opcode;
     actual_opcode_size = sizeof(g_s390x_opcode);
-    return Error();
+    return Status();
 
   default:
     assert(false && "CPU type not supported!");
-    return Error("CPU type not supported");
+    return Status("CPU type not supported");
   }
 }
 
@@ -1964,8 +1966,8 @@ NativeProcessLinux::GetCrashReasonForSIG
 }
 #endif
 
-Error NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                     size_t &bytes_read) {
+Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                                      size_t &bytes_read) {
   if (ProcessVmReadvSupported()) {
     // The process_vm_readv path is about 50 times faster than ptrace api. We
     // want to use
@@ -1989,7 +1991,7 @@ Error NativeProcessLinux::ReadMemory(lld
              size, addr, success ? "Success" : strerror(errno));
 
     if (success)
-      return Error();
+      return Status();
     // else the call failed for some reason, let's retry the read using ptrace
     // api.
   }
@@ -2002,7 +2004,7 @@ Error NativeProcessLinux::ReadMemory(lld
   LLDB_LOG(log, "addr = {0}, buf = {1}, size = {2}", addr, buf, size);
 
   for (bytes_read = 0; bytes_read < size; bytes_read += remainder) {
-    Error error = NativeProcessLinux::PtraceWrapper(
+    Status error = NativeProcessLinux::PtraceWrapper(
         PTRACE_PEEKDATA, GetID(), (void *)addr, nullptr, 0, &data);
     if (error.Fail())
       return error;
@@ -2017,23 +2019,23 @@ Error NativeProcessLinux::ReadMemory(lld
     addr += k_ptrace_word_size;
     dst += k_ptrace_word_size;
   }
-  return Error();
+  return Status();
 }
 
-Error NativeProcessLinux::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
-                                                size_t size,
-                                                size_t &bytes_read) {
-  Error error = ReadMemory(addr, buf, size, bytes_read);
+Status NativeProcessLinux::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
+                                                 size_t size,
+                                                 size_t &bytes_read) {
+  Status error = ReadMemory(addr, buf, size, bytes_read);
   if (error.Fail())
     return error;
   return m_breakpoint_list.RemoveTrapsFromBuffer(addr, buf, size);
 }
 
-Error NativeProcessLinux::WriteMemory(lldb::addr_t addr, const void *buf,
-                                      size_t size, size_t &bytes_written) {
+Status NativeProcessLinux::WriteMemory(lldb::addr_t addr, const void *buf,
+                                       size_t size, size_t &bytes_written) {
   const unsigned char *src = static_cast<const unsigned char *>(buf);
   size_t remainder;
-  Error error;
+  Status error;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_MEMORY));
   LLDB_LOG(log, "addr = {0}, buf = {1}, size = {2}", addr, buf, size);
@@ -2075,18 +2077,18 @@ Error NativeProcessLinux::WriteMemory(ll
   return error;
 }
 
-Error NativeProcessLinux::GetSignalInfo(lldb::tid_t tid, void *siginfo) {
+Status NativeProcessLinux::GetSignalInfo(lldb::tid_t tid, void *siginfo) {
   return PtraceWrapper(PTRACE_GETSIGINFO, tid, nullptr, siginfo);
 }
 
-Error NativeProcessLinux::GetEventMessage(lldb::tid_t tid,
-                                          unsigned long *message) {
+Status NativeProcessLinux::GetEventMessage(lldb::tid_t tid,
+                                           unsigned long *message) {
   return PtraceWrapper(PTRACE_GETEVENTMSG, tid, nullptr, message);
 }
 
-Error NativeProcessLinux::Detach(lldb::tid_t tid) {
+Status NativeProcessLinux::Detach(lldb::tid_t tid) {
   if (tid == LLDB_INVALID_THREAD_ID)
-    return Error();
+    return Status();
 
   return PtraceWrapper(PTRACE_DETACH, tid);
 }
@@ -2137,10 +2139,11 @@ NativeThreadLinuxSP NativeProcessLinux::
   return thread_sp;
 }
 
-Error NativeProcessLinux::FixupBreakpointPCAsNeeded(NativeThreadLinux &thread) {
+Status
+NativeProcessLinux::FixupBreakpointPCAsNeeded(NativeThreadLinux &thread) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  Error error;
+  Status error;
 
   // Find out the size of a breakpoint (might depend on where we are in the
   // code).
@@ -2179,7 +2182,7 @@ Error NativeProcessLinux::FixupBreakpoin
              "pid {0} no lldb breakpoint found at current pc with "
              "adjustment: {1}",
              GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
 
   // If the breakpoint is not a software breakpoint, nothing to do.
@@ -2188,7 +2191,7 @@ Error NativeProcessLinux::FixupBreakpoin
         log,
         "pid {0} breakpoint found at {1:x}, not software, nothing to adjust",
         GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
 
   //
@@ -2202,7 +2205,7 @@ Error NativeProcessLinux::FixupBreakpoin
              "pid {0} breakpoint found at {1:x}, it is software, but the "
              "size is zero, nothing to do (unexpected)",
              GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
 
   // Change the program counter.
@@ -2219,9 +2222,9 @@ Error NativeProcessLinux::FixupBreakpoin
   return error;
 }
 
-Error NativeProcessLinux::GetLoadedModuleFileSpec(const char *module_path,
-                                                  FileSpec &file_spec) {
-  Error error = PopulateMemoryRegionCache();
+Status NativeProcessLinux::GetLoadedModuleFileSpec(const char *module_path,
+                                                   FileSpec &file_spec) {
+  Status error = PopulateMemoryRegionCache();
   if (error.Fail())
     return error;
 
@@ -2231,17 +2234,17 @@ Error NativeProcessLinux::GetLoadedModul
   for (const auto &it : m_mem_region_cache) {
     if (it.second.GetFilename() == module_file_spec.GetFilename()) {
       file_spec = it.second;
-      return Error();
+      return Status();
     }
   }
-  return Error("Module file (%s) not found in /proc/%" PRIu64 "/maps file!",
-               module_file_spec.GetFilename().AsCString(), GetID());
+  return Status("Module file (%s) not found in /proc/%" PRIu64 "/maps file!",
+                module_file_spec.GetFilename().AsCString(), GetID());
 }
 
-Error NativeProcessLinux::GetFileLoadAddress(const llvm::StringRef &file_name,
-                                             lldb::addr_t &load_addr) {
+Status NativeProcessLinux::GetFileLoadAddress(const llvm::StringRef &file_name,
+                                              lldb::addr_t &load_addr) {
   load_addr = LLDB_INVALID_ADDRESS;
-  Error error = PopulateMemoryRegionCache();
+  Status error = PopulateMemoryRegionCache();
   if (error.Fail())
     return error;
 
@@ -2249,10 +2252,10 @@ Error NativeProcessLinux::GetFileLoadAdd
   for (const auto &it : m_mem_region_cache) {
     if (it.second == file) {
       load_addr = it.first.GetRange().GetRangeBase();
-      return Error();
+      return Status();
     }
   }
-  return Error("No load address found for specified file.");
+  return Status("No load address found for specified file.");
 }
 
 NativeThreadLinuxSP NativeProcessLinux::GetThreadByID(lldb::tid_t tid) {
@@ -2260,8 +2263,8 @@ NativeThreadLinuxSP NativeProcessLinux::
       NativeProcessProtocol::GetThreadByID(tid));
 }
 
-Error NativeProcessLinux::ResumeThread(NativeThreadLinux &thread,
-                                       lldb::StateType state, int signo) {
+Status NativeProcessLinux::ResumeThread(NativeThreadLinux &thread,
+                                        lldb::StateType state, int signo) {
   Log *const log = ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD);
   LLDB_LOG(log, "tid: {0}", thread.GetID());
 
@@ -2336,7 +2339,7 @@ void NativeProcessLinux::SignalIfAllThre
   // Clear any temporary breakpoints we used to implement software single
   // stepping.
   for (const auto &thread_info : m_threads_stepping_with_breakpoint) {
-    Error error = RemoveBreakpoint(thread_info.second);
+    Status error = RemoveBreakpoint(thread_info.second);
     if (error.Fail())
       LLDB_LOG(log, "pid = {0} remove stepping breakpoint: {1}",
                thread_info.first, error);
@@ -2376,7 +2379,7 @@ void NativeProcessLinux::SigchldHandler(
       if (errno == EINTR)
         continue;
 
-      Error error(errno, eErrorTypePOSIX);
+      Status error(errno, eErrorTypePOSIX);
       LLDB_LOG(log, "waitpid (-1, &status, _) failed: {0}", error);
       break;
     }
@@ -2414,10 +2417,10 @@ void NativeProcessLinux::SigchldHandler(
 // Wrapper for ptrace to catch errors and log calls.
 // Note that ptrace sets errno on error because -1 can be a valid result (i.e.
 // for PTRACE_PEEK*)
-Error NativeProcessLinux::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
-                                        void *data, size_t data_size,
-                                        long *result) {
-  Error error;
+Status NativeProcessLinux::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
+                                         void *data, size_t data_size,
+                                         long *result) {
+  Status error;
   long int ret;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h Thu May 11 23:51:55 2017
@@ -26,7 +26,7 @@
 #include "lldb/Host/common/NativeProcessProtocol.h"
 
 namespace lldb_private {
-class Error;
+class Status;
 class Scalar;
 
 namespace process_linux {
@@ -38,11 +38,11 @@ namespace process_linux {
 ///
 /// Changes in the inferior process state are broadcasted.
 class NativeProcessLinux : public NativeProcessProtocol {
-  friend Error NativeProcessProtocol::Launch(
+  friend Status NativeProcessProtocol::Launch(
       ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
-  friend Error NativeProcessProtocol::Attach(
+  friend Status NativeProcessProtocol::Attach(
       lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
@@ -50,34 +50,34 @@ public:
   // ---------------------------------------------------------------------
   // NativeProcessProtocol Interface
   // ---------------------------------------------------------------------
-  Error Resume(const ResumeActionList &resume_actions) override;
+  Status Resume(const ResumeActionList &resume_actions) override;
 
-  Error Halt() override;
+  Status Halt() override;
 
-  Error Detach() override;
+  Status Detach() override;
 
-  Error Signal(int signo) override;
+  Status Signal(int signo) override;
 
-  Error Interrupt() override;
+  Status Interrupt() override;
 
-  Error Kill() override;
+  Status Kill() override;
 
-  Error GetMemoryRegionInfo(lldb::addr_t load_addr,
-                            MemoryRegionInfo &range_info) override;
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &range_info) override;
 
-  Error ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                   size_t &bytes_read) override;
+  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                    size_t &bytes_read) override;
 
-  Error ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
-                              size_t &bytes_read) override;
+  Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
+                               size_t &bytes_read) override;
 
-  Error WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                    size_t &bytes_written) override;
+  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
+                     size_t &bytes_written) override;
 
-  Error AllocateMemory(size_t size, uint32_t permissions,
-                       lldb::addr_t &addr) override;
+  Status AllocateMemory(size_t size, uint32_t permissions,
+                        lldb::addr_t &addr) override;
 
-  Error DeallocateMemory(lldb::addr_t addr) override;
+  Status DeallocateMemory(lldb::addr_t addr) override;
 
   lldb::addr_t GetSharedLibraryInfoAddress() override;
 
@@ -85,17 +85,18 @@ public:
 
   bool GetArchitecture(ArchSpec &arch) const override;
 
-  Error SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware) override;
+  Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                       bool hardware) override;
 
-  Error RemoveBreakpoint(lldb::addr_t addr, bool hardware = false) override;
+  Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false) override;
 
   void DoStopIDBumped(uint32_t newBumpId) override;
 
-  Error GetLoadedModuleFileSpec(const char *module_path,
-                                FileSpec &file_spec) override;
+  Status GetLoadedModuleFileSpec(const char *module_path,
+                                 FileSpec &file_spec) override;
 
-  Error GetFileLoadAddress(const llvm::StringRef &file_name,
-                           lldb::addr_t &load_addr) override;
+  Status GetFileLoadAddress(const llvm::StringRef &file_name,
+                            lldb::addr_t &load_addr) override;
 
   NativeThreadLinuxSP GetThreadByID(lldb::tid_t id);
 
@@ -107,9 +108,9 @@ public:
   // ---------------------------------------------------------------------
   // Interface used by NativeRegisterContext-derived classes.
   // ---------------------------------------------------------------------
-  static Error PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
-                             void *data = nullptr, size_t data_size = 0,
-                             long *result = nullptr);
+  static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
+                              void *data = nullptr, size_t data_size = 0,
+                              long *result = nullptr);
 
   bool SupportHardwareSingleStepping() const;
 
@@ -117,7 +118,7 @@ protected:
   // ---------------------------------------------------------------------
   // NativeProcessProtocol protected interface
   // ---------------------------------------------------------------------
-  Error
+  Status
   GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
                                   size_t &actual_opcode_size,
                                   const uint8_t *&trap_opcode_bytes) override;
@@ -140,15 +141,15 @@ private:
   // ---------------------------------------------------------------------
   NativeProcessLinux();
 
-  Error LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
+  Status LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
 
   /// Attaches to an existing process.  Forms the
   /// implementation of Process::DoAttach
-  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Error &error);
+  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Status &error);
 
-  ::pid_t Attach(lldb::pid_t pid, Error &error);
+  ::pid_t Attach(lldb::pid_t pid, Status &error);
 
-  static Error SetDefaultPtraceOpts(const lldb::pid_t);
+  static Status SetDefaultPtraceOpts(const lldb::pid_t);
 
   static void *MonitorThread(void *baton);
 
@@ -167,7 +168,7 @@ private:
   void MonitorSignal(const siginfo_t &info, NativeThreadLinux &thread,
                      bool exited);
 
-  Error SetupSoftwareSingleStepping(NativeThreadLinux &thread);
+  Status SetupSoftwareSingleStepping(NativeThreadLinux &thread);
 
 #if 0
         static ::ProcessMessage::CrashReason
@@ -189,22 +190,22 @@ private:
 
   NativeThreadLinuxSP AddThread(lldb::tid_t thread_id);
 
-  Error GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
+  Status GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
 
-  Error FixupBreakpointPCAsNeeded(NativeThreadLinux &thread);
+  Status FixupBreakpointPCAsNeeded(NativeThreadLinux &thread);
 
   /// Writes a siginfo_t structure corresponding to the given thread ID to the
   /// memory region pointed to by @p siginfo.
-  Error GetSignalInfo(lldb::tid_t tid, void *siginfo);
+  Status GetSignalInfo(lldb::tid_t tid, void *siginfo);
 
   /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG)
   /// corresponding to the given thread ID to the memory pointed to by @p
   /// message.
-  Error GetEventMessage(lldb::tid_t tid, unsigned long *message);
+  Status GetEventMessage(lldb::tid_t tid, unsigned long *message);
 
   void NotifyThreadDeath(lldb::tid_t tid);
 
-  Error Detach(lldb::tid_t tid);
+  Status Detach(lldb::tid_t tid);
 
   // This method is requests a stop on all threads which are still running. It
   // sets up a
@@ -219,14 +220,14 @@ private:
   // Resume the given thread, optionally passing it the given signal. The type
   // of resume
   // operation (continue, single-step) depends on the state parameter.
-  Error ResumeThread(NativeThreadLinux &thread, lldb::StateType state,
-                     int signo);
+  Status ResumeThread(NativeThreadLinux &thread, lldb::StateType state,
+                      int signo);
 
   void ThreadWasCreated(NativeThreadLinux &thread);
 
   void SigchldHandler();
 
-  Error PopulateMemoryRegionCache();
+  Status PopulateMemoryRegionCache();
 };
 
 } // namespace process_linux

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Thu May 11 23:51:55 2017
@@ -41,18 +41,19 @@ lldb::ByteOrder NativeRegisterContextLin
   return byte_order;
 }
 
-Error NativeRegisterContextLinux::ReadRegisterRaw(uint32_t reg_index,
-                                                  RegisterValue &reg_value) {
+Status NativeRegisterContextLinux::ReadRegisterRaw(uint32_t reg_index,
+                                                   RegisterValue &reg_value) {
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);
   if (!reg_info)
-    return Error("register %" PRIu32 " not found", reg_index);
+    return Status("register %" PRIu32 " not found", reg_index);
 
   return DoReadRegisterValue(reg_info->byte_offset, reg_info->name,
                              reg_info->byte_size, reg_value);
 }
 
-Error NativeRegisterContextLinux::WriteRegisterRaw(
-    uint32_t reg_index, const RegisterValue &reg_value) {
+Status
+NativeRegisterContextLinux::WriteRegisterRaw(uint32_t reg_index,
+                                             const RegisterValue &reg_value) {
   uint32_t reg_to_write = reg_index;
   RegisterValue value_to_write = reg_value;
 
@@ -60,7 +61,7 @@ Error NativeRegisterContextLinux::WriteR
   const RegisterInfo *reg_info = GetRegisterInfoAtIndex(reg_index);
   if (reg_info->invalidate_regs &&
       (reg_info->invalidate_regs[0] != LLDB_INVALID_REGNUM)) {
-    Error error;
+    Status error;
 
     RegisterValue full_value;
     uint32_t full_reg = reg_info->invalidate_regs[0];
@@ -99,71 +100,71 @@ Error NativeRegisterContextLinux::WriteR
   assert(register_to_write_info_p &&
          "register to write does not have valid RegisterInfo");
   if (!register_to_write_info_p)
-    return Error("NativeRegisterContextLinux::%s failed to get RegisterInfo "
-                 "for write register index %" PRIu32,
-                 __FUNCTION__, reg_to_write);
+    return Status("NativeRegisterContextLinux::%s failed to get RegisterInfo "
+                  "for write register index %" PRIu32,
+                  __FUNCTION__, reg_to_write);
 
   return DoWriteRegisterValue(reg_info->byte_offset, reg_info->name, reg_value);
 }
 
-Error NativeRegisterContextLinux::ReadGPR() {
+Status NativeRegisterContextLinux::ReadGPR() {
   void *buf = GetGPRBuffer();
   if (!buf)
-    return Error("GPR buffer is NULL");
+    return Status("GPR buffer is NULL");
   size_t buf_size = GetGPRSize();
 
   return DoReadGPR(buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::WriteGPR() {
+Status NativeRegisterContextLinux::WriteGPR() {
   void *buf = GetGPRBuffer();
   if (!buf)
-    return Error("GPR buffer is NULL");
+    return Status("GPR buffer is NULL");
   size_t buf_size = GetGPRSize();
 
   return DoWriteGPR(buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::ReadFPR() {
+Status NativeRegisterContextLinux::ReadFPR() {
   void *buf = GetFPRBuffer();
   if (!buf)
-    return Error("FPR buffer is NULL");
+    return Status("FPR buffer is NULL");
   size_t buf_size = GetFPRSize();
 
   return DoReadFPR(buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::WriteFPR() {
+Status NativeRegisterContextLinux::WriteFPR() {
   void *buf = GetFPRBuffer();
   if (!buf)
-    return Error("FPR buffer is NULL");
+    return Status("FPR buffer is NULL");
   size_t buf_size = GetFPRSize();
 
   return DoWriteFPR(buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::ReadRegisterSet(void *buf, size_t buf_size,
-                                                  unsigned int regset) {
+Status NativeRegisterContextLinux::ReadRegisterSet(void *buf, size_t buf_size,
+                                                   unsigned int regset) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET, m_thread.GetID(),
                                            static_cast<void *>(&regset), buf,
                                            buf_size);
 }
 
-Error NativeRegisterContextLinux::WriteRegisterSet(void *buf, size_t buf_size,
-                                                   unsigned int regset) {
+Status NativeRegisterContextLinux::WriteRegisterSet(void *buf, size_t buf_size,
+                                                    unsigned int regset) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGSET, m_thread.GetID(),
                                            static_cast<void *>(&regset), buf,
                                            buf_size);
 }
 
-Error NativeRegisterContextLinux::DoReadRegisterValue(uint32_t offset,
-                                                      const char *reg_name,
-                                                      uint32_t size,
-                                                      RegisterValue &value) {
+Status NativeRegisterContextLinux::DoReadRegisterValue(uint32_t offset,
+                                                       const char *reg_name,
+                                                       uint32_t size,
+                                                       RegisterValue &value) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS));
 
   long data;
-  Error error = NativeProcessLinux::PtraceWrapper(
+  Status error = NativeProcessLinux::PtraceWrapper(
       PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast<void *>(offset),
       nullptr, 0, &data);
 
@@ -175,7 +176,7 @@ Error NativeRegisterContextLinux::DoRead
   return error;
 }
 
-Error NativeRegisterContextLinux::DoWriteRegisterValue(
+Status NativeRegisterContextLinux::DoWriteRegisterValue(
     uint32_t offset, const char *reg_name, const RegisterValue &value) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS));
 
@@ -186,22 +187,22 @@ Error NativeRegisterContextLinux::DoWrit
       PTRACE_POKEUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), buf);
 }
 
-Error NativeRegisterContextLinux::DoReadGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux::DoReadGPR(void *buf, size_t buf_size) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::DoWriteGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux::DoWriteGPR(void *buf, size_t buf_size) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::DoReadFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux::DoReadFPR(void *buf, size_t buf_size) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_GETFPREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);
 }
 
-Error NativeRegisterContextLinux::DoWriteFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux::DoWriteFPR(void *buf, size_t buf_size) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_SETFPREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);
 }

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.h Thu May 11 23:51:55 2017
@@ -39,24 +39,24 @@ public:
 protected:
   lldb::ByteOrder GetByteOrder() const;
 
-  virtual Error ReadRegisterRaw(uint32_t reg_index, RegisterValue &reg_value);
+  virtual Status ReadRegisterRaw(uint32_t reg_index, RegisterValue &reg_value);
 
-  virtual Error WriteRegisterRaw(uint32_t reg_index,
-                                 const RegisterValue &reg_value);
+  virtual Status WriteRegisterRaw(uint32_t reg_index,
+                                  const RegisterValue &reg_value);
 
-  virtual Error ReadRegisterSet(void *buf, size_t buf_size,
-                                unsigned int regset);
-
-  virtual Error WriteRegisterSet(void *buf, size_t buf_size,
+  virtual Status ReadRegisterSet(void *buf, size_t buf_size,
                                  unsigned int regset);
 
-  virtual Error ReadGPR();
+  virtual Status WriteRegisterSet(void *buf, size_t buf_size,
+                                  unsigned int regset);
+
+  virtual Status ReadGPR();
 
-  virtual Error WriteGPR();
+  virtual Status WriteGPR();
 
-  virtual Error ReadFPR();
+  virtual Status ReadFPR();
 
-  virtual Error WriteFPR();
+  virtual Status WriteFPR();
 
   virtual void *GetGPRBuffer() { return nullptr; }
 
@@ -71,19 +71,19 @@ protected:
   // The Do*** functions are executed on the privileged thread and can perform
   // ptrace
   // operations directly.
-  virtual Error DoReadRegisterValue(uint32_t offset, const char *reg_name,
-                                    uint32_t size, RegisterValue &value);
+  virtual Status DoReadRegisterValue(uint32_t offset, const char *reg_name,
+                                     uint32_t size, RegisterValue &value);
 
-  virtual Error DoWriteRegisterValue(uint32_t offset, const char *reg_name,
-                                     const RegisterValue &value);
+  virtual Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
+                                      const RegisterValue &value);
 
-  virtual Error DoReadGPR(void *buf, size_t buf_size);
+  virtual Status DoReadGPR(void *buf, size_t buf_size);
 
-  virtual Error DoWriteGPR(void *buf, size_t buf_size);
+  virtual Status DoWriteGPR(void *buf, size_t buf_size);
 
-  virtual Error DoReadFPR(void *buf, size_t buf_size);
+  virtual Status DoReadFPR(void *buf, size_t buf_size);
 
-  virtual Error DoWriteFPR(void *buf, size_t buf_size);
+  virtual Status DoWriteFPR(void *buf, size_t buf_size);
 };
 
 } // namespace process_linux

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp Thu May 11 23:51:55 2017
@@ -13,8 +13,8 @@
 
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Linux/Procfs.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
@@ -157,9 +157,10 @@ NativeRegisterContextLinux_arm::GetRegis
   return nullptr;
 }
 
-Error NativeRegisterContextLinux_arm::ReadRegister(const RegisterInfo *reg_info,
-                                                   RegisterValue &reg_value) {
-  Error error;
+Status
+NativeRegisterContextLinux_arm::ReadRegister(const RegisterInfo *reg_info,
+                                             RegisterValue &reg_value) {
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -226,16 +227,17 @@ Error NativeRegisterContextLinux_arm::Re
   return error;
 }
 
-Error NativeRegisterContextLinux_arm::WriteRegister(
-    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+Status
+NativeRegisterContextLinux_arm::WriteRegister(const RegisterInfo *reg_info,
+                                              const RegisterValue &reg_value) {
   if (!reg_info)
-    return Error("reg_info NULL");
+    return Status("reg_info NULL");
 
   const uint32_t reg_index = reg_info->kinds[lldb::eRegisterKindLLDB];
   if (reg_index == LLDB_INVALID_REGNUM)
-    return Error("no lldb regnum for %s", reg_info && reg_info->name
-                                              ? reg_info->name
-                                              : "<unknown register>");
+    return Status("no lldb regnum for %s", reg_info && reg_info->name
+                                               ? reg_info->name
+                                               : "<unknown register>");
 
   if (IsGPR(reg_index))
     return WriteRegisterRaw(reg_index, reg_value);
@@ -257,29 +259,29 @@ Error NativeRegisterContextLinux_arm::Wr
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled register data size %" PRIu32,
-                   reg_info->byte_size);
+      return Status("unhandled register data size %" PRIu32,
+                    reg_info->byte_size);
     }
 
-    Error error = WriteFPR();
+    Status error = WriteFPR();
     if (error.Fail())
       return error;
 
-    return Error();
+    return Status();
   }
 
-  return Error("failed - register wasn't recognized to be a GPR or an FPR, "
-               "write strategy unknown");
+  return Status("failed - register wasn't recognized to be a GPR or an FPR, "
+                "write strategy unknown");
 }
 
-Error NativeRegisterContextLinux_arm::ReadAllRegisterValues(
+Status NativeRegisterContextLinux_arm::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp)
-    return Error("failed to allocate DataBufferHeap instance of size %" PRIu64,
-                 (uint64_t)REG_CONTEXT_SIZE);
+    return Status("failed to allocate DataBufferHeap instance of size %" PRIu64,
+                  (uint64_t)REG_CONTEXT_SIZE);
 
   error = ReadGPR();
   if (error.Fail())
@@ -304,9 +306,9 @@ Error NativeRegisterContextLinux_arm::Re
   return error;
 }
 
-Error NativeRegisterContextLinux_arm::WriteAllRegisterValues(
+Status NativeRegisterContextLinux_arm::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -361,7 +363,7 @@ uint32_t NativeRegisterContextLinux_arm:
   if (log)
     log->Printf("NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
 
-  Error error;
+  Status error;
 
   // Read hardware breakpoint and watchpoint information.
   error = ReadHardwareDebugInfo();
@@ -380,7 +382,7 @@ NativeRegisterContextLinux_arm::SetHardw
   LLDB_LOG(log, "addr: {0:x}, size: {1:x}", addr, size);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return LLDB_INVALID_INDEX32;
@@ -438,7 +440,7 @@ bool NativeRegisterContextLinux_arm::Cle
   LLDB_LOG(log, "hw_idx: {0}", hw_idx);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return false;
@@ -466,7 +468,7 @@ bool NativeRegisterContextLinux_arm::Cle
   return true;
 }
 
-Error NativeRegisterContextLinux_arm::GetHardwareBreakHitIndex(
+Status NativeRegisterContextLinux_arm::GetHardwareBreakHitIndex(
     uint32_t &bp_index, lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
@@ -480,21 +482,21 @@ Error NativeRegisterContextLinux_arm::Ge
 
     if ((m_hbr_regs[bp_index].control & 0x1) && (trap_addr == break_addr)) {
       m_hbr_regs[bp_index].hit_addr = trap_addr;
-      return Error();
+      return Status();
     }
   }
 
   bp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_arm::ClearAllHardwareBreakpoints() {
+Status NativeRegisterContextLinux_arm::ClearAllHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
   if (log)
     log->Printf("NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
 
-  Error error;
+  Status error;
 
   // Read hardware breakpoint and watchpoint information.
   error = ReadHardwareDebugInfo();
@@ -527,14 +529,14 @@ Error NativeRegisterContextLinux_arm::Cl
     }
   }
 
-  return Error();
+  return Status();
 }
 
 uint32_t NativeRegisterContextLinux_arm::NumSupportedHardwareWatchpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return 0;
@@ -550,7 +552,7 @@ uint32_t NativeRegisterContextLinux_arm:
            watch_flags);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return LLDB_INVALID_INDEX32;
@@ -654,7 +656,7 @@ bool NativeRegisterContextLinux_arm::Cle
   LLDB_LOG(log, "wp_index: {0}", wp_index);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return false;
@@ -683,9 +685,9 @@ bool NativeRegisterContextLinux_arm::Cle
   return true;
 }
 
-Error NativeRegisterContextLinux_arm::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextLinux_arm::ClearAllHardwareWatchpoints() {
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return error;
@@ -715,7 +717,7 @@ Error NativeRegisterContextLinux_arm::Cl
     }
   }
 
-  return Error();
+  return Status();
 }
 
 uint32_t NativeRegisterContextLinux_arm::GetWatchpointSize(uint32_t wp_index) {
@@ -745,8 +747,9 @@ bool NativeRegisterContextLinux_arm::Wat
     return false;
 }
 
-Error NativeRegisterContextLinux_arm::GetWatchpointHitIndex(
-    uint32_t &wp_index, lldb::addr_t trap_addr) {
+Status
+NativeRegisterContextLinux_arm::GetWatchpointHitIndex(uint32_t &wp_index,
+                                                      lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
   LLDB_LOG(log, "wp_index: {0}, trap_addr: {1:x}", wp_index, trap_addr);
 
@@ -760,12 +763,12 @@ Error NativeRegisterContextLinux_arm::Ge
     if (WatchpointIsEnabled(wp_index) && trap_addr >= watch_addr &&
         trap_addr < watch_addr + watch_size) {
       m_hwp_regs[wp_index].hit_addr = trap_addr;
-      return Error();
+      return Status();
     }
   }
 
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
 lldb::addr_t
@@ -796,11 +799,11 @@ NativeRegisterContextLinux_arm::GetWatch
     return LLDB_INVALID_ADDRESS;
 }
 
-Error NativeRegisterContextLinux_arm::ReadHardwareDebugInfo() {
-  Error error;
+Status NativeRegisterContextLinux_arm::ReadHardwareDebugInfo() {
+  Status error;
 
   if (!m_refresh_hwdebug_info) {
-    return Error();
+    return Status();
   }
 
   unsigned int cap_val;
@@ -819,9 +822,9 @@ Error NativeRegisterContextLinux_arm::Re
   return error;
 }
 
-Error NativeRegisterContextLinux_arm::WriteHardwareDebugRegs(int hwbType,
-                                                             int hwb_index) {
-  Error error;
+Status NativeRegisterContextLinux_arm::WriteHardwareDebugRegs(int hwbType,
+                                                              int hwb_index) {
+  Status error;
 
   lldb::addr_t *addr_buf;
   uint32_t *ctrl_buf;
@@ -869,7 +872,7 @@ uint32_t NativeRegisterContextLinux_arm:
          GetRegisterInfoAtIndex(m_reg_info.first_fpr)->byte_offset;
 }
 
-Error NativeRegisterContextLinux_arm::DoReadRegisterValue(
+Status NativeRegisterContextLinux_arm::DoReadRegisterValue(
     uint32_t offset, const char *reg_name, uint32_t size,
     RegisterValue &value) {
   // PTRACE_PEEKUSER don't work in the aarch64 linux kernel used on android
@@ -881,17 +884,17 @@ Error NativeRegisterContextLinux_arm::Do
   // comparision to processing time in lldb-server.
   assert(offset % 4 == 0 && "Try to write a register with unaligned offset");
   if (offset + sizeof(uint32_t) > sizeof(m_gpr_arm))
-    return Error("Register isn't fit into the size of the GPR area");
+    return Status("Register isn't fit into the size of the GPR area");
 
-  Error error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
+  Status error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
   if (error.Fail())
     return error;
 
   value.SetUInt32(m_gpr_arm[offset / sizeof(uint32_t)]);
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_arm::DoWriteRegisterValue(
+Status NativeRegisterContextLinux_arm::DoWriteRegisterValue(
     uint32_t offset, const char *reg_name, const RegisterValue &value) {
   // PTRACE_POKEUSER don't work in the aarch64 linux kernel used on android
   // devices (always return
@@ -903,9 +906,9 @@ Error NativeRegisterContextLinux_arm::Do
   // lldb-server.
   assert(offset % 4 == 0 && "Try to write a register with unaligned offset");
   if (offset + sizeof(uint32_t) > sizeof(m_gpr_arm))
-    return Error("Register isn't fit into the size of the GPR area");
+    return Status("Register isn't fit into the size of the GPR area");
 
-  Error error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
+  Status error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
   if (error.Fail())
     return error;
 
@@ -927,7 +930,7 @@ Error NativeRegisterContextLinux_arm::Do
   return DoWriteGPR(m_gpr_arm, sizeof(m_gpr_arm));
 }
 
-Error NativeRegisterContextLinux_arm::DoReadGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::DoReadGPR(void *buf, size_t buf_size) {
 #ifdef __arm__
   return NativeRegisterContextLinux::DoReadGPR(buf, buf_size);
 #else  // __aarch64__
@@ -939,7 +942,7 @@ Error NativeRegisterContextLinux_arm::Do
 #endif // __arm__
 }
 
-Error NativeRegisterContextLinux_arm::DoWriteGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::DoWriteGPR(void *buf, size_t buf_size) {
 #ifdef __arm__
   return NativeRegisterContextLinux::DoWriteGPR(buf, buf_size);
 #else  // __aarch64__
@@ -951,7 +954,7 @@ Error NativeRegisterContextLinux_arm::Do
 #endif // __arm__
 }
 
-Error NativeRegisterContextLinux_arm::DoReadFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::DoReadFPR(void *buf, size_t buf_size) {
 #ifdef __arm__
   return NativeProcessLinux::PtraceWrapper(PTRACE_GETVFPREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);
@@ -964,7 +967,7 @@ Error NativeRegisterContextLinux_arm::Do
 #endif // __arm__
 }
 
-Error NativeRegisterContextLinux_arm::DoWriteFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::DoWriteFPR(void *buf, size_t buf_size) {
 #ifdef __arm__
   return NativeProcessLinux::PtraceWrapper(PTRACE_SETVFPREGS, m_thread.GetID(),
                                            nullptr, buf, buf_size);

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h Thu May 11 23:51:55 2017
@@ -32,15 +32,15 @@ public:
 
   uint32_t GetUserRegisterCount() const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
   //------------------------------------------------------------------
   // Hardware breakpoints/watchpoint mangement functions
@@ -52,10 +52,10 @@ public:
 
   bool ClearHardwareBreakpoint(uint32_t hw_idx) override;
 
-  Error ClearAllHardwareBreakpoints() override;
+  Status ClearAllHardwareBreakpoints() override;
 
-  Error GetHardwareBreakHitIndex(uint32_t &bp_index,
-                                 lldb::addr_t trap_addr) override;
+  Status GetHardwareBreakHitIndex(uint32_t &bp_index,
+                                  lldb::addr_t trap_addr) override;
 
   uint32_t NumSupportedHardwareWatchpoints() override;
 
@@ -64,10 +64,10 @@ public:
 
   bool ClearHardwareWatchpoint(uint32_t hw_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
   lldb::addr_t GetWatchpointHitAddress(uint32_t wp_index) override;
 
@@ -81,19 +81,19 @@ public:
   enum DREGType { eDREGTypeWATCH = 0, eDREGTypeBREAK };
 
 protected:
-  Error DoReadRegisterValue(uint32_t offset, const char *reg_name,
-                            uint32_t size, RegisterValue &value) override;
+  Status DoReadRegisterValue(uint32_t offset, const char *reg_name,
+                             uint32_t size, RegisterValue &value) override;
 
-  Error DoWriteRegisterValue(uint32_t offset, const char *reg_name,
-                             const RegisterValue &value) override;
+  Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
+                              const RegisterValue &value) override;
 
-  Error DoReadGPR(void *buf, size_t buf_size) override;
+  Status DoReadGPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteGPR(void *buf, size_t buf_size) override;
+  Status DoWriteGPR(void *buf, size_t buf_size) override;
 
-  Error DoReadFPR(void *buf, size_t buf_size) override;
+  Status DoReadFPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteFPR(void *buf, size_t buf_size) override;
+  Status DoWriteFPR(void *buf, size_t buf_size) override;
 
   void *GetGPRBuffer() override { return &m_gpr_arm; }
 
@@ -155,9 +155,9 @@ private:
 
   bool IsFPR(unsigned reg) const;
 
-  Error ReadHardwareDebugInfo();
+  Status ReadHardwareDebugInfo();
 
-  Error WriteHardwareDebugRegs(int hwbType, int hwb_index);
+  Status WriteHardwareDebugRegs(int hwbType, int hwb_index);
 
   uint32_t CalculateFprOffset(const RegisterInfo *reg_info) const;
 };

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Thu May 11 23:51:55 2017
@@ -19,8 +19,8 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/common/NativeProcessProtocol.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
@@ -180,9 +180,10 @@ uint32_t NativeRegisterContextLinux_arm6
   return count;
 }
 
-Error NativeRegisterContextLinux_arm64::ReadRegister(
-    const RegisterInfo *reg_info, RegisterValue &reg_value) {
-  Error error;
+Status
+NativeRegisterContextLinux_arm64::ReadRegister(const RegisterInfo *reg_info,
+                                               RegisterValue &reg_value) {
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -232,16 +233,16 @@ Error NativeRegisterContextLinux_arm64::
   return error;
 }
 
-Error NativeRegisterContextLinux_arm64::WriteRegister(
+Status NativeRegisterContextLinux_arm64::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
   if (!reg_info)
-    return Error("reg_info NULL");
+    return Status("reg_info NULL");
 
   const uint32_t reg_index = reg_info->kinds[lldb::eRegisterKindLLDB];
   if (reg_index == LLDB_INVALID_REGNUM)
-    return Error("no lldb regnum for %s", reg_info && reg_info->name
-                                              ? reg_info->name
-                                              : "<unknown register>");
+    return Status("no lldb regnum for %s", reg_info && reg_info->name
+                                               ? reg_info->name
+                                               : "<unknown register>");
 
   if (IsGPR(reg_index))
     return WriteRegisterRaw(reg_index, reg_value);
@@ -263,29 +264,29 @@ Error NativeRegisterContextLinux_arm64::
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled register data size %" PRIu32,
-                   reg_info->byte_size);
+      return Status("unhandled register data size %" PRIu32,
+                    reg_info->byte_size);
     }
 
-    Error error = WriteFPR();
+    Status error = WriteFPR();
     if (error.Fail())
       return error;
 
-    return Error();
+    return Status();
   }
 
-  return Error("failed - register wasn't recognized to be a GPR or an FPR, "
-               "write strategy unknown");
+  return Status("failed - register wasn't recognized to be a GPR or an FPR, "
+                "write strategy unknown");
 }
 
-Error NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
+Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp)
-    return Error("failed to allocate DataBufferHeap instance of size %" PRIu64,
-                 REG_CONTEXT_SIZE);
+    return Status("failed to allocate DataBufferHeap instance of size %" PRIu64,
+                  REG_CONTEXT_SIZE);
 
   error = ReadGPR();
   if (error.Fail())
@@ -310,9 +311,9 @@ Error NativeRegisterContextLinux_arm64::
   return error;
 }
 
-Error NativeRegisterContextLinux_arm64::WriteAllRegisterValues(
+Status NativeRegisterContextLinux_arm64::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -367,7 +368,7 @@ uint32_t NativeRegisterContextLinux_arm6
   if (log)
     log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
-  Error error;
+  Status error;
 
   // Read hardware breakpoint and watchpoint information.
   error = ReadHardwareDebugInfo();
@@ -385,7 +386,7 @@ NativeRegisterContextLinux_arm64::SetHar
   LLDB_LOG(log, "addr: {0:x}, size: {1:x}", addr, size);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return LLDB_INVALID_INDEX32;
@@ -443,7 +444,7 @@ bool NativeRegisterContextLinux_arm64::C
   LLDB_LOG(log, "hw_idx: {0}", hw_idx);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return false;
@@ -471,7 +472,7 @@ bool NativeRegisterContextLinux_arm64::C
   return true;
 }
 
-Error NativeRegisterContextLinux_arm64::GetHardwareBreakHitIndex(
+Status NativeRegisterContextLinux_arm64::GetHardwareBreakHitIndex(
     uint32_t &bp_index, lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
@@ -485,21 +486,21 @@ Error NativeRegisterContextLinux_arm64::
 
     if ((m_hbr_regs[bp_index].control & 0x1) && (trap_addr == break_addr)) {
       m_hbr_regs[bp_index].hit_addr = trap_addr;
-      return Error();
+      return Status();
     }
   }
 
   bp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_arm64::ClearAllHardwareBreakpoints() {
+Status NativeRegisterContextLinux_arm64::ClearAllHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
   if (log)
     log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
-  Error error;
+  Status error;
 
   // Read hardware breakpoint and watchpoint information.
   error = ReadHardwareDebugInfo();
@@ -532,14 +533,14 @@ Error NativeRegisterContextLinux_arm64::
     }
   }
 
-  return Error();
+  return Status();
 }
 
 uint32_t NativeRegisterContextLinux_arm64::NumSupportedHardwareWatchpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return 0;
@@ -555,7 +556,7 @@ uint32_t NativeRegisterContextLinux_arm6
            watch_flags);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return LLDB_INVALID_INDEX32;
@@ -642,7 +643,7 @@ bool NativeRegisterContextLinux_arm64::C
   LLDB_LOG(log, "wp_index: {0}", wp_index);
 
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return false;
@@ -671,9 +672,9 @@ bool NativeRegisterContextLinux_arm64::C
   return true;
 }
 
-Error NativeRegisterContextLinux_arm64::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextLinux_arm64::ClearAllHardwareWatchpoints() {
   // Read hardware breakpoint and watchpoint information.
-  Error error = ReadHardwareDebugInfo();
+  Status error = ReadHardwareDebugInfo();
 
   if (error.Fail())
     return error;
@@ -703,7 +704,7 @@ Error NativeRegisterContextLinux_arm64::
     }
   }
 
-  return Error();
+  return Status();
 }
 
 uint32_t
@@ -734,7 +735,7 @@ bool NativeRegisterContextLinux_arm64::W
     return false;
 }
 
-Error NativeRegisterContextLinux_arm64::GetWatchpointHitIndex(
+Status NativeRegisterContextLinux_arm64::GetWatchpointHitIndex(
     uint32_t &wp_index, lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
   LLDB_LOG(log, "wp_index: {0}, trap_addr: {1:x}", wp_index, trap_addr);
@@ -749,12 +750,12 @@ Error NativeRegisterContextLinux_arm64::
     if (WatchpointIsEnabled(wp_index) && trap_addr >= watch_addr &&
         trap_addr < watch_addr + watch_size) {
       m_hwp_regs[wp_index].hit_addr = trap_addr;
-      return Error();
+      return Status();
     }
   }
 
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
 lldb::addr_t
@@ -785,9 +786,9 @@ NativeRegisterContextLinux_arm64::GetWat
     return LLDB_INVALID_ADDRESS;
 }
 
-Error NativeRegisterContextLinux_arm64::ReadHardwareDebugInfo() {
+Status NativeRegisterContextLinux_arm64::ReadHardwareDebugInfo() {
   if (!m_refresh_hwdebug_info) {
-    return Error();
+    return Status();
   }
 
   ::pid_t tid = m_thread.GetID();
@@ -795,7 +796,7 @@ Error NativeRegisterContextLinux_arm64::
   int regset = NT_ARM_HW_WATCH;
   struct iovec ioVec;
   struct user_hwdebug_state dreg_state;
-  Error error;
+  Status error;
 
   ioVec.iov_base = &dreg_state;
   ioVec.iov_len = sizeof(dreg_state);
@@ -820,10 +821,10 @@ Error NativeRegisterContextLinux_arm64::
   return error;
 }
 
-Error NativeRegisterContextLinux_arm64::WriteHardwareDebugRegs(int hwbType) {
+Status NativeRegisterContextLinux_arm64::WriteHardwareDebugRegs(int hwbType) {
   struct iovec ioVec;
   struct user_hwdebug_state dreg_state;
-  Error error;
+  Status error;
 
   memset(&dreg_state, 0, sizeof(dreg_state));
   ioVec.iov_base = &dreg_state;
@@ -852,10 +853,10 @@ Error NativeRegisterContextLinux_arm64::
                                            &hwbType, &ioVec, ioVec.iov_len);
 }
 
-Error NativeRegisterContextLinux_arm64::DoReadRegisterValue(
+Status NativeRegisterContextLinux_arm64::DoReadRegisterValue(
     uint32_t offset, const char *reg_name, uint32_t size,
     RegisterValue &value) {
-  Error error;
+  Status error;
   if (offset > sizeof(struct user_pt_regs)) {
     uintptr_t offset = offset - sizeof(struct user_pt_regs);
     if (offset > sizeof(struct user_fpsimd_state)) {
@@ -899,9 +900,9 @@ Error NativeRegisterContextLinux_arm64::
   return error;
 }
 
-Error NativeRegisterContextLinux_arm64::DoWriteRegisterValue(
+Status NativeRegisterContextLinux_arm64::DoWriteRegisterValue(
     uint32_t offset, const char *reg_name, const RegisterValue &value) {
-  Error error;
+  Status error;
   ::pid_t tid = m_thread.GetID();
   if (offset > sizeof(struct user_pt_regs)) {
     uintptr_t offset = offset - sizeof(struct user_pt_regs);
@@ -943,10 +944,10 @@ Error NativeRegisterContextLinux_arm64::
   return error;
 }
 
-Error NativeRegisterContextLinux_arm64::DoReadGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm64::DoReadGPR(void *buf, size_t buf_size) {
   int regset = NT_PRSTATUS;
   struct iovec ioVec;
-  Error error;
+  Status error;
 
   ioVec.iov_base = buf;
   ioVec.iov_len = buf_size;
@@ -954,10 +955,11 @@ Error NativeRegisterContextLinux_arm64::
                                            &regset, &ioVec, buf_size);
 }
 
-Error NativeRegisterContextLinux_arm64::DoWriteGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm64::DoWriteGPR(void *buf,
+                                                    size_t buf_size) {
   int regset = NT_PRSTATUS;
   struct iovec ioVec;
-  Error error;
+  Status error;
 
   ioVec.iov_base = buf;
   ioVec.iov_len = buf_size;
@@ -965,10 +967,10 @@ Error NativeRegisterContextLinux_arm64::
                                            &regset, &ioVec, buf_size);
 }
 
-Error NativeRegisterContextLinux_arm64::DoReadFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm64::DoReadFPR(void *buf, size_t buf_size) {
   int regset = NT_FPREGSET;
   struct iovec ioVec;
-  Error error;
+  Status error;
 
   ioVec.iov_base = buf;
   ioVec.iov_len = buf_size;
@@ -976,10 +978,11 @@ Error NativeRegisterContextLinux_arm64::
                                            &regset, &ioVec, buf_size);
 }
 
-Error NativeRegisterContextLinux_arm64::DoWriteFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm64::DoWriteFPR(void *buf,
+                                                    size_t buf_size) {
   int regset = NT_FPREGSET;
   struct iovec ioVec;
-  Error error;
+  Status error;
 
   ioVec.iov_base = buf;
   ioVec.iov_len = buf_size;

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h Thu May 11 23:51:55 2017
@@ -32,15 +32,15 @@ public:
 
   const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
   //------------------------------------------------------------------
   // Hardware breakpoints/watchpoint mangement functions
@@ -52,10 +52,10 @@ public:
 
   bool ClearHardwareBreakpoint(uint32_t hw_idx) override;
 
-  Error ClearAllHardwareBreakpoints() override;
+  Status ClearAllHardwareBreakpoints() override;
 
-  Error GetHardwareBreakHitIndex(uint32_t &bp_index,
-                                 lldb::addr_t trap_addr) override;
+  Status GetHardwareBreakHitIndex(uint32_t &bp_index,
+                                  lldb::addr_t trap_addr) override;
 
   uint32_t NumSupportedHardwareWatchpoints() override;
 
@@ -64,10 +64,10 @@ public:
 
   bool ClearHardwareWatchpoint(uint32_t hw_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
   lldb::addr_t GetWatchpointHitAddress(uint32_t wp_index) override;
 
@@ -81,19 +81,19 @@ public:
   enum DREGType { eDREGTypeWATCH = 0, eDREGTypeBREAK };
 
 protected:
-  Error DoReadRegisterValue(uint32_t offset, const char *reg_name,
-                            uint32_t size, RegisterValue &value) override;
+  Status DoReadRegisterValue(uint32_t offset, const char *reg_name,
+                             uint32_t size, RegisterValue &value) override;
 
-  Error DoWriteRegisterValue(uint32_t offset, const char *reg_name,
-                             const RegisterValue &value) override;
+  Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
+                              const RegisterValue &value) override;
 
-  Error DoReadGPR(void *buf, size_t buf_size) override;
+  Status DoReadGPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteGPR(void *buf, size_t buf_size) override;
+  Status DoWriteGPR(void *buf, size_t buf_size) override;
 
-  Error DoReadFPR(void *buf, size_t buf_size) override;
+  Status DoReadFPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteFPR(void *buf, size_t buf_size) override;
+  Status DoWriteFPR(void *buf, size_t buf_size) override;
 
   void *GetGPRBuffer() override { return &m_gpr_arm64; }
 
@@ -155,9 +155,9 @@ private:
 
   bool IsFPR(unsigned reg) const;
 
-  Error ReadHardwareDebugInfo();
+  Status ReadHardwareDebugInfo();
 
-  Error WriteHardwareDebugRegs(int hwbType);
+  Status WriteHardwareDebugRegs(int hwbType);
 
   uint32_t CalculateFprOffset(const RegisterInfo *reg_info) const;
 };

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Thu May 11 23:51:55 2017
@@ -25,9 +25,9 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-private-enumerations.h"
 #define NT_MIPS_MSA 0x600
@@ -178,7 +178,7 @@ uint32_t NativeRegisterContextLinux_mips
 
 lldb::addr_t NativeRegisterContextLinux_mips64::GetPCfromBreakpointLocation(
     lldb::addr_t fail_value) {
-  Error error;
+  Status error;
   RegisterValue pc_value;
   lldb::addr_t pc = fail_value;
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
@@ -244,10 +244,10 @@ NativeRegisterContextLinux_mips64::GetRe
   }
 }
 
-lldb_private::Error
+lldb_private::Status
 NativeRegisterContextLinux_mips64::ReadRegister(const RegisterInfo *reg_info,
                                                 RegisterValue &reg_value) {
-  Error error;
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -315,18 +315,18 @@ NativeRegisterContextLinux_mips64::ReadR
   return error;
 }
 
-lldb_private::Error NativeRegisterContextLinux_mips64::WriteRegister(
+lldb_private::Status NativeRegisterContextLinux_mips64::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
-  Error error;
+  Status error;
 
   assert(reg_info && "reg_info is null");
 
   const uint32_t reg_index = reg_info->kinds[lldb::eRegisterKindLLDB];
 
   if (reg_index == LLDB_INVALID_REGNUM)
-    return Error("no lldb regnum for %s", reg_info && reg_info->name
-                                              ? reg_info->name
-                                              : "<unknown register>");
+    return Status("no lldb regnum for %s", reg_info && reg_info->name
+                                               ? reg_info->name
+                                               : "<unknown register>");
 
   if (IsMSA(reg_index) && !IsMSAAvailable()) {
     error.SetErrorString("MSA not available on this processor");
@@ -383,9 +383,9 @@ lldb_private::Error NativeRegisterContex
   return error;
 }
 
-Error NativeRegisterContextLinux_mips64::ReadAllRegisterValues(
+Status NativeRegisterContextLinux_mips64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp) {
@@ -426,9 +426,9 @@ Error NativeRegisterContextLinux_mips64:
   return error;
 }
 
-Error NativeRegisterContextLinux_mips64::WriteAllRegisterValues(
+Status NativeRegisterContextLinux_mips64::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -481,8 +481,8 @@ Error NativeRegisterContextLinux_mips64:
   return error;
 }
 
-Error NativeRegisterContextLinux_mips64::ReadCP1() {
-  Error error;
+Status NativeRegisterContextLinux_mips64::ReadCP1() {
+  Status error;
 
   uint8_t *src = nullptr;
   uint8_t *dst = nullptr;
@@ -529,8 +529,8 @@ NativeRegisterContextLinux_mips64::Retur
   return fp_buffer_ptr;
 }
 
-Error NativeRegisterContextLinux_mips64::WriteCP1() {
-  Error error;
+Status NativeRegisterContextLinux_mips64::WriteCP1() {
+  Status error;
 
   uint8_t *src = nullptr;
   uint8_t *dst = nullptr;
@@ -740,7 +740,7 @@ bool NativeRegisterContextLinux_mips64::
   MSA_linux_mips msa_buf;
   unsigned int regset = NT_MIPS_MSA;
 
-  Error error = NativeProcessLinux::PtraceWrapper(
+  Status error = NativeProcessLinux::PtraceWrapper(
       PTRACE_GETREGSET, Host::GetCurrentProcessID(),
       static_cast<void *>(&regset), &msa_buf, sizeof(MSA_linux_mips));
 
@@ -751,14 +751,14 @@ bool NativeRegisterContextLinux_mips64::
   return false;
 }
 
-Error NativeRegisterContextLinux_mips64::IsWatchpointHit(uint32_t wp_index,
-                                                         bool &is_hit) {
+Status NativeRegisterContextLinux_mips64::IsWatchpointHit(uint32_t wp_index,
+                                                          bool &is_hit) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   // reading the current state of watch regs
   struct pt_watch_regs watch_readback;
-  Error error = DoReadWatchPointRegisterValue(
+  Status error = DoReadWatchPointRegisterValue(
       m_thread.GetID(), static_cast<void *>(&watch_readback));
 
   if (GetWatchHi(&watch_readback, wp_index) & (IRW)) {
@@ -775,12 +775,12 @@ Error NativeRegisterContextLinux_mips64:
   return error;
 }
 
-Error NativeRegisterContextLinux_mips64::GetWatchpointHitIndex(
+Status NativeRegisterContextLinux_mips64::GetWatchpointHitIndex(
     uint32_t &wp_index, lldb::addr_t trap_addr) {
   uint32_t num_hw_wps = NumSupportedHardwareWatchpoints();
   for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) {
     bool is_hit;
-    Error error = IsWatchpointHit(wp_index, is_hit);
+    Status error = IsWatchpointHit(wp_index, is_hit);
     if (error.Fail()) {
       wp_index = LLDB_INVALID_INDEX32;
     } else if (is_hit) {
@@ -788,15 +788,15 @@ Error NativeRegisterContextLinux_mips64:
     }
   }
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_mips64::IsWatchpointVacant(uint32_t wp_index,
-                                                            bool &is_vacant) {
+Status NativeRegisterContextLinux_mips64::IsWatchpointVacant(uint32_t wp_index,
+                                                             bool &is_vacant) {
   is_vacant = false;
-  return Error("MIPS TODO: "
-               "NativeRegisterContextLinux_mips64::IsWatchpointVacant not "
-               "implemented");
+  return Status("MIPS TODO: "
+                "NativeRegisterContextLinux_mips64::IsWatchpointVacant not "
+                "implemented");
 }
 
 bool NativeRegisterContextLinux_mips64::ClearHardwareWatchpoint(
@@ -821,8 +821,8 @@ bool NativeRegisterContextLinux_mips64::
         default_watch_regs.mips64.watch_masks[wp_index];
   }
 
-  Error error = DoWriteWatchPointRegisterValue(m_thread.GetID(),
-                                               static_cast<void *>(&regs));
+  Status error = DoWriteWatchPointRegisterValue(m_thread.GetID(),
+                                                static_cast<void *>(&regs));
   if (!error.Fail()) {
     hw_addr_map[wp_index] = LLDB_INVALID_ADDRESS;
     return true;
@@ -830,14 +830,14 @@ bool NativeRegisterContextLinux_mips64::
   return false;
 }
 
-Error NativeRegisterContextLinux_mips64::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextLinux_mips64::ClearAllHardwareWatchpoints() {
   return DoWriteWatchPointRegisterValue(
       m_thread.GetID(), static_cast<void *>(&default_watch_regs));
 }
 
-Error NativeRegisterContextLinux_mips64::SetHardwareWatchpointWithIndex(
+Status NativeRegisterContextLinux_mips64::SetHardwareWatchpointWithIndex(
     lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) {
-  Error error;
+  Status error;
   error.SetErrorString("MIPS TODO: "
                        "NativeRegisterContextLinux_mips64::"
                        "SetHardwareWatchpointWithIndex not implemented");
@@ -910,7 +910,7 @@ static bool ReadRegisterCallback(Emulate
       emulator_baton->m_reg_context->GetRegisterInfo(
           lldb::eRegisterKindDWARF, reg_info->kinds[lldb::eRegisterKindDWARF]);
 
-  Error error =
+  Status error =
       emulator_baton->m_reg_context->ReadRegister(full_reg_info, reg_value);
   if (error.Success())
     return true;
@@ -991,12 +991,13 @@ uint32_t NativeRegisterContextLinux_mips
   return num_valid;
 }
 
-Error NativeRegisterContextLinux_mips64::ReadRegisterRaw(uint32_t reg_index,
-                                                         RegisterValue &value) {
+Status
+NativeRegisterContextLinux_mips64::ReadRegisterRaw(uint32_t reg_index,
+                                                   RegisterValue &value) {
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);
 
   if (!reg_info)
-    return Error("register %" PRIu32 " not found", reg_index);
+    return Status("register %" PRIu32 " not found", reg_index);
 
   uint32_t offset = reg_info->kinds[lldb::eRegisterKindProcessPlugin];
 
@@ -1008,12 +1009,12 @@ Error NativeRegisterContextLinux_mips64:
                              value);
 }
 
-Error NativeRegisterContextLinux_mips64::WriteRegisterRaw(
+Status NativeRegisterContextLinux_mips64::WriteRegisterRaw(
     uint32_t reg_index, const RegisterValue &value) {
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);
 
   if (!reg_info)
-    return Error("register %" PRIu32 " not found", reg_index);
+    return Status("register %" PRIu32 " not found", reg_index);
 
   if (reg_info->invalidate_regs)
     lldbassert(false && "reg_info->invalidate_regs is unhandled");
@@ -1022,14 +1023,14 @@ Error NativeRegisterContextLinux_mips64:
   return DoWriteRegisterValue(offset, reg_info->name, value);
 }
 
-Error NativeRegisterContextLinux_mips64::Read_SR_Config(uint32_t offset,
-                                                        const char *reg_name,
-                                                        uint32_t size,
-                                                        RegisterValue &value) {
+Status NativeRegisterContextLinux_mips64::Read_SR_Config(uint32_t offset,
+                                                         const char *reg_name,
+                                                         uint32_t size,
+                                                         RegisterValue &value) {
   GPR_linux_mips regs;
   ::memset(&regs, 0, sizeof(GPR_linux_mips));
 
-  Error error = NativeProcessLinux::PtraceWrapper(
+  Status error = NativeProcessLinux::PtraceWrapper(
       PTRACE_GETREGS, m_thread.GetID(), NULL, &regs, sizeof regs);
   if (error.Success()) {
     lldb_private::ArchSpec arch;
@@ -1043,13 +1044,13 @@ Error NativeRegisterContextLinux_mips64:
   return error;
 }
 
-Error NativeRegisterContextLinux_mips64::DoReadWatchPointRegisterValue(
+Status NativeRegisterContextLinux_mips64::DoReadWatchPointRegisterValue(
     lldb::tid_t tid, void *watch_readback) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_GET_WATCH_REGS,
                                            m_thread.GetID(), watch_readback);
 }
 
-Error NativeRegisterContextLinux_mips64::DoWriteWatchPointRegisterValue(
+Status NativeRegisterContextLinux_mips64::DoWriteWatchPointRegisterValue(
     lldb::tid_t tid, void *watch_reg_value) {
   return NativeProcessLinux::PtraceWrapper(PTRACE_SET_WATCH_REGS,
                                            m_thread.GetID(), watch_reg_value);

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h Thu May 11 23:51:55 2017
@@ -38,35 +38,36 @@ public:
 
   const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
-  Error ReadCP1();
+  Status ReadCP1();
 
-  Error WriteCP1();
+  Status WriteCP1();
 
   uint8_t *ReturnFPOffset(uint8_t reg_index, uint32_t byte_offset);
 
-  Error IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
-  Error IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
-  Error SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
-                                       uint32_t watch_flags, uint32_t wp_index);
+  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags,
+                                        uint32_t wp_index);
 
   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
                                  uint32_t watch_flags) override;
@@ -78,17 +79,17 @@ public:
   static bool IsMSAAvailable();
 
 protected:
-  Error Read_SR_Config(uint32_t offset, const char *reg_name, uint32_t size,
-                       RegisterValue &value);
+  Status Read_SR_Config(uint32_t offset, const char *reg_name, uint32_t size,
+                        RegisterValue &value);
 
-  Error ReadRegisterRaw(uint32_t reg_index, RegisterValue &value) override;
+  Status ReadRegisterRaw(uint32_t reg_index, RegisterValue &value) override;
 
-  Error WriteRegisterRaw(uint32_t reg_index,
-                         const RegisterValue &value) override;
+  Status WriteRegisterRaw(uint32_t reg_index,
+                          const RegisterValue &value) override;
 
-  Error DoReadWatchPointRegisterValue(lldb::tid_t tid, void *watch_readback);
+  Status DoReadWatchPointRegisterValue(lldb::tid_t tid, void *watch_readback);
 
-  Error DoWriteWatchPointRegisterValue(lldb::tid_t tid, void *watch_readback);
+  Status DoWriteWatchPointRegisterValue(lldb::tid_t tid, void *watch_readback);
 
   bool IsFR0();
 

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp Thu May 11 23:51:55 2017
@@ -14,8 +14,8 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
 
@@ -192,20 +192,21 @@ bool NativeRegisterContextLinux_s390x::I
           reg_index <= m_reg_info.last_fpr);
 }
 
-Error NativeRegisterContextLinux_s390x::ReadRegister(
-    const RegisterInfo *reg_info, RegisterValue &reg_value) {
+Status
+NativeRegisterContextLinux_s390x::ReadRegister(const RegisterInfo *reg_info,
+                                               RegisterValue &reg_value) {
   if (!reg_info)
-    return Error("reg_info NULL");
+    return Status("reg_info NULL");
 
   const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
   if (reg == LLDB_INVALID_REGNUM)
-    return Error("register \"%s\" is an internal-only lldb register, cannot "
-                 "read directly",
-                 reg_info->name);
+    return Status("register \"%s\" is an internal-only lldb register, cannot "
+                  "read directly",
+                  reg_info->name);
 
   if (IsGPR(reg)) {
     s390_regs regs;
-    Error error = DoReadGPR(&regs, sizeof(regs));
+    Status error = DoReadGPR(&regs, sizeof(regs));
     if (error.Fail())
       return error;
 
@@ -220,14 +221,14 @@ Error NativeRegisterContextLinux_s390x::
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled byte size: %" PRIu32, reg_info->byte_size);
+      return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
-    return Error();
+    return Status();
   }
 
   if (IsFPR(reg)) {
     s390_fp_regs fp_regs;
-    Error error = DoReadFPR(&fp_regs, sizeof(fp_regs));
+    Status error = DoReadFPR(&fp_regs, sizeof(fp_regs));
     if (error.Fail())
       return error;
 
@@ -243,48 +244,48 @@ Error NativeRegisterContextLinux_s390x::
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled byte size: %" PRIu32, reg_info->byte_size);
+      return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
-    return Error();
+    return Status();
   }
 
   if (reg == lldb_last_break_s390x) {
     uint64_t last_break;
-    Error error = DoReadRegisterSet(NT_S390_LAST_BREAK, &last_break, 8);
+    Status error = DoReadRegisterSet(NT_S390_LAST_BREAK, &last_break, 8);
     if (error.Fail())
       return error;
 
     reg_value.SetUInt64(last_break);
-    return Error();
+    return Status();
   }
 
   if (reg == lldb_system_call_s390x) {
     uint32_t system_call;
-    Error error = DoReadRegisterSet(NT_S390_SYSTEM_CALL, &system_call, 4);
+    Status error = DoReadRegisterSet(NT_S390_SYSTEM_CALL, &system_call, 4);
     if (error.Fail())
       return error;
 
     reg_value.SetUInt32(system_call);
-    return Error();
+    return Status();
   }
 
-  return Error("failed - register wasn't recognized");
+  return Status("failed - register wasn't recognized");
 }
 
-Error NativeRegisterContextLinux_s390x::WriteRegister(
+Status NativeRegisterContextLinux_s390x::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
   if (!reg_info)
-    return Error("reg_info NULL");
+    return Status("reg_info NULL");
 
   const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
   if (reg == LLDB_INVALID_REGNUM)
-    return Error("register \"%s\" is an internal-only lldb register, cannot "
-                 "write directly",
-                 reg_info->name);
+    return Status("register \"%s\" is an internal-only lldb register, cannot "
+                  "write directly",
+                  reg_info->name);
 
   if (IsGPR(reg)) {
     s390_regs regs;
-    Error error = DoReadGPR(&regs, sizeof(regs));
+    Status error = DoReadGPR(&regs, sizeof(regs));
     if (error.Fail())
       return error;
 
@@ -299,14 +300,14 @@ Error NativeRegisterContextLinux_s390x::
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled byte size: %" PRIu32, reg_info->byte_size);
+      return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
     return DoWriteGPR(&regs, sizeof(regs));
   }
 
   if (IsFPR(reg)) {
     s390_fp_regs fp_regs;
-    Error error = DoReadFPR(&fp_regs, sizeof(fp_regs));
+    Status error = DoReadFPR(&fp_regs, sizeof(fp_regs));
     if (error.Fail())
       return error;
 
@@ -322,13 +323,13 @@ Error NativeRegisterContextLinux_s390x::
       break;
     default:
       assert(false && "Unhandled data size.");
-      return Error("unhandled byte size: %" PRIu32, reg_info->byte_size);
+      return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
     return DoWriteFPR(&fp_regs, sizeof(fp_regs));
   }
 
   if (reg == lldb_last_break_s390x) {
-    return Error("The last break address is read-only");
+    return Status("The last break address is read-only");
   }
 
   if (reg == lldb_system_call_s390x) {
@@ -336,12 +337,12 @@ Error NativeRegisterContextLinux_s390x::
     return DoWriteRegisterSet(NT_S390_SYSTEM_CALL, &system_call, 4);
   }
 
-  return Error("failed - register wasn't recognized");
+  return Status("failed - register wasn't recognized");
 }
 
-Error NativeRegisterContextLinux_s390x::ReadAllRegisterValues(
+Status NativeRegisterContextLinux_s390x::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp) {
@@ -383,9 +384,9 @@ Error NativeRegisterContextLinux_s390x::
   return error;
 }
 
-Error NativeRegisterContextLinux_s390x::WriteAllRegisterValues(
+Status NativeRegisterContextLinux_s390x::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -428,19 +429,20 @@ Error NativeRegisterContextLinux_s390x::
   return error;
 }
 
-Error NativeRegisterContextLinux_s390x::DoReadRegisterValue(
+Status NativeRegisterContextLinux_s390x::DoReadRegisterValue(
     uint32_t offset, const char *reg_name, uint32_t size,
     RegisterValue &value) {
-  return Error("DoReadRegisterValue unsupported");
+  return Status("DoReadRegisterValue unsupported");
 }
 
-Error NativeRegisterContextLinux_s390x::DoWriteRegisterValue(
+Status NativeRegisterContextLinux_s390x::DoWriteRegisterValue(
     uint32_t offset, const char *reg_name, const RegisterValue &value) {
-  return Error("DoWriteRegisterValue unsupported");
+  return Status("DoWriteRegisterValue unsupported");
 }
 
-Error NativeRegisterContextLinux_s390x::PeekUserArea(uint32_t offset, void *buf,
-                                                     size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::PeekUserArea(uint32_t offset,
+                                                      void *buf,
+                                                      size_t buf_size) {
   ptrace_area parea;
   parea.len = buf_size;
   parea.process_addr = (addr_t)buf;
@@ -450,9 +452,9 @@ Error NativeRegisterContextLinux_s390x::
                                            m_thread.GetID(), &parea);
 }
 
-Error NativeRegisterContextLinux_s390x::PokeUserArea(uint32_t offset,
-                                                     const void *buf,
-                                                     size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::PokeUserArea(uint32_t offset,
+                                                      const void *buf,
+                                                      size_t buf_size) {
   ptrace_area parea;
   parea.len = buf_size;
   parea.process_addr = (addr_t)buf;
@@ -462,29 +464,31 @@ Error NativeRegisterContextLinux_s390x::
                                            m_thread.GetID(), &parea);
 }
 
-Error NativeRegisterContextLinux_s390x::DoReadGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoReadGPR(void *buf, size_t buf_size) {
   assert(buf_size == sizeof(s390_regs));
   return PeekUserArea(offsetof(user_regs_struct, psw), buf, buf_size);
 }
 
-Error NativeRegisterContextLinux_s390x::DoWriteGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoWriteGPR(void *buf,
+                                                    size_t buf_size) {
   assert(buf_size == sizeof(s390_regs));
   return PokeUserArea(offsetof(user_regs_struct, psw), buf, buf_size);
 }
 
-Error NativeRegisterContextLinux_s390x::DoReadFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoReadFPR(void *buf, size_t buf_size) {
   assert(buf_size == sizeof(s390_fp_regs));
   return PeekUserArea(offsetof(user_regs_struct, fp_regs), buf, buf_size);
 }
 
-Error NativeRegisterContextLinux_s390x::DoWriteFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoWriteFPR(void *buf,
+                                                    size_t buf_size) {
   assert(buf_size == sizeof(s390_fp_regs));
   return PokeUserArea(offsetof(user_regs_struct, fp_regs), buf, buf_size);
 }
 
-Error NativeRegisterContextLinux_s390x::DoReadRegisterSet(uint32_t regset,
-                                                          void *buf,
-                                                          size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoReadRegisterSet(uint32_t regset,
+                                                           void *buf,
+                                                           size_t buf_size) {
   struct iovec iov;
   iov.iov_base = buf;
   iov.iov_len = buf_size;
@@ -492,9 +496,9 @@ Error NativeRegisterContextLinux_s390x::
   return ReadRegisterSet(&iov, buf_size, regset);
 }
 
-Error NativeRegisterContextLinux_s390x::DoWriteRegisterSet(uint32_t regset,
-                                                           const void *buf,
-                                                           size_t buf_size) {
+Status NativeRegisterContextLinux_s390x::DoWriteRegisterSet(uint32_t regset,
+                                                            const void *buf,
+                                                            size_t buf_size) {
   struct iovec iov;
   iov.iov_base = const_cast<void *>(buf);
   iov.iov_len = buf_size;
@@ -502,20 +506,20 @@ Error NativeRegisterContextLinux_s390x::
   return WriteRegisterSet(&iov, buf_size, regset);
 }
 
-Error NativeRegisterContextLinux_s390x::IsWatchpointHit(uint32_t wp_index,
-                                                        bool &is_hit) {
+Status NativeRegisterContextLinux_s390x::IsWatchpointHit(uint32_t wp_index,
+                                                         bool &is_hit) {
   per_lowcore_bits per_lowcore;
 
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   if (m_watchpoint_addr == LLDB_INVALID_ADDRESS) {
     is_hit = false;
-    return Error();
+    return Status();
   }
 
-  Error error = PeekUserArea(offsetof(user_regs_struct, per_info.lowcore),
-                             &per_lowcore, sizeof(per_lowcore));
+  Status error = PeekUserArea(offsetof(user_regs_struct, per_info.lowcore),
+                              &per_lowcore, sizeof(per_lowcore));
   if (error.Fail()) {
     is_hit = false;
     return error;
@@ -531,15 +535,15 @@ Error NativeRegisterContextLinux_s390x::
                  sizeof(per_lowcore));
   }
 
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_s390x::GetWatchpointHitIndex(
+Status NativeRegisterContextLinux_s390x::GetWatchpointHitIndex(
     uint32_t &wp_index, lldb::addr_t trap_addr) {
   uint32_t num_hw_wps = NumSupportedHardwareWatchpoints();
   for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) {
     bool is_hit;
-    Error error = IsWatchpointHit(wp_index, is_hit);
+    Status error = IsWatchpointHit(wp_index, is_hit);
     if (error.Fail()) {
       wp_index = LLDB_INVALID_INDEX32;
       return error;
@@ -548,17 +552,17 @@ Error NativeRegisterContextLinux_s390x::
     }
   }
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_s390x::IsWatchpointVacant(uint32_t wp_index,
-                                                           bool &is_vacant) {
+Status NativeRegisterContextLinux_s390x::IsWatchpointVacant(uint32_t wp_index,
+                                                            bool &is_vacant) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   is_vacant = m_watchpoint_addr == LLDB_INVALID_ADDRESS;
 
-  return Error();
+  return Status();
 }
 
 bool NativeRegisterContextLinux_s390x::ClearHardwareWatchpoint(
@@ -568,8 +572,8 @@ bool NativeRegisterContextLinux_s390x::C
   if (wp_index >= NumSupportedHardwareWatchpoints())
     return false;
 
-  Error error = PeekUserArea(offsetof(user_regs_struct, per_info), &per_info,
-                             sizeof(per_info));
+  Status error = PeekUserArea(offsetof(user_regs_struct, per_info), &per_info,
+                              sizeof(per_info));
   if (error.Fail())
     return false;
 
@@ -587,10 +591,10 @@ bool NativeRegisterContextLinux_s390x::C
   return true;
 }
 
-Error NativeRegisterContextLinux_s390x::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextLinux_s390x::ClearAllHardwareWatchpoints() {
   if (ClearHardwareWatchpoint(0))
-    return Error();
-  return Error("Clearing all hardware watchpoints failed.");
+    return Status();
+  return Status("Clearing all hardware watchpoints failed.");
 }
 
 uint32_t NativeRegisterContextLinux_s390x::SetHardwareWatchpoint(
@@ -603,8 +607,8 @@ uint32_t NativeRegisterContextLinux_s390
   if (m_watchpoint_addr != LLDB_INVALID_ADDRESS)
     return LLDB_INVALID_INDEX32;
 
-  Error error = PeekUserArea(offsetof(user_regs_struct, per_info), &per_info,
-                             sizeof(per_info));
+  Status error = PeekUserArea(offsetof(user_regs_struct, per_info), &per_info,
+                              sizeof(per_info));
   if (error.Fail())
     return LLDB_INVALID_INDEX32;
 

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h Thu May 11 23:51:55 2017
@@ -33,26 +33,26 @@ public:
 
   uint32_t GetUserRegisterCount() const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
-  Error IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
-  Error IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
                                  uint32_t watch_flags) override;
@@ -62,19 +62,19 @@ public:
   uint32_t NumSupportedHardwareWatchpoints() override;
 
 protected:
-  Error DoReadRegisterValue(uint32_t offset, const char *reg_name,
-                            uint32_t size, RegisterValue &value) override;
+  Status DoReadRegisterValue(uint32_t offset, const char *reg_name,
+                             uint32_t size, RegisterValue &value) override;
 
-  Error DoWriteRegisterValue(uint32_t offset, const char *reg_name,
-                             const RegisterValue &value) override;
+  Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
+                              const RegisterValue &value) override;
 
-  Error DoReadGPR(void *buf, size_t buf_size) override;
+  Status DoReadGPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteGPR(void *buf, size_t buf_size) override;
+  Status DoWriteGPR(void *buf, size_t buf_size) override;
 
-  Error DoReadFPR(void *buf, size_t buf_size) override;
+  Status DoReadFPR(void *buf, size_t buf_size) override;
 
-  Error DoWriteFPR(void *buf, size_t buf_size) override;
+  Status DoWriteFPR(void *buf, size_t buf_size) override;
 
 private:
   // Info about register ranges.
@@ -99,13 +99,13 @@ private:
 
   bool IsFPR(uint32_t reg_index) const;
 
-  Error PeekUserArea(uint32_t offset, void *buf, size_t buf_size);
+  Status PeekUserArea(uint32_t offset, void *buf, size_t buf_size);
 
-  Error PokeUserArea(uint32_t offset, const void *buf, size_t buf_size);
+  Status PokeUserArea(uint32_t offset, const void *buf, size_t buf_size);
 
-  Error DoReadRegisterSet(uint32_t regset, void *buf, size_t buf_size);
+  Status DoReadRegisterSet(uint32_t regset, void *buf, size_t buf_size);
 
-  Error DoWriteRegisterSet(uint32_t regset, const void *buf, size_t buf_size);
+  Status DoWriteRegisterSet(uint32_t regset, const void *buf, size_t buf_size);
 };
 
 } // namespace process_linux

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Thu May 11 23:51:55 2017
@@ -14,8 +14,8 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
 #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
@@ -385,9 +385,10 @@ NativeRegisterContextLinux_x86_64::GetRe
   return nullptr;
 }
 
-Error NativeRegisterContextLinux_x86_64::ReadRegister(
-    const RegisterInfo *reg_info, RegisterValue &reg_value) {
-  Error error;
+Status
+NativeRegisterContextLinux_x86_64::ReadRegister(const RegisterInfo *reg_info,
+                                                RegisterValue &reg_value) {
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -529,15 +530,15 @@ Error NativeRegisterContextLinux_x86_64:
   return error;
 }
 
-Error NativeRegisterContextLinux_x86_64::WriteRegister(
+Status NativeRegisterContextLinux_x86_64::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
   assert(reg_info && "reg_info is null");
 
   const uint32_t reg_index = reg_info->kinds[lldb::eRegisterKindLLDB];
   if (reg_index == LLDB_INVALID_REGNUM)
-    return Error("no lldb regnum for %s", reg_info && reg_info->name
-                                              ? reg_info->name
-                                              : "<unknown register>");
+    return Status("no lldb regnum for %s", reg_info && reg_info->name
+                                               ? reg_info->name
+                                               : "<unknown register>");
 
   if (IsGPR(reg_index))
     return WriteRegisterRaw(reg_index, reg_value);
@@ -566,7 +567,7 @@ Error NativeRegisterContextLinux_x86_64:
         ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes,
                  reg_value.GetBytes(), reg_value.GetByteSize());
         if (!CopyYMMtoXSTATE(reg_index, GetByteOrder()))
-          return Error("CopyYMMtoXSTATE() failed");
+          return Status("CopyYMMtoXSTATE() failed");
       }
 
       if (reg_index >= m_reg_info.first_mpxr &&
@@ -574,7 +575,7 @@ Error NativeRegisterContextLinux_x86_64:
         ::memcpy(m_mpx_set.mpxr[reg_index - m_reg_info.first_mpxr].bytes,
                  reg_value.GetBytes(), reg_value.GetByteSize());
         if (!CopyMPXtoXSTATE(reg_index))
-          return Error("CopyMPXtoXSTATE() failed");
+          return Status("CopyMPXtoXSTATE() failed");
       }
 
       if (reg_index >= m_reg_info.first_mpxc &&
@@ -582,7 +583,7 @@ Error NativeRegisterContextLinux_x86_64:
         ::memcpy(m_mpx_set.mpxc[reg_index - m_reg_info.first_mpxc].bytes,
                  reg_value.GetBytes(), reg_value.GetByteSize());
         if (!CopyMPXtoXSTATE(reg_index))
-          return Error("CopyMPXtoXSTATE() failed");
+          return Status("CopyMPXtoXSTATE() failed");
       }
     } else {
       // Get pointer to m_fpr.xstate.fxsave variable and set the data to it.
@@ -616,33 +617,33 @@ Error NativeRegisterContextLinux_x86_64:
         break;
       default:
         assert(false && "Unhandled data size.");
-        return Error("unhandled register data size %" PRIu32,
-                     reg_info->byte_size);
+        return Status("unhandled register data size %" PRIu32,
+                      reg_info->byte_size);
       }
     }
 
-    Error error = WriteFPR();
+    Status error = WriteFPR();
     if (error.Fail())
       return error;
 
     if (IsAVX(reg_index)) {
       if (!CopyYMMtoXSTATE(reg_index, GetByteOrder()))
-        return Error("CopyYMMtoXSTATE() failed");
+        return Status("CopyYMMtoXSTATE() failed");
     }
 
     if (IsMPX(reg_index)) {
       if (!CopyMPXtoXSTATE(reg_index))
-        return Error("CopyMPXtoXSTATE() failed");
+        return Status("CopyMPXtoXSTATE() failed");
     }
-    return Error();
+    return Status();
   }
-  return Error("failed - register wasn't recognized to be a GPR or an FPR, "
-               "write strategy unknown");
+  return Status("failed - register wasn't recognized to be a GPR or an FPR, "
+                "write strategy unknown");
 }
 
-Error NativeRegisterContextLinux_x86_64::ReadAllRegisterValues(
+Status NativeRegisterContextLinux_x86_64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp) {
@@ -728,9 +729,9 @@ Error NativeRegisterContextLinux_x86_64:
   return error;
 }
 
-Error NativeRegisterContextLinux_x86_64::WriteAllRegisterValues(
+Status NativeRegisterContextLinux_x86_64::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -857,7 +858,7 @@ bool NativeRegisterContextLinux_x86_64::
           reg_index <= m_reg_info.last_fpr);
 }
 
-Error NativeRegisterContextLinux_x86_64::WriteFPR() {
+Status NativeRegisterContextLinux_x86_64::WriteFPR() {
   switch (m_xstate_type) {
   case XStateType::FXSAVE:
     return WriteRegisterSet(
@@ -867,7 +868,7 @@ Error NativeRegisterContextLinux_x86_64:
     return WriteRegisterSet(&m_iovec, sizeof(m_fpr.xstate.xsave),
                             NT_X86_XSTATE);
   default:
-    return Error("Unrecognized FPR type.");
+    return Status("Unrecognized FPR type.");
   }
 }
 
@@ -954,8 +955,8 @@ size_t NativeRegisterContextLinux_x86_64
   }
 }
 
-Error NativeRegisterContextLinux_x86_64::ReadFPR() {
-  Error error;
+Status NativeRegisterContextLinux_x86_64::ReadFPR() {
+  Status error;
 
   // Probe XSAVE and if it is not supported fall back to FXSAVE.
   if (m_xstate_type != XStateType::FXSAVE) {
@@ -973,7 +974,7 @@ Error NativeRegisterContextLinux_x86_64:
     m_xstate_type = XStateType::FXSAVE;
     return error;
   }
-  return Error("Unrecognized FPR type.");
+  return Status("Unrecognized FPR type.");
 }
 
 bool NativeRegisterContextLinux_x86_64::IsMPX(uint32_t reg_index) const {
@@ -1013,13 +1014,13 @@ bool NativeRegisterContextLinux_x86_64::
   return true;
 }
 
-Error NativeRegisterContextLinux_x86_64::IsWatchpointHit(uint32_t wp_index,
-                                                         bool &is_hit) {
+Status NativeRegisterContextLinux_x86_64::IsWatchpointHit(uint32_t wp_index,
+                                                          bool &is_hit) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   RegisterValue reg_value;
-  Error error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
+  Status error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
   if (error.Fail()) {
     is_hit = false;
     return error;
@@ -1032,12 +1033,12 @@ Error NativeRegisterContextLinux_x86_64:
   return error;
 }
 
-Error NativeRegisterContextLinux_x86_64::GetWatchpointHitIndex(
+Status NativeRegisterContextLinux_x86_64::GetWatchpointHitIndex(
     uint32_t &wp_index, lldb::addr_t trap_addr) {
   uint32_t num_hw_wps = NumSupportedHardwareWatchpoints();
   for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) {
     bool is_hit;
-    Error error = IsWatchpointHit(wp_index, is_hit);
+    Status error = IsWatchpointHit(wp_index, is_hit);
     if (error.Fail()) {
       wp_index = LLDB_INVALID_INDEX32;
       return error;
@@ -1046,16 +1047,16 @@ Error NativeRegisterContextLinux_x86_64:
     }
   }
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextLinux_x86_64::IsWatchpointVacant(uint32_t wp_index,
-                                                            bool &is_vacant) {
+Status NativeRegisterContextLinux_x86_64::IsWatchpointVacant(uint32_t wp_index,
+                                                             bool &is_vacant) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   RegisterValue reg_value;
-  Error error = ReadRegisterRaw(m_reg_info.first_dr + 7, reg_value);
+  Status error = ReadRegisterRaw(m_reg_info.first_dr + 7, reg_value);
   if (error.Fail()) {
     is_vacant = false;
     return error;
@@ -1068,11 +1069,11 @@ Error NativeRegisterContextLinux_x86_64:
   return error;
 }
 
-Error NativeRegisterContextLinux_x86_64::SetHardwareWatchpointWithIndex(
+Status NativeRegisterContextLinux_x86_64::SetHardwareWatchpointWithIndex(
     lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) {
 
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   // Read only watchpoints aren't supported on x86_64. Fall back to read/write
   // waitchpoints instead.
@@ -1082,17 +1083,17 @@ Error NativeRegisterContextLinux_x86_64:
     watch_flags = 0x3;
 
   if (watch_flags != 0x1 && watch_flags != 0x3)
-    return Error("Invalid read/write bits for watchpoint");
+    return Status("Invalid read/write bits for watchpoint");
 
   if (size != 1 && size != 2 && size != 4 && size != 8)
-    return Error("Invalid size for watchpoint");
+    return Status("Invalid size for watchpoint");
 
   bool is_vacant;
-  Error error = IsWatchpointVacant(wp_index, is_vacant);
+  Status error = IsWatchpointVacant(wp_index, is_vacant);
   if (error.Fail())
     return error;
   if (!is_vacant)
-    return Error("Watchpoint index not vacant");
+    return Status("Watchpoint index not vacant");
 
   RegisterValue reg_value;
   error = ReadRegisterRaw(m_reg_info.first_dr + 7, reg_value);
@@ -1140,7 +1141,7 @@ bool NativeRegisterContextLinux_x86_64::
 
   // for watchpoints 0, 1, 2, or 3, respectively,
   // clear bits 0, 1, 2, or 3 of the debug status register (DR6)
-  Error error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
+  Status error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
   if (error.Fail())
     return false;
   uint64_t bit_mask = 1 << wp_index;
@@ -1161,11 +1162,11 @@ bool NativeRegisterContextLinux_x86_64::
       .Success();
 }
 
-Error NativeRegisterContextLinux_x86_64::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextLinux_x86_64::ClearAllHardwareWatchpoints() {
   RegisterValue reg_value;
 
   // clear bits {0-4} of the debug status register (DR6)
-  Error error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
+  Status error = ReadRegisterRaw(m_reg_info.first_dr + 6, reg_value);
   if (error.Fail())
     return error;
   uint64_t bit_mask = 0xF;
@@ -1189,7 +1190,7 @@ uint32_t NativeRegisterContextLinux_x86_
   const uint32_t num_hw_watchpoints = NumSupportedHardwareWatchpoints();
   for (uint32_t wp_index = 0; wp_index < num_hw_watchpoints; ++wp_index) {
     bool is_vacant;
-    Error error = IsWatchpointVacant(wp_index, is_vacant);
+    Status error = IsWatchpointVacant(wp_index, is_vacant);
     if (is_vacant) {
       error = SetHardwareWatchpointWithIndex(addr, size, watch_flags, wp_index);
       if (error.Success())

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Thu May 11 23:51:55 2017
@@ -33,29 +33,30 @@ public:
 
   uint32_t GetUserRegisterCount() const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
-  Error IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
-  Error IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
-  Error SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
-                                       uint32_t watch_flags, uint32_t wp_index);
+  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags,
+                                        uint32_t wp_index);
 
   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
                                  uint32_t watch_flags) override;
@@ -71,9 +72,9 @@ protected:
 
   size_t GetFPRSize() override;
 
-  Error ReadFPR() override;
+  Status ReadFPR() override;
 
-  Error WriteFPR() override;
+  Status WriteFPR() override;
 
 private:
   // Private member types.

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp Thu May 11 23:51:55 2017
@@ -160,39 +160,40 @@ NativeRegisterContextSP NativeThreadLinu
   return m_reg_context_sp;
 }
 
-Error NativeThreadLinux::SetWatchpoint(lldb::addr_t addr, size_t size,
-                                       uint32_t watch_flags, bool hardware) {
+Status NativeThreadLinux::SetWatchpoint(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags, bool hardware) {
   if (!hardware)
-    return Error("not implemented");
+    return Status("not implemented");
   if (m_state == eStateLaunching)
-    return Error();
-  Error error = RemoveWatchpoint(addr);
+    return Status();
+  Status error = RemoveWatchpoint(addr);
   if (error.Fail())
     return error;
   NativeRegisterContextSP reg_ctx = GetRegisterContext();
   uint32_t wp_index = reg_ctx->SetHardwareWatchpoint(addr, size, watch_flags);
   if (wp_index == LLDB_INVALID_INDEX32)
-    return Error("Setting hardware watchpoint failed.");
+    return Status("Setting hardware watchpoint failed.");
   m_watchpoint_index_map.insert({addr, wp_index});
-  return Error();
+  return Status();
 }
 
-Error NativeThreadLinux::RemoveWatchpoint(lldb::addr_t addr) {
+Status NativeThreadLinux::RemoveWatchpoint(lldb::addr_t addr) {
   auto wp = m_watchpoint_index_map.find(addr);
   if (wp == m_watchpoint_index_map.end())
-    return Error();
+    return Status();
   uint32_t wp_index = wp->second;
   m_watchpoint_index_map.erase(wp);
   if (GetRegisterContext()->ClearHardwareWatchpoint(wp_index))
-    return Error();
-  return Error("Clearing hardware watchpoint failed.");
+    return Status();
+  return Status("Clearing hardware watchpoint failed.");
 }
 
-Error NativeThreadLinux::SetHardwareBreakpoint(lldb::addr_t addr, size_t size) {
+Status NativeThreadLinux::SetHardwareBreakpoint(lldb::addr_t addr,
+                                                size_t size) {
   if (m_state == eStateLaunching)
-    return Error();
+    return Status();
 
-  Error error = RemoveHardwareBreakpoint(addr);
+  Status error = RemoveHardwareBreakpoint(addr);
   if (error.Fail())
     return error;
 
@@ -200,27 +201,27 @@ Error NativeThreadLinux::SetHardwareBrea
   uint32_t bp_index = reg_ctx->SetHardwareBreakpoint(addr, size);
 
   if (bp_index == LLDB_INVALID_INDEX32)
-    return Error("Setting hardware breakpoint failed.");
+    return Status("Setting hardware breakpoint failed.");
 
   m_hw_break_index_map.insert({addr, bp_index});
-  return Error();
+  return Status();
 }
 
-Error NativeThreadLinux::RemoveHardwareBreakpoint(lldb::addr_t addr) {
+Status NativeThreadLinux::RemoveHardwareBreakpoint(lldb::addr_t addr) {
   auto bp = m_hw_break_index_map.find(addr);
   if (bp == m_hw_break_index_map.end())
-    return Error();
+    return Status();
 
   uint32_t bp_index = bp->second;
   if (GetRegisterContext()->ClearHardwareBreakpoint(bp_index)) {
     m_hw_break_index_map.erase(bp);
-    return Error();
+    return Status();
   }
 
-  return Error("Clearing hardware breakpoint failed.");
+  return Status("Clearing hardware breakpoint failed.");
 }
 
-Error NativeThreadLinux::Resume(uint32_t signo) {
+Status NativeThreadLinux::Resume(uint32_t signo) {
   const StateType new_state = StateType::eStateRunning;
   MaybeLogStateChange(new_state);
   m_state = new_state;
@@ -262,7 +263,7 @@ Error NativeThreadLinux::Resume(uint32_t
                                            reinterpret_cast<void *>(data));
 }
 
-Error NativeThreadLinux::SingleStep(uint32_t signo) {
+Status NativeThreadLinux::SingleStep(uint32_t signo) {
   const StateType new_state = StateType::eStateStepping;
   MaybeLogStateChange(new_state);
   m_state = new_state;
@@ -422,7 +423,7 @@ void NativeThreadLinux::SetExited() {
   m_stop_info.reason = StopReason::eStopReasonThreadExiting;
 }
 
-Error NativeThreadLinux::RequestStop() {
+Status NativeThreadLinux::RequestStop() {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
 
   NativeProcessLinux &process = GetProcess();
@@ -435,7 +436,7 @@ Error NativeThreadLinux::RequestStop() {
                 ", tid: %" PRIu64 ")",
                 __FUNCTION__, pid, tid);
 
-  Error err;
+  Status err;
   errno = 0;
   if (::tgkill(pid, tid, SIGSTOP) != 0) {
     err.SetErrorToErrno();

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h Thu May 11 23:51:55 2017
@@ -41,14 +41,14 @@ public:
 
   NativeRegisterContextSP GetRegisterContext() override;
 
-  Error SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
-                      bool hardware) override;
+  Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
+                       bool hardware) override;
 
-  Error RemoveWatchpoint(lldb::addr_t addr) override;
+  Status RemoveWatchpoint(lldb::addr_t addr) override;
 
-  Error SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
+  Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
 
-  Error RemoveHardwareBreakpoint(lldb::addr_t addr) override;
+  Status RemoveHardwareBreakpoint(lldb::addr_t addr) override;
 
 private:
   // ---------------------------------------------------------------------
@@ -57,11 +57,11 @@ private:
 
   /// Resumes the thread.  If @p signo is anything but
   /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Error Resume(uint32_t signo);
+  Status Resume(uint32_t signo);
 
   /// Single steps the thread.  If @p signo is anything but
   /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Error SingleStep(uint32_t signo);
+  Status SingleStep(uint32_t signo);
 
   void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
 
@@ -86,7 +86,7 @@ private:
 
   void SetExited();
 
-  Error RequestStop();
+  Status RequestStop();
 
   // ---------------------------------------------------------------------
   // Private interface

Modified: lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp Thu May 11 23:51:55 2017
@@ -20,7 +20,7 @@
 
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "lldb/Host/linux/Ptrace.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -77,7 +77,7 @@ bool WorkaroundNeeded() {
   if (sched_getaffinity(child_pid, sizeof available_cpus, &available_cpus) ==
       -1) {
     LLDB_LOG(log, "failed to get available cpus: {0}",
-             Error(errno, eErrorTypePOSIX));
+             Status(errno, eErrorTypePOSIX));
     return false;
   }
 
@@ -85,7 +85,7 @@ bool WorkaroundNeeded() {
   ::pid_t wpid = waitpid(child_pid, &status, __WALL);
   if (wpid != child_pid || !WIFSTOPPED(status)) {
     LLDB_LOG(log, "waitpid() failed (status = {0:x}): {1}", status,
-             Error(errno, eErrorTypePOSIX));
+             Status(errno, eErrorTypePOSIX));
     return false;
   }
 
@@ -99,12 +99,12 @@ bool WorkaroundNeeded() {
     CPU_SET(cpu, &cpus);
     if (sched_setaffinity(child_pid, sizeof cpus, &cpus) == -1) {
       LLDB_LOG(log, "failed to switch to cpu {0}: {1}", cpu,
-               Error(errno, eErrorTypePOSIX));
+               Status(errno, eErrorTypePOSIX));
       continue;
     }
 
     int status;
-    Error error =
+    Status error =
         NativeProcessLinux::PtraceWrapper(PTRACE_SINGLESTEP, child_pid);
     if (error.Fail()) {
       LLDB_LOG(log, "single step failed: {0}", error);
@@ -114,7 +114,7 @@ bool WorkaroundNeeded() {
     wpid = waitpid(child_pid, &status, __WALL);
     if (wpid != child_pid || !WIFSTOPPED(status)) {
       LLDB_LOG(log, "waitpid() failed (status = {0:x}): {1}", status,
-               Error(errno, eErrorTypePOSIX));
+               Status(errno, eErrorTypePOSIX));
       break;
     }
     if (WSTOPSIG(status) != SIGTRAP) {
@@ -152,7 +152,7 @@ std::unique_ptr<SingleStepWorkaround> Si
   if (sched_getaffinity(tid, sizeof original_set, &original_set) != 0) {
     // This should really not fail. But, just in case...
     LLDB_LOG(log, "Unable to get cpu affinity for thread {0}: {1}", tid,
-             Error(errno, eErrorTypePOSIX));
+             Status(errno, eErrorTypePOSIX));
     return nullptr;
   }
 
@@ -164,7 +164,7 @@ std::unique_ptr<SingleStepWorkaround> Si
     // to run on cpu 0. If that happens, only thing we can do is it log it and
     // continue...
     LLDB_LOG(log, "Unable to set cpu affinity for thread {0}: {1}", tid,
-             Error(errno, eErrorTypePOSIX));
+             Status(errno, eErrorTypePOSIX));
   }
 
   LLDB_LOG(log, "workaround for thread {0} prepared", tid);
@@ -176,7 +176,7 @@ SingleStepWorkaround::~SingleStepWorkaro
   LLDB_LOG(log, "Removing workaround");
   if (sched_setaffinity(m_tid, sizeof m_original_set, &m_original_set) != 0) {
     LLDB_LOG(log, "Unable to reset cpu affinity for thread {0}: {1}", m_tid,
-             Error(errno, eErrorTypePOSIX));
+             Status(errno, eErrorTypePOSIX));
   }
 }
 #endif

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Thu May 11 23:51:55 2017
@@ -199,7 +199,7 @@ CommunicationKDP::WaitForPacketWithTimeo
 size_t CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock(
     DataExtractor &packet, uint32_t timeout_usec) {
   uint8_t buffer[8192];
-  Error error;
+  Status error;
 
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PACKETS));
 
@@ -602,7 +602,7 @@ bool CommunicationKDP::SendRequestDiscon
 
 uint32_t CommunicationKDP::SendRequestReadMemory(lldb::addr_t addr, void *dst,
                                                  uint32_t dst_len,
-                                                 Error &error) {
+                                                 Status &error) {
   PacketStreamType request_packet(Stream::eBinary, m_addr_byte_size,
                                   m_byte_order);
   bool use_64 = (GetVersion() >= 11);
@@ -641,7 +641,7 @@ uint32_t CommunicationKDP::SendRequestRe
 uint32_t CommunicationKDP::SendRequestWriteMemory(lldb::addr_t addr,
                                                   const void *src,
                                                   uint32_t src_len,
-                                                  Error &error) {
+                                                  Status &error) {
   PacketStreamType request_packet(Stream::eBinary, m_addr_byte_size,
                                   m_byte_order);
   bool use_64 = (GetVersion() >= 11);
@@ -675,7 +675,7 @@ bool CommunicationKDP::SendRawRequest(
     uint8_t command_byte,
     const void *src,  // Raw packet payload bytes
     uint32_t src_len, // Raw packet payload length
-    DataExtractor &reply_packet, Error &error) {
+    DataExtractor &reply_packet, Status &error) {
   PacketStreamType request_packet(Stream::eBinary, m_addr_byte_size,
                                   m_byte_order);
   // Size is header + address size + uint32_t length
@@ -1224,7 +1224,7 @@ void CommunicationKDP::DumpPacket(Stream
 uint32_t CommunicationKDP::SendRequestReadRegisters(uint32_t cpu,
                                                     uint32_t flavor, void *dst,
                                                     uint32_t dst_len,
-                                                    Error &error) {
+                                                    Status &error) {
   PacketStreamType request_packet(Stream::eBinary, m_addr_byte_size,
                                   m_byte_order);
   const CommandType command = KDP_READREGS;
@@ -1267,7 +1267,7 @@ uint32_t CommunicationKDP::SendRequestWr
                                                      uint32_t flavor,
                                                      const void *src,
                                                      uint32_t src_len,
-                                                     Error &error) {
+                                                     Status &error) {
   PacketStreamType request_packet(Stream::eBinary, m_addr_byte_size,
                                   m_byte_order);
   const CommandType command = KDP_WRITEREGS;

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h Thu May 11 23:51:55 2017
@@ -128,22 +128,24 @@ public:
   bool SendRequestDisconnect();
 
   uint32_t SendRequestReadMemory(lldb::addr_t addr, void *dst,
-                                 uint32_t dst_size, lldb_private::Error &error);
+                                 uint32_t dst_size,
+                                 lldb_private::Status &error);
 
   uint32_t SendRequestWriteMemory(lldb::addr_t addr, const void *src,
-                                  uint32_t src_len, lldb_private::Error &error);
+                                  uint32_t src_len,
+                                  lldb_private::Status &error);
 
   bool SendRawRequest(uint8_t command_byte, const void *src, uint32_t src_len,
                       lldb_private::DataExtractor &reply,
-                      lldb_private::Error &error);
+                      lldb_private::Status &error);
 
   uint32_t SendRequestReadRegisters(uint32_t cpu, uint32_t flavor, void *dst,
                                     uint32_t dst_size,
-                                    lldb_private::Error &error);
+                                    lldb_private::Status &error);
 
   uint32_t SendRequestWriteRegisters(uint32_t cpu, uint32_t flavor,
                                      const void *src, uint32_t src_size,
-                                     lldb_private::Error &error);
+                                     lldb_private::Status &error);
 
   const char *GetKernelVersion();
 

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Thu May 11 23:51:55 2017
@@ -188,22 +188,22 @@ lldb_private::ConstString ProcessKDP::Ge
 
 uint32_t ProcessKDP::GetPluginVersion() { return 1; }
 
-Error ProcessKDP::WillLaunch(Module *module) {
-  Error error;
+Status ProcessKDP::WillLaunch(Module *module) {
+  Status error;
   error.SetErrorString("launching not supported in kdp-remote plug-in");
   return error;
 }
 
-Error ProcessKDP::WillAttachToProcessWithID(lldb::pid_t pid) {
-  Error error;
+Status ProcessKDP::WillAttachToProcessWithID(lldb::pid_t pid) {
+  Status error;
   error.SetErrorString(
       "attaching to a by process ID not supported in kdp-remote plug-in");
   return error;
 }
 
-Error ProcessKDP::WillAttachToProcessWithName(const char *process_name,
-                                              bool wait_for_launch) {
-  Error error;
+Status ProcessKDP::WillAttachToProcessWithName(const char *process_name,
+                                               bool wait_for_launch) {
+  Status error;
   error.SetErrorString(
       "attaching to a by process name not supported in kdp-remote plug-in");
   return error;
@@ -223,8 +223,8 @@ bool ProcessKDP::GetHostArchitecture(Arc
   return false;
 }
 
-Error ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
-  Error error;
+Status ProcessKDP::DoConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+  Status error;
 
   // Don't let any JIT happen when doing KDP as we can't allocate
   // memory and we don't want to be mucking with threads that might
@@ -374,23 +374,26 @@ Error ProcessKDP::DoConnectRemote(Stream
 //----------------------------------------------------------------------
 // Process Control
 //----------------------------------------------------------------------
-Error ProcessKDP::DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) {
-  Error error;
+Status ProcessKDP::DoLaunch(Module *exe_module,
+                            ProcessLaunchInfo &launch_info) {
+  Status error;
   error.SetErrorString("launching not supported in kdp-remote plug-in");
   return error;
 }
 
-Error ProcessKDP::DoAttachToProcessWithID(
-    lldb::pid_t attach_pid, const ProcessAttachInfo &attach_info) {
-  Error error;
+Status
+ProcessKDP::DoAttachToProcessWithID(lldb::pid_t attach_pid,
+                                    const ProcessAttachInfo &attach_info) {
+  Status error;
   error.SetErrorString(
       "attach to process by ID is not suppported in kdp remote debugging");
   return error;
 }
 
-Error ProcessKDP::DoAttachToProcessWithName(
-    const char *process_name, const ProcessAttachInfo &attach_info) {
-  Error error;
+Status
+ProcessKDP::DoAttachToProcessWithName(const char *process_name,
+                                      const ProcessAttachInfo &attach_info) {
+  Status error;
   error.SetErrorString(
       "attach to process by name is not suppported in kdp remote debugging");
   return error;
@@ -417,10 +420,10 @@ lldb_private::DynamicLoader *ProcessKDP:
   return m_dyld_ap.get();
 }
 
-Error ProcessKDP::WillResume() { return Error(); }
+Status ProcessKDP::WillResume() { return Status(); }
 
-Error ProcessKDP::DoResume() {
-  Error error;
+Status ProcessKDP::DoResume() {
+  Status error;
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
   // Only start the async thread if we try to do any process control
   if (!m_async_thread.IsJoinable())
@@ -537,8 +540,8 @@ void ProcessKDP::RefreshStateAfterStop()
   m_thread_list.RefreshStateAfterStop();
 }
 
-Error ProcessKDP::DoHalt(bool &caused_stop) {
-  Error error;
+Status ProcessKDP::DoHalt(bool &caused_stop) {
+  Status error;
 
   if (m_comm.IsRunning()) {
     if (m_destroy_in_process) {
@@ -553,8 +556,8 @@ Error ProcessKDP::DoHalt(bool &caused_st
   return error;
 }
 
-Error ProcessKDP::DoDetach(bool keep_stopped) {
-  Error error;
+Status ProcessKDP::DoDetach(bool keep_stopped) {
+  Status error;
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
   if (log)
     log->Printf("ProcessKDP::DoDetach(keep_stopped = %i)", keep_stopped);
@@ -588,7 +591,7 @@ Error ProcessKDP::DoDetach(bool keep_sto
   return error;
 }
 
-Error ProcessKDP::DoDestroy() {
+Status ProcessKDP::DoDestroy() {
   // For KDP there really is no difference between destroy and detach
   bool keep_stopped = false;
   return DoDetach(keep_stopped);
@@ -606,7 +609,7 @@ bool ProcessKDP::IsAlive() {
 // Process Memory
 //------------------------------------------------------------------
 size_t ProcessKDP::DoReadMemory(addr_t addr, void *buf, size_t size,
-                                Error &error) {
+                                Status &error) {
   uint8_t *data_buffer = (uint8_t *)buf;
   if (m_comm.IsConnected()) {
     const size_t max_read_size = 512;
@@ -634,7 +637,7 @@ size_t ProcessKDP::DoReadMemory(addr_t a
 }
 
 size_t ProcessKDP::DoWriteMemory(addr_t addr, const void *buf, size_t size,
-                                 Error &error) {
+                                 Status &error) {
   if (m_comm.IsConnected())
     return m_comm.SendRequestWriteMemory(addr, buf, size, error);
   error.SetErrorString("not connected");
@@ -642,22 +645,22 @@ size_t ProcessKDP::DoWriteMemory(addr_t
 }
 
 lldb::addr_t ProcessKDP::DoAllocateMemory(size_t size, uint32_t permissions,
-                                          Error &error) {
+                                          Status &error) {
   error.SetErrorString(
       "memory allocation not suppported in kdp remote debugging");
   return LLDB_INVALID_ADDRESS;
 }
 
-Error ProcessKDP::DoDeallocateMemory(lldb::addr_t addr) {
-  Error error;
+Status ProcessKDP::DoDeallocateMemory(lldb::addr_t addr) {
+  Status error;
   error.SetErrorString(
       "memory deallocation not suppported in kdp remote debugging");
   return error;
 }
 
-Error ProcessKDP::EnableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessKDP::EnableBreakpointSite(BreakpointSite *bp_site) {
   if (m_comm.LocalBreakpointsAreSupported()) {
-    Error error;
+    Status error;
     if (!bp_site->IsEnabled()) {
       if (m_comm.SendRequestBreakpoint(true, bp_site->GetLoadAddress())) {
         bp_site->SetEnabled(true);
@@ -671,9 +674,9 @@ Error ProcessKDP::EnableBreakpointSite(B
   return EnableSoftwareBreakpoint(bp_site);
 }
 
-Error ProcessKDP::DisableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessKDP::DisableBreakpointSite(BreakpointSite *bp_site) {
   if (m_comm.LocalBreakpointsAreSupported()) {
-    Error error;
+    Status error;
     if (bp_site->IsEnabled()) {
       BreakpointSite::Type bp_type = bp_site->GetType();
       if (bp_type == BreakpointSite::eExternal) {
@@ -695,15 +698,15 @@ Error ProcessKDP::DisableBreakpointSite(
   return DisableSoftwareBreakpoint(bp_site);
 }
 
-Error ProcessKDP::EnableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessKDP::EnableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   error.SetErrorString(
       "watchpoints are not suppported in kdp remote debugging");
   return error;
 }
 
-Error ProcessKDP::DisableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessKDP::DisableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   error.SetErrorString(
       "watchpoints are not suppported in kdp remote debugging");
   return error;
@@ -711,8 +714,8 @@ Error ProcessKDP::DisableWatchpoint(Watc
 
 void ProcessKDP::Clear() { m_thread_list.Clear(); }
 
-Error ProcessKDP::DoSignal(int signo) {
-  Error error;
+Status ProcessKDP::DoSignal(int signo) {
+  Status error;
   error.SetErrorString(
       "sending signals is not suppported in kdp remote debugging");
   return error;
@@ -950,7 +953,7 @@ public:
                   return false;
                 }
               }
-              Error error;
+              Status error;
               DataExtractor reply;
               process->GetCommunication().SendRawRequest(
                   command_byte,

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h Thu May 11 23:51:55 2017
@@ -24,7 +24,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StringList.h"
 
@@ -68,26 +68,26 @@ public:
   //------------------------------------------------------------------
   // Creating a new process, or attaching to an existing one
   //------------------------------------------------------------------
-  lldb_private::Error WillLaunch(lldb_private::Module *module) override;
+  lldb_private::Status WillLaunch(lldb_private::Module *module) override;
 
-  lldb_private::Error
+  lldb_private::Status
   DoLaunch(lldb_private::Module *exe_module,
            lldb_private::ProcessLaunchInfo &launch_info) override;
 
-  lldb_private::Error WillAttachToProcessWithID(lldb::pid_t pid) override;
+  lldb_private::Status WillAttachToProcessWithID(lldb::pid_t pid) override;
 
-  lldb_private::Error
+  lldb_private::Status
   WillAttachToProcessWithName(const char *process_name,
                               bool wait_for_launch) override;
 
-  lldb_private::Error DoConnectRemote(lldb_private::Stream *strm,
-                                      llvm::StringRef remote_url) override;
+  lldb_private::Status DoConnectRemote(lldb_private::Stream *strm,
+                                       llvm::StringRef remote_url) override;
 
-  lldb_private::Error DoAttachToProcessWithID(
+  lldb_private::Status DoAttachToProcessWithID(
       lldb::pid_t pid,
       const lldb_private::ProcessAttachInfo &attach_info) override;
 
-  lldb_private::Error DoAttachToProcessWithName(
+  lldb_private::Status DoAttachToProcessWithName(
       const char *process_name,
       const lldb_private::ProcessAttachInfo &attach_info) override;
 
@@ -107,17 +107,17 @@ public:
   //------------------------------------------------------------------
   // Process Control
   //------------------------------------------------------------------
-  lldb_private::Error WillResume() override;
+  lldb_private::Status WillResume() override;
 
-  lldb_private::Error DoResume() override;
+  lldb_private::Status DoResume() override;
 
-  lldb_private::Error DoHalt(bool &caused_stop) override;
+  lldb_private::Status DoHalt(bool &caused_stop) override;
 
-  lldb_private::Error DoDetach(bool keep_stopped) override;
+  lldb_private::Status DoDetach(bool keep_stopped) override;
 
-  lldb_private::Error DoSignal(int signal) override;
+  lldb_private::Status DoSignal(int signal) override;
 
-  lldb_private::Error DoDestroy() override;
+  lldb_private::Status DoDestroy() override;
 
   void RefreshStateAfterStop() override;
 
@@ -130,34 +130,34 @@ public:
   // Process Memory
   //------------------------------------------------------------------
   size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                      lldb_private::Error &error) override;
+                      lldb_private::Status &error) override;
 
   size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                       lldb_private::Error &error) override;
+                       lldb_private::Status &error) override;
 
   lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions,
-                                lldb_private::Error &error) override;
+                                lldb_private::Status &error) override;
 
-  lldb_private::Error DoDeallocateMemory(lldb::addr_t ptr) override;
+  lldb_private::Status DoDeallocateMemory(lldb::addr_t ptr) override;
 
   //----------------------------------------------------------------------
   // Process Breakpoints
   //----------------------------------------------------------------------
-  lldb_private::Error
+  lldb_private::Status
   EnableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
 
-  lldb_private::Error
+  lldb_private::Status
   DisableBreakpointSite(lldb_private::BreakpointSite *bp_site) override;
 
   //----------------------------------------------------------------------
   // Process Watchpoints
   //----------------------------------------------------------------------
-  lldb_private::Error EnableWatchpoint(lldb_private::Watchpoint *wp,
-                                       bool notify = true) override;
-
-  lldb_private::Error DisableWatchpoint(lldb_private::Watchpoint *wp,
+  lldb_private::Status EnableWatchpoint(lldb_private::Watchpoint *wp,
                                         bool notify = true) override;
 
+  lldb_private::Status DisableWatchpoint(lldb_private::Watchpoint *wp,
+                                         bool notify = true) override;
+
   CommunicationKDP &GetCommunication() { return m_comm; }
 
 protected:

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.cpp Thu May 11 23:51:55 2017
@@ -29,7 +29,7 @@ RegisterContextKDP_arm::~RegisterContext
 int RegisterContextKDP_arm::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -44,7 +44,7 @@ int RegisterContextKDP_arm::DoReadGPR(ll
 int RegisterContextKDP_arm::DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -59,7 +59,7 @@ int RegisterContextKDP_arm::DoReadFPU(ll
 int RegisterContextKDP_arm::DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -74,7 +74,7 @@ int RegisterContextKDP_arm::DoReadEXC(ll
 int RegisterContextKDP_arm::DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, DBGRegSet, &dbg, sizeof(dbg),
@@ -90,7 +90,7 @@ int RegisterContextKDP_arm::DoWriteGPR(l
                                        const GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -106,7 +106,7 @@ int RegisterContextKDP_arm::DoWriteFPU(l
                                        const FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -122,7 +122,7 @@ int RegisterContextKDP_arm::DoWriteEXC(l
                                        const EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -138,7 +138,7 @@ int RegisterContextKDP_arm::DoWriteDBG(l
                                        const DBG &dbg) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, DBGRegSet, &dbg, sizeof(dbg),

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.cpp Thu May 11 23:51:55 2017
@@ -30,7 +30,7 @@ RegisterContextKDP_arm64::~RegisterConte
 int RegisterContextKDP_arm64::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -45,7 +45,7 @@ int RegisterContextKDP_arm64::DoReadGPR(
 int RegisterContextKDP_arm64::DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -60,7 +60,7 @@ int RegisterContextKDP_arm64::DoReadFPU(
 int RegisterContextKDP_arm64::DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -75,7 +75,7 @@ int RegisterContextKDP_arm64::DoReadEXC(
 int RegisterContextKDP_arm64::DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, DBGRegSet, &dbg, sizeof(dbg),
@@ -91,7 +91,7 @@ int RegisterContextKDP_arm64::DoWriteGPR
                                          const GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -107,7 +107,7 @@ int RegisterContextKDP_arm64::DoWriteFPU
                                          const FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -123,7 +123,7 @@ int RegisterContextKDP_arm64::DoWriteEXC
                                          const EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -139,7 +139,7 @@ int RegisterContextKDP_arm64::DoWriteDBG
                                          const DBG &dbg) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, DBGRegSet, &dbg, sizeof(dbg),

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp Thu May 11 23:51:55 2017
@@ -28,7 +28,7 @@ RegisterContextKDP_i386::~RegisterContex
 int RegisterContextKDP_i386::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -43,7 +43,7 @@ int RegisterContextKDP_i386::DoReadGPR(l
 int RegisterContextKDP_i386::DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -58,7 +58,7 @@ int RegisterContextKDP_i386::DoReadFPU(l
 int RegisterContextKDP_i386::DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -74,7 +74,7 @@ int RegisterContextKDP_i386::DoWriteGPR(
                                         const GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -90,7 +90,7 @@ int RegisterContextKDP_i386::DoWriteFPU(
                                         const FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -106,7 +106,7 @@ int RegisterContextKDP_i386::DoWriteEXC(
                                         const EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, EXCRegSet, &exc, sizeof(exc),

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.cpp Thu May 11 23:51:55 2017
@@ -29,7 +29,7 @@ int RegisterContextKDP_x86_64::DoReadGPR
                                          GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -45,7 +45,7 @@ int RegisterContextKDP_x86_64::DoReadFPU
                                          FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -61,7 +61,7 @@ int RegisterContextKDP_x86_64::DoReadEXC
                                          EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestReadRegisters(tid, EXCRegSet, &exc, sizeof(exc),
@@ -77,7 +77,7 @@ int RegisterContextKDP_x86_64::DoWriteGP
                                           const GPR &gpr) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
@@ -93,7 +93,7 @@ int RegisterContextKDP_x86_64::DoWriteFP
                                           const FPU &fpu) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
@@ -109,7 +109,7 @@ int RegisterContextKDP_x86_64::DoWriteEX
                                           const EXC &exc) {
   ProcessSP process_sp(CalculateProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     if (static_cast<ProcessKDP *>(process_sp.get())
             ->GetCommunication()
             .SendRequestWriteRegisters(tid, EXCRegSet, &exc, sizeof(exc),

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Thu May 11 23:51:55 2017
@@ -68,8 +68,8 @@ static int convert_pid_status_to_return_
 
 // Simple helper function to ensure flags are enabled on the given file
 // descriptor.
-static Error EnsureFDFlags(int fd, int flags) {
-  Error error;
+static Status EnsureFDFlags(int fd, int flags) {
+  Status error;
 
   int status = fcntl(fd, F_GETFL);
   if (status == -1) {
@@ -89,13 +89,13 @@ static Error EnsureFDFlags(int fd, int f
 // Public Static Methods
 // -----------------------------------------------------------------------------
 
-Error NativeProcessProtocol::Launch(
+Status NativeProcessProtocol::Launch(
     ProcessLaunchInfo &launch_info,
     NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
     NativeProcessProtocolSP &native_process_sp) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
-  Error error;
+  Status error;
 
   // Verify the working directory is valid if one was specified.
   FileSpec working_dir{launch_info.GetWorkingDirectory()};
@@ -129,7 +129,7 @@ Error NativeProcessProtocol::Launch(
   return error;
 }
 
-Error NativeProcessProtocol::Attach(
+Status NativeProcessProtocol::Attach(
     lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
     MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
@@ -137,7 +137,7 @@ Error NativeProcessProtocol::Attach(
 
   // Retrieve the architecture for the running process.
   ArchSpec process_arch;
-  Error error = ResolveProcessArchitecture(pid, process_arch);
+  Status error = ResolveProcessArchitecture(pid, process_arch);
   if (!error.Success())
     return error;
 
@@ -245,7 +245,7 @@ void NativeProcessNetBSD::MonitorSIGTRAP
     SetState(StateType::eStateStopped, true);
     break;
   case TRAP_EXEC: {
-    Error error = ReinitializeThreads();
+    Status error = ReinitializeThreads();
     if (error.Fail()) {
       SetState(StateType::eStateInvalid);
       return;
@@ -262,7 +262,7 @@ void NativeProcessNetBSD::MonitorSIGTRAP
   case TRAP_DBREG: {
     // If a watchpoint was hit, report it
     uint32_t wp_index;
-    Error error =
+    Status error =
         static_pointer_cast<NativeThreadNetBSD>(m_threads[info.psi_lwpid])
             ->GetRegisterContext()
             ->GetWatchpointHitIndex(wp_index,
@@ -318,10 +318,10 @@ void NativeProcessNetBSD::MonitorSignal(
   SetState(StateType::eStateStopped, true);
 }
 
-Error NativeProcessNetBSD::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
-                                         int data, int *result) {
+Status NativeProcessNetBSD::PtraceWrapper(int req, lldb::pid_t pid, void *addr,
+                                          int data, int *result) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
-  Error error;
+  Status error;
   int ret;
 
   errno = 0;
@@ -341,7 +341,7 @@ Error NativeProcessNetBSD::PtraceWrapper
   return error;
 }
 
-Error NativeProcessNetBSD::GetSoftwareBreakpointPCOffset(
+Status NativeProcessNetBSD::GetSoftwareBreakpointPCOffset(
     uint32_t &actual_opcode_size) {
   // FIXME put this behind a breakpoint protocol class that can be
   // set per architecture.  Need ARM, MIPS support here.
@@ -349,17 +349,17 @@ Error NativeProcessNetBSD::GetSoftwareBr
   switch (m_arch.GetMachine()) {
   case llvm::Triple::x86_64:
     actual_opcode_size = static_cast<uint32_t>(sizeof(g_i386_opcode));
-    return Error();
+    return Status();
   default:
     assert(false && "CPU type not supported!");
-    return Error("CPU type not supported");
+    return Status("CPU type not supported");
   }
 }
 
-Error NativeProcessNetBSD::FixupBreakpointPCAsNeeded(
-    NativeThreadNetBSD &thread) {
+Status
+NativeProcessNetBSD::FixupBreakpointPCAsNeeded(NativeThreadNetBSD &thread) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
-  Error error;
+  Status error;
   // Find out the size of a breakpoint (might depend on where we are in the
   // code).
   NativeRegisterContextSP context_sp = thread.GetRegisterContext();
@@ -394,7 +394,7 @@ Error NativeProcessNetBSD::FixupBreakpoi
              "pid {0} no lldb breakpoint found at current pc with "
              "adjustment: {1}",
              GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
   // If the breakpoint is not a software breakpoint, nothing to do.
   if (!breakpoint_sp->IsSoftwareBreakpoint()) {
@@ -402,7 +402,7 @@ Error NativeProcessNetBSD::FixupBreakpoi
         log,
         "pid {0} breakpoint found at {1:x}, not software, nothing to adjust",
         GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
   //
   // We have a software breakpoint and need to adjust the PC.
@@ -414,7 +414,7 @@ Error NativeProcessNetBSD::FixupBreakpoi
              "pid {0} breakpoint found at {1:x}, it is software, but the "
              "size is zero, nothing to do (unexpected)",
              GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
   //
   // We have a software breakpoint and need to adjust the PC.
@@ -426,7 +426,7 @@ Error NativeProcessNetBSD::FixupBreakpoi
              "pid {0} breakpoint found at {1:x}, it is software, but the "
              "size is zero, nothing to do (unexpected)",
              GetID(), breakpoint_addr);
-    return Error();
+    return Status();
   }
   // Change the program counter.
   LLDB_LOG(log, "pid {0} tid {1}: changing PC from {2:x} to {3:x}", GetID(),
@@ -440,7 +440,7 @@ Error NativeProcessNetBSD::FixupBreakpoi
   return error;
 }
 
-Error NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) {
+Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
 
@@ -451,10 +451,10 @@ Error NativeProcessNetBSD::Resume(const
   if (action == nullptr) {
     LLDB_LOG(log, "no action specified for pid {0} tid {1}", GetID(),
              thread_sp->GetID());
-    return Error();
+    return Status();
   }
 
-  Error error;
+  Status error;
 
   switch (action->state) {
   case eStateRunning: {
@@ -486,17 +486,17 @@ Error NativeProcessNetBSD::Resume(const
     llvm_unreachable("Unexpected state");
 
   default:
-    return Error("NativeProcessNetBSD::%s (): unexpected state %s specified "
-                 "for pid %" PRIu64 ", tid %" PRIu64,
-                 __FUNCTION__, StateAsCString(action->state), GetID(),
-                 thread_sp->GetID());
+    return Status("NativeProcessNetBSD::%s (): unexpected state %s specified "
+                  "for pid %" PRIu64 ", tid %" PRIu64,
+                  __FUNCTION__, StateAsCString(action->state), GetID(),
+                  thread_sp->GetID());
   }
 
-  return Error();
+  return Status();
 }
 
-Error NativeProcessNetBSD::Halt() {
-  Error error;
+Status NativeProcessNetBSD::Halt() {
+  Status error;
 
   if (kill(GetID(), SIGSTOP) != 0)
     error.SetErrorToErrno();
@@ -504,8 +504,8 @@ Error NativeProcessNetBSD::Halt() {
   return error;
 }
 
-Error NativeProcessNetBSD::Detach() {
-  Error error;
+Status NativeProcessNetBSD::Detach() {
+  Status error;
 
   // Stop monitoring the inferior.
   m_sigchld_handle.reset();
@@ -517,8 +517,8 @@ Error NativeProcessNetBSD::Detach() {
   return PtraceWrapper(PT_DETACH, GetID());
 }
 
-Error NativeProcessNetBSD::Signal(int signo) {
-  Error error;
+Status NativeProcessNetBSD::Signal(int signo) {
+  Status error;
 
   if (kill(GetID(), signo))
     error.SetErrorToErrno();
@@ -526,11 +526,11 @@ Error NativeProcessNetBSD::Signal(int si
   return error;
 }
 
-Error NativeProcessNetBSD::Kill() {
+Status NativeProcessNetBSD::Kill() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
 
-  Error error;
+  Status error;
 
   switch (m_state) {
   case StateType::eStateInvalid:
@@ -562,15 +562,15 @@ Error NativeProcessNetBSD::Kill() {
   return error;
 }
 
-Error NativeProcessNetBSD::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                               MemoryRegionInfo &range_info) {
+Status NativeProcessNetBSD::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                                MemoryRegionInfo &range_info) {
 
   if (m_supports_mem_region == LazyBool::eLazyBoolNo) {
     // We're done.
-    return Error("unsupported");
+    return Status("unsupported");
   }
 
-  Error error = PopulateMemoryRegionCache();
+  Status error = PopulateMemoryRegionCache();
   if (error.Fail()) {
     return error;
   }
@@ -619,14 +619,14 @@ Error NativeProcessNetBSD::GetMemoryRegi
   return error;
 }
 
-Error NativeProcessNetBSD::PopulateMemoryRegionCache() {
+Status NativeProcessNetBSD::PopulateMemoryRegionCache() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   // If our cache is empty, pull the latest.  There should always be at least
   // one memory region if memory region handling is supported.
   if (!m_mem_region_cache.empty()) {
     LLDB_LOG(log, "reusing {0} cached memory region entries",
              m_mem_region_cache.size());
-    return Error();
+    return Status();
   }
 
   struct kinfo_vmentry *vm;
@@ -634,7 +634,7 @@ Error NativeProcessNetBSD::PopulateMemor
   vm = kinfo_getvmmap(GetID(), &count);
   if (vm == NULL) {
     m_supports_mem_region = LazyBool::eLazyBoolNo;
-    Error error;
+    Status error;
     error.SetErrorString("not supported");
     return error;
   }
@@ -674,7 +674,7 @@ Error NativeProcessNetBSD::PopulateMemor
     LLDB_LOG(log, "failed to find any vmmap entries, assuming no support "
                   "for memory region metadata retrieval");
     m_supports_mem_region = LazyBool::eLazyBoolNo;
-    Error error;
+    Status error;
     error.SetErrorString("not supported");
     return error;
   }
@@ -682,16 +682,16 @@ Error NativeProcessNetBSD::PopulateMemor
            m_mem_region_cache.size(), GetID());
   // We support memory retrieval, remember that.
   m_supports_mem_region = LazyBool::eLazyBoolYes;
-  return Error();
+  return Status();
 }
 
-Error NativeProcessNetBSD::AllocateMemory(size_t size, uint32_t permissions,
-                                          lldb::addr_t &addr) {
-  return Error("Unimplemented");
+Status NativeProcessNetBSD::AllocateMemory(size_t size, uint32_t permissions,
+                                           lldb::addr_t &addr) {
+  return Status("Unimplemented");
 }
 
-Error NativeProcessNetBSD::DeallocateMemory(lldb::addr_t addr) {
-  return Error("Unimplemented");
+Status NativeProcessNetBSD::DeallocateMemory(lldb::addr_t addr) {
+  return Status("Unimplemented");
 }
 
 lldb::addr_t NativeProcessNetBSD::GetSharedLibraryInfoAddress() {
@@ -706,15 +706,15 @@ bool NativeProcessNetBSD::GetArchitectur
   return true;
 }
 
-Error NativeProcessNetBSD::SetBreakpoint(lldb::addr_t addr, uint32_t size,
-                                         bool hardware) {
+Status NativeProcessNetBSD::SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                                          bool hardware) {
   if (hardware)
-    return Error("NativeProcessNetBSD does not support hardware breakpoints");
+    return Status("NativeProcessNetBSD does not support hardware breakpoints");
   else
     return SetSoftwareBreakpoint(addr, size);
 }
 
-Error NativeProcessNetBSD::GetSoftwareBreakpointTrapOpcode(
+Status NativeProcessNetBSD::GetSoftwareBreakpointTrapOpcode(
     size_t trap_opcode_size_hint, size_t &actual_opcode_size,
     const uint8_t *&trap_opcode_bytes) {
   static const uint8_t g_i386_opcode[] = {0xCC};
@@ -724,27 +724,27 @@ Error NativeProcessNetBSD::GetSoftwareBr
   case llvm::Triple::x86_64:
     trap_opcode_bytes = g_i386_opcode;
     actual_opcode_size = sizeof(g_i386_opcode);
-    return Error();
+    return Status();
   default:
     assert(false && "CPU type not supported!");
-    return Error("CPU type not supported");
+    return Status("CPU type not supported");
   }
 }
 
-Error NativeProcessNetBSD::GetLoadedModuleFileSpec(const char *module_path,
-                                                   FileSpec &file_spec) {
-  return Error("Unimplemented");
+Status NativeProcessNetBSD::GetLoadedModuleFileSpec(const char *module_path,
+                                                    FileSpec &file_spec) {
+  return Status("Unimplemented");
 }
 
-Error NativeProcessNetBSD::GetFileLoadAddress(const llvm::StringRef &file_name,
-                                              lldb::addr_t &load_addr) {
+Status NativeProcessNetBSD::GetFileLoadAddress(const llvm::StringRef &file_name,
+                                               lldb::addr_t &load_addr) {
   load_addr = LLDB_INVALID_ADDRESS;
-  return Error();
+  return Status();
 }
 
-Error NativeProcessNetBSD::LaunchInferior(MainLoop &mainloop,
-                                          ProcessLaunchInfo &launch_info) {
-  Error error;
+Status NativeProcessNetBSD::LaunchInferior(MainLoop &mainloop,
+                                           ProcessLaunchInfo &launch_info) {
+  Status error;
   m_sigchld_handle = mainloop.RegisterSignal(
       SIGCHLD, [this](MainLoopBase &) { SigchldHandler(); }, error);
   if (!m_sigchld_handle)
@@ -826,7 +826,7 @@ Error NativeProcessNetBSD::LaunchInferio
 }
 
 void NativeProcessNetBSD::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
-                                           Error &error) {
+                                           Status &error) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid = {0:x}", pid);
 
@@ -862,7 +862,7 @@ void NativeProcessNetBSD::SigchldHandler
     if (errno == EINTR)
       return;
 
-    Error error(errno, eErrorTypePOSIX);
+    Status error(errno, eErrorTypePOSIX);
     LLDB_LOG(log, "waitpid ({0}, &status, _) failed: {1}", GetID(), error);
   }
 
@@ -915,7 +915,7 @@ NativeThreadNetBSDSP NativeProcessNetBSD
   return thread_sp;
 }
 
-::pid_t NativeProcessNetBSD::Attach(lldb::pid_t pid, Error &error) {
+::pid_t NativeProcessNetBSD::Attach(lldb::pid_t pid, Status &error) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (pid <= 1) {
@@ -956,8 +956,8 @@ NativeThreadNetBSDSP NativeProcessNetBSD
   return pid;
 }
 
-Error NativeProcessNetBSD::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                      size_t &bytes_read) {
+Status NativeProcessNetBSD::ReadMemory(lldb::addr_t addr, void *buf,
+                                       size_t size, size_t &bytes_read) {
   unsigned char *dst = static_cast<unsigned char *>(buf);
   struct ptrace_io_desc io;
 
@@ -972,7 +972,7 @@ Error NativeProcessNetBSD::ReadMemory(ll
     io.piod_offs = (void *)(addr + bytes_read);
     io.piod_addr = dst + bytes_read;
 
-    Error error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
+    Status error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
     if (error.Fail())
       return error;
 
@@ -980,22 +980,22 @@ Error NativeProcessNetBSD::ReadMemory(ll
     io.piod_len = size - bytes_read;
   } while (bytes_read < size);
 
-  return Error();
+  return Status();
 }
 
-Error NativeProcessNetBSD::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
-                                                 size_t size,
-                                                 size_t &bytes_read) {
-  Error error = ReadMemory(addr, buf, size, bytes_read);
+Status NativeProcessNetBSD::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
+                                                  size_t size,
+                                                  size_t &bytes_read) {
+  Status error = ReadMemory(addr, buf, size, bytes_read);
   if (error.Fail())
     return error;
   return m_breakpoint_list.RemoveTrapsFromBuffer(addr, buf, size);
 }
 
-Error NativeProcessNetBSD::WriteMemory(lldb::addr_t addr, const void *buf,
-                                       size_t size, size_t &bytes_written) {
+Status NativeProcessNetBSD::WriteMemory(lldb::addr_t addr, const void *buf,
+                                        size_t size, size_t &bytes_written) {
   const unsigned char *src = static_cast<const unsigned char *>(buf);
-  Error error;
+  Status error;
   struct ptrace_io_desc io;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_MEMORY));
@@ -1009,7 +1009,7 @@ Error NativeProcessNetBSD::WriteMemory(l
     io.piod_addr = (void *)(src + bytes_written);
     io.piod_offs = (void *)(addr + bytes_written);
 
-    Error error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
+    Status error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
     if (error.Fail())
       return error;
 
@@ -1039,7 +1039,7 @@ NativeProcessNetBSD::GetAuxvData() const
                               .piod_addr = (void *)buf.get()->getBufferStart(),
                               .piod_len = auxv_size};
 
-  Error error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
+  Status error = NativeProcessNetBSD::PtraceWrapper(PT_IO, GetID(), &io);
 
   if (error.Fail())
     return std::error_code(error.GetError(), std::generic_category());
@@ -1050,13 +1050,13 @@ NativeProcessNetBSD::GetAuxvData() const
   return buf;
 }
 
-Error NativeProcessNetBSD::ReinitializeThreads() {
+Status NativeProcessNetBSD::ReinitializeThreads() {
   // Clear old threads
   m_threads.clear();
 
   // Initialize new thread
   struct ptrace_lwpinfo info = {};
-  Error error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
+  Status error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
   if (error.Fail()) {
     return error;
   }

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h Thu May 11 23:51:55 2017
@@ -31,11 +31,11 @@ namespace process_netbsd {
 ///
 /// Changes in the inferior process state are broadcasted.
 class NativeProcessNetBSD : public NativeProcessProtocol {
-  friend Error NativeProcessProtocol::Launch(
+  friend Status NativeProcessProtocol::Launch(
       ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
-  friend Error NativeProcessProtocol::Attach(
+  friend Status NativeProcessProtocol::Attach(
       lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
       MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
 
@@ -43,32 +43,32 @@ public:
   // ---------------------------------------------------------------------
   // NativeProcessProtocol Interface
   // ---------------------------------------------------------------------
-  Error Resume(const ResumeActionList &resume_actions) override;
+  Status Resume(const ResumeActionList &resume_actions) override;
 
-  Error Halt() override;
+  Status Halt() override;
 
-  Error Detach() override;
+  Status Detach() override;
 
-  Error Signal(int signo) override;
+  Status Signal(int signo) override;
 
-  Error Kill() override;
+  Status Kill() override;
 
-  Error GetMemoryRegionInfo(lldb::addr_t load_addr,
-                            MemoryRegionInfo &range_info) override;
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &range_info) override;
 
-  Error ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                   size_t &bytes_read) override;
+  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                    size_t &bytes_read) override;
 
-  Error ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
-                              size_t &bytes_read) override;
+  Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
+                               size_t &bytes_read) override;
 
-  Error WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                    size_t &bytes_written) override;
+  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
+                     size_t &bytes_written) override;
 
-  Error AllocateMemory(size_t size, uint32_t permissions,
-                       lldb::addr_t &addr) override;
+  Status AllocateMemory(size_t size, uint32_t permissions,
+                        lldb::addr_t &addr) override;
 
-  Error DeallocateMemory(lldb::addr_t addr) override;
+  Status DeallocateMemory(lldb::addr_t addr) override;
 
   lldb::addr_t GetSharedLibraryInfoAddress() override;
 
@@ -76,13 +76,14 @@ public:
 
   bool GetArchitecture(ArchSpec &arch) const override;
 
-  Error SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware) override;
+  Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                       bool hardware) override;
 
-  Error GetLoadedModuleFileSpec(const char *module_path,
-                                FileSpec &file_spec) override;
+  Status GetLoadedModuleFileSpec(const char *module_path,
+                                 FileSpec &file_spec) override;
 
-  Error GetFileLoadAddress(const llvm::StringRef &file_name,
-                           lldb::addr_t &load_addr) override;
+  Status GetFileLoadAddress(const llvm::StringRef &file_name,
+                            lldb::addr_t &load_addr) override;
 
   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   GetAuxvData() const override;
@@ -90,15 +91,15 @@ public:
   // ---------------------------------------------------------------------
   // Interface used by NativeRegisterContext-derived classes.
   // ---------------------------------------------------------------------
-  static Error PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
-                             int data = 0, int *result = nullptr);
+  static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
+                              int data = 0, int *result = nullptr);
 
 protected:
   // ---------------------------------------------------------------------
   // NativeProcessProtocol protected interface
   // ---------------------------------------------------------------------
 
-  Error
+  Status
   GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
                                   size_t &actual_opcode_size,
                                   const uint8_t *&trap_opcode_bytes) override;
@@ -116,8 +117,8 @@ private:
 
   NativeThreadNetBSDSP AddThread(lldb::tid_t thread_id);
 
-  Error LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
-  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Error &error);
+  Status LaunchInferior(MainLoop &mainloop, ProcessLaunchInfo &launch_info);
+  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Status &error);
 
   void MonitorCallback(lldb::pid_t pid, int signal);
   void MonitorExited(lldb::pid_t pid, int signal, int status);
@@ -125,14 +126,14 @@ private:
   void MonitorSIGTRAP(lldb::pid_t pid);
   void MonitorSignal(lldb::pid_t pid, int signal);
 
-  Error GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
-  Error FixupBreakpointPCAsNeeded(NativeThreadNetBSD &thread);
-  Error PopulateMemoryRegionCache();
+  Status GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
+  Status FixupBreakpointPCAsNeeded(NativeThreadNetBSD &thread);
+  Status PopulateMemoryRegionCache();
   void SigchldHandler();
 
-  ::pid_t Attach(lldb::pid_t pid, Error &error);
+  ::pid_t Attach(lldb::pid_t pid, Status &error);
 
-  Error ReinitializeThreads();
+  Status ReinitializeThreads();
 };
 
 } // namespace process_netbsd

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp Thu May 11 23:51:55 2017
@@ -25,80 +25,80 @@ NativeRegisterContextNetBSD::NativeRegis
     : NativeRegisterContextRegisterInfo(native_thread, concrete_frame_idx,
                                         reg_info_interface_p) {}
 
-Error NativeRegisterContextNetBSD::ReadGPR() {
+Status NativeRegisterContextNetBSD::ReadGPR() {
   void *buf = GetGPRBuffer();
   if (!buf)
-    return Error("GPR buffer is NULL");
+    return Status("GPR buffer is NULL");
 
   return DoReadGPR(buf);
 }
 
-Error NativeRegisterContextNetBSD::WriteGPR() {
+Status NativeRegisterContextNetBSD::WriteGPR() {
   void *buf = GetGPRBuffer();
   if (!buf)
-    return Error("GPR buffer is NULL");
+    return Status("GPR buffer is NULL");
 
   return DoWriteGPR(buf);
 }
 
-Error NativeRegisterContextNetBSD::ReadFPR() {
+Status NativeRegisterContextNetBSD::ReadFPR() {
   void *buf = GetFPRBuffer();
   if (!buf)
-    return Error("FPR buffer is NULL");
+    return Status("FPR buffer is NULL");
 
   return DoReadFPR(buf);
 }
 
-Error NativeRegisterContextNetBSD::WriteFPR() {
+Status NativeRegisterContextNetBSD::WriteFPR() {
   void *buf = GetFPRBuffer();
   if (!buf)
-    return Error("FPR buffer is NULL");
+    return Status("FPR buffer is NULL");
 
   return DoWriteFPR(buf);
 }
 
-Error NativeRegisterContextNetBSD::ReadDBR() {
+Status NativeRegisterContextNetBSD::ReadDBR() {
   void *buf = GetDBRBuffer();
   if (!buf)
-    return Error("DBR buffer is NULL");
+    return Status("DBR buffer is NULL");
 
   return DoReadDBR(buf);
 }
 
-Error NativeRegisterContextNetBSD::WriteDBR() {
+Status NativeRegisterContextNetBSD::WriteDBR() {
   void *buf = GetDBRBuffer();
   if (!buf)
-    return Error("DBR buffer is NULL");
+    return Status("DBR buffer is NULL");
 
   return DoWriteDBR(buf);
 }
 
-Error NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
+Status NativeRegisterContextNetBSD::DoReadGPR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_GETREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }
 
-Error NativeRegisterContextNetBSD::DoWriteGPR(void *buf) {
+Status NativeRegisterContextNetBSD::DoWriteGPR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_SETREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }
 
-Error NativeRegisterContextNetBSD::DoReadFPR(void *buf) {
+Status NativeRegisterContextNetBSD::DoReadFPR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_GETFPREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }
 
-Error NativeRegisterContextNetBSD::DoWriteFPR(void *buf) {
+Status NativeRegisterContextNetBSD::DoWriteFPR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_SETFPREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }
 
-Error NativeRegisterContextNetBSD::DoReadDBR(void *buf) {
+Status NativeRegisterContextNetBSD::DoReadDBR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_GETDBREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }
 
-Error NativeRegisterContextNetBSD::DoWriteDBR(void *buf) {
+Status NativeRegisterContextNetBSD::DoWriteDBR(void *buf) {
   return NativeProcessNetBSD::PtraceWrapper(PT_SETDBREGS, GetProcessPid(), buf,
                                             m_thread.GetID());
 }

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h Thu May 11 23:51:55 2017
@@ -35,14 +35,14 @@ public:
                                         uint32_t concrete_frame_idx);
 
 protected:
-  virtual Error ReadGPR();
-  virtual Error WriteGPR();
+  virtual Status ReadGPR();
+  virtual Status WriteGPR();
 
-  virtual Error ReadFPR();
-  virtual Error WriteFPR();
+  virtual Status ReadFPR();
+  virtual Status WriteFPR();
 
-  virtual Error ReadDBR();
-  virtual Error WriteDBR();
+  virtual Status ReadDBR();
+  virtual Status WriteDBR();
 
   virtual void *GetGPRBuffer() { return nullptr; }
   virtual size_t GetGPRSize() {
@@ -55,14 +55,14 @@ protected:
   virtual void *GetDBRBuffer() { return nullptr; }
   virtual size_t GetDBRSize() { return 0; }
 
-  virtual Error DoReadGPR(void *buf);
-  virtual Error DoWriteGPR(void *buf);
+  virtual Status DoReadGPR(void *buf);
+  virtual Status DoWriteGPR(void *buf);
 
-  virtual Error DoReadFPR(void *buf);
-  virtual Error DoWriteFPR(void *buf);
+  virtual Status DoReadFPR(void *buf);
+  virtual Status DoWriteFPR(void *buf);
 
-  virtual Error DoReadDBR(void *buf);
-  virtual Error DoWriteDBR(void *buf);
+  virtual Status DoReadDBR(void *buf);
+  virtual Status DoWriteDBR(void *buf);
 
   virtual NativeProcessNetBSD &GetProcess();
   virtual ::pid_t GetProcessPid();

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp Thu May 11 23:51:55 2017
@@ -14,8 +14,8 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h"
 
@@ -251,9 +251,10 @@ int NativeRegisterContextNetBSD_x86_64::
   return -1;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::ReadRegister(
-    const RegisterInfo *reg_info, RegisterValue &reg_value) {
-  Error error;
+Status
+NativeRegisterContextNetBSD_x86_64::ReadRegister(const RegisterInfo *reg_info,
+                                                 RegisterValue &reg_value) {
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -446,10 +447,10 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::WriteRegister(
+Status NativeRegisterContextNetBSD_x86_64::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
 
-  Error error;
+  Status error;
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -645,9 +646,9 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::ReadAllRegisterValues(
+Status NativeRegisterContextNetBSD_x86_64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   if (!data_sp) {
@@ -680,9 +681,9 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::WriteAllRegisterValues(
+Status NativeRegisterContextNetBSD_x86_64::WriteAllRegisterValues(
     const lldb::DataBufferSP &data_sp) {
-  Error error;
+  Status error;
 
   if (!data_sp) {
     error.SetErrorStringWithFormat(
@@ -717,14 +718,14 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::IsWatchpointHit(uint32_t wp_index,
-                                                          bool &is_hit) {
+Status NativeRegisterContextNetBSD_x86_64::IsWatchpointHit(uint32_t wp_index,
+                                                           bool &is_hit) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   RegisterValue reg_value;
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(lldb_dr6_x86_64);
-  Error error = ReadRegister(reg_info, reg_value);
+  Status error = ReadRegister(reg_info, reg_value);
   if (error.Fail()) {
     is_hit = false;
     return error;
@@ -737,12 +738,12 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::GetWatchpointHitIndex(
+Status NativeRegisterContextNetBSD_x86_64::GetWatchpointHitIndex(
     uint32_t &wp_index, lldb::addr_t trap_addr) {
   uint32_t num_hw_wps = NumSupportedHardwareWatchpoints();
   for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) {
     bool is_hit;
-    Error error = IsWatchpointHit(wp_index, is_hit);
+    Status error = IsWatchpointHit(wp_index, is_hit);
     if (error.Fail()) {
       wp_index = LLDB_INVALID_INDEX32;
       return error;
@@ -751,17 +752,17 @@ Error NativeRegisterContextNetBSD_x86_64
     }
   }
   wp_index = LLDB_INVALID_INDEX32;
-  return Error();
+  return Status();
 }
 
-Error NativeRegisterContextNetBSD_x86_64::IsWatchpointVacant(uint32_t wp_index,
-                                                             bool &is_vacant) {
+Status NativeRegisterContextNetBSD_x86_64::IsWatchpointVacant(uint32_t wp_index,
+                                                              bool &is_vacant) {
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   RegisterValue reg_value;
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-  Error error = ReadRegister(reg_info, reg_value);
+  Status error = ReadRegister(reg_info, reg_value);
   if (error.Fail()) {
     is_vacant = false;
     return error;
@@ -774,11 +775,11 @@ Error NativeRegisterContextNetBSD_x86_64
   return error;
 }
 
-Error NativeRegisterContextNetBSD_x86_64::SetHardwareWatchpointWithIndex(
+Status NativeRegisterContextNetBSD_x86_64::SetHardwareWatchpointWithIndex(
     lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) {
 
   if (wp_index >= NumSupportedHardwareWatchpoints())
-    return Error("Watchpoint index out of range");
+    return Status("Watchpoint index out of range");
 
   // Read only watchpoints aren't supported on x86_64. Fall back to read/write
   // waitchpoints instead.
@@ -788,17 +789,17 @@ Error NativeRegisterContextNetBSD_x86_64
     watch_flags = 0x3;
 
   if (watch_flags != 0x1 && watch_flags != 0x3)
-    return Error("Invalid read/write bits for watchpoint");
+    return Status("Invalid read/write bits for watchpoint");
 
   if (size != 1 && size != 2 && size != 4 && size != 8)
-    return Error("Invalid size for watchpoint");
+    return Status("Invalid size for watchpoint");
 
   bool is_vacant;
-  Error error = IsWatchpointVacant(wp_index, is_vacant);
+  Status error = IsWatchpointVacant(wp_index, is_vacant);
   if (error.Fail())
     return error;
   if (!is_vacant)
-    return Error("Watchpoint index not vacant");
+    return Status("Watchpoint index not vacant");
 
   RegisterValue reg_value;
   const RegisterInfo *const reg_info_dr7 =
@@ -851,7 +852,7 @@ bool NativeRegisterContextNetBSD_x86_64:
   // clear bits 0, 1, 2, or 3 of the debug status register (DR6)
   const RegisterInfo *const reg_info_dr6 =
       GetRegisterInfoAtIndex(lldb_dr6_x86_64);
-  Error error = ReadRegister(reg_info_dr6, reg_value);
+  Status error = ReadRegister(reg_info_dr6, reg_value);
   if (error.Fail())
     return false;
   uint64_t bit_mask = 1 << wp_index;
@@ -873,13 +874,13 @@ bool NativeRegisterContextNetBSD_x86_64:
   return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success();
 }
 
-Error NativeRegisterContextNetBSD_x86_64::ClearAllHardwareWatchpoints() {
+Status NativeRegisterContextNetBSD_x86_64::ClearAllHardwareWatchpoints() {
   RegisterValue reg_value;
 
   // clear bits {0-4} of the debug status register (DR6)
   const RegisterInfo *const reg_info_dr6 =
       GetRegisterInfoAtIndex(lldb_dr6_x86_64);
-  Error error = ReadRegister(reg_info_dr6, reg_value);
+  Status error = ReadRegister(reg_info_dr6, reg_value);
   if (error.Fail())
     return error;
   uint64_t bit_mask = 0xF;
@@ -905,7 +906,7 @@ uint32_t NativeRegisterContextNetBSD_x86
   const uint32_t num_hw_watchpoints = NumSupportedHardwareWatchpoints();
   for (uint32_t wp_index = 0; wp_index < num_hw_watchpoints; ++wp_index) {
     bool is_vacant;
-    Error error = IsWatchpointVacant(wp_index, is_vacant);
+    Status error = IsWatchpointVacant(wp_index, is_vacant);
     if (is_vacant) {
       error = SetHardwareWatchpointWithIndex(addr, size, watch_flags, wp_index);
       if (error.Success())

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h Thu May 11 23:51:55 2017
@@ -36,29 +36,30 @@ public:
 
   const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
 
-  Error ReadRegister(const RegisterInfo *reg_info,
-                     RegisterValue &reg_value) override;
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
 
-  Error WriteRegister(const RegisterInfo *reg_info,
-                      const RegisterValue &reg_value) override;
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
 
-  Error ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
 
-  Error WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
-  Error IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
 
-  Error GetWatchpointHitIndex(uint32_t &wp_index,
-                              lldb::addr_t trap_addr) override;
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
 
-  Error IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
-  Error ClearAllHardwareWatchpoints() override;
+  Status ClearAllHardwareWatchpoints() override;
 
-  Error SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
-                                       uint32_t watch_flags, uint32_t wp_index);
+  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags,
+                                        uint32_t wp_index);
 
   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
                                  uint32_t watch_flags) override;

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp Thu May 11 23:51:55 2017
@@ -160,40 +160,40 @@ NativeRegisterContextSP NativeThreadNetB
   return m_reg_context_sp;
 }
 
-Error NativeThreadNetBSD::SetWatchpoint(lldb::addr_t addr, size_t size,
-                                        uint32_t watch_flags, bool hardware) {
+Status NativeThreadNetBSD::SetWatchpoint(lldb::addr_t addr, size_t size,
+                                         uint32_t watch_flags, bool hardware) {
   if (!hardware)
-    return Error("not implemented");
+    return Status("not implemented");
   if (m_state == eStateLaunching)
-    return Error();
-  Error error = RemoveWatchpoint(addr);
+    return Status();
+  Status error = RemoveWatchpoint(addr);
   if (error.Fail())
     return error;
   NativeRegisterContextSP reg_ctx = GetRegisterContext();
   uint32_t wp_index = reg_ctx->SetHardwareWatchpoint(addr, size, watch_flags);
   if (wp_index == LLDB_INVALID_INDEX32)
-    return Error("Setting hardware watchpoint failed.");
+    return Status("Setting hardware watchpoint failed.");
   m_watchpoint_index_map.insert({addr, wp_index});
-  return Error();
+  return Status();
 }
 
-Error NativeThreadNetBSD::RemoveWatchpoint(lldb::addr_t addr) {
+Status NativeThreadNetBSD::RemoveWatchpoint(lldb::addr_t addr) {
   auto wp = m_watchpoint_index_map.find(addr);
   if (wp == m_watchpoint_index_map.end())
-    return Error();
+    return Status();
   uint32_t wp_index = wp->second;
   m_watchpoint_index_map.erase(wp);
   if (GetRegisterContext()->ClearHardwareWatchpoint(wp_index))
-    return Error();
-  return Error("Clearing hardware watchpoint failed.");
+    return Status();
+  return Status("Clearing hardware watchpoint failed.");
 }
 
-Error NativeThreadNetBSD::SetHardwareBreakpoint(lldb::addr_t addr,
-                                                size_t size) {
+Status NativeThreadNetBSD::SetHardwareBreakpoint(lldb::addr_t addr,
+                                                 size_t size) {
   if (m_state == eStateLaunching)
-    return Error();
+    return Status();
 
-  Error error = RemoveHardwareBreakpoint(addr);
+  Status error = RemoveHardwareBreakpoint(addr);
   if (error.Fail())
     return error;
 
@@ -201,22 +201,22 @@ Error NativeThreadNetBSD::SetHardwareBre
   uint32_t bp_index = reg_ctx->SetHardwareBreakpoint(addr, size);
 
   if (bp_index == LLDB_INVALID_INDEX32)
-    return Error("Setting hardware breakpoint failed.");
+    return Status("Setting hardware breakpoint failed.");
 
   m_hw_break_index_map.insert({addr, bp_index});
-  return Error();
+  return Status();
 }
 
-Error NativeThreadNetBSD::RemoveHardwareBreakpoint(lldb::addr_t addr) {
+Status NativeThreadNetBSD::RemoveHardwareBreakpoint(lldb::addr_t addr) {
   auto bp = m_hw_break_index_map.find(addr);
   if (bp == m_hw_break_index_map.end())
-    return Error();
+    return Status();
 
   uint32_t bp_index = bp->second;
   if (GetRegisterContext()->ClearHardwareBreakpoint(bp_index)) {
     m_hw_break_index_map.erase(bp);
-    return Error();
+    return Status();
   }
 
-  return Error("Clearing hardware breakpoint failed.");
+  return Status("Clearing hardware breakpoint failed.");
 }

Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h Thu May 11 23:51:55 2017
@@ -38,14 +38,14 @@ public:
 
   NativeRegisterContextSP GetRegisterContext() override;
 
-  Error SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
-                      bool hardware) override;
+  Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
+                       bool hardware) override;
 
-  Error RemoveWatchpoint(lldb::addr_t addr) override;
+  Status RemoveWatchpoint(lldb::addr_t addr) override;
 
-  Error SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
+  Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
 
-  Error RemoveHardwareBreakpoint(lldb::addr_t addr) override;
+  Status RemoveHardwareBreakpoint(lldb::addr_t addr) override;
 
 private:
   // ---------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Thu May 11 23:51:55 2017
@@ -1055,7 +1055,7 @@ bool RegisterContextLLDB::ReadRegisterVa
   case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
     llvm_unreachable("FIXME debugger inferior function call unwind");
   case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
-    Error error(ReadRegisterValueFromMemory(
+    Status error(ReadRegisterValueFromMemory(
         reg_info, regloc.location.target_memory_location, reg_info->byte_size,
         value));
     success = error.Success();
@@ -1097,7 +1097,7 @@ bool RegisterContextLLDB::WriteRegisterV
   case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
     llvm_unreachable("FIXME debugger inferior function call unwind");
   case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
-    Error error(WriteRegisterValueToMemory(
+    Status error(WriteRegisterValueToMemory(
         reg_info, regloc.location.target_memory_location, reg_info->byte_size,
         value));
     success = error.Success();
@@ -1514,7 +1514,7 @@ RegisterContextLLDB::SavedLocationForReg
                               unwindplan_regloc.GetDWARFExpressionLength());
     dwarfexpr.SetRegisterKind(unwindplan_registerkind);
     Value result;
-    Error error;
+    Status error;
     if (dwarfexpr.Evaluate(&exe_ctx, nullptr, nullptr, this, 0, nullptr,
                            nullptr, result, &error)) {
       addr_t val;
@@ -1769,7 +1769,7 @@ bool RegisterContextLLDB::ReadCFAValueFo
           GetRegisterInfoAtIndex(cfa_reg.GetAsKind(eRegisterKindLLDB));
       RegisterValue reg_value;
       if (reg_info) {
-        Error error = ReadRegisterValueFromMemory(
+        Status error = ReadRegisterValueFromMemory(
             reg_info, cfa_reg_contents, reg_info->byte_size, reg_value);
         if (error.Success()) {
           cfa_value = reg_value.GetAsUInt64();
@@ -1824,7 +1824,7 @@ bool RegisterContextLLDB::ReadCFAValueFo
                               row->GetCFAValue().GetDWARFExpressionLength());
     dwarfexpr.SetRegisterKind(row_register_kind);
     Value result;
-    Error error;
+    Status error;
     if (dwarfexpr.Evaluate(&exe_ctx, nullptr, nullptr, this, 0, nullptr,
                            nullptr, result, &error)) {
       cfa_value = result.GetScalar().ULongLong();

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.cpp Thu May 11 23:51:55 2017
@@ -18,7 +18,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -101,8 +101,8 @@ bool RegisterContextMemory::WriteRegiste
   if (m_reg_data_addr != LLDB_INVALID_ADDRESS) {
     const uint32_t reg_num = reg_info->kinds[eRegisterKindLLDB];
     addr_t reg_addr = m_reg_data_addr + reg_info->byte_offset;
-    Error error(WriteRegisterValueToMemory(reg_info, reg_addr,
-                                           reg_info->byte_size, reg_value));
+    Status error(WriteRegisterValueToMemory(reg_info, reg_addr,
+                                            reg_info->byte_size, reg_value));
     m_reg_valid[reg_num] = false;
     return error.Success();
   }
@@ -113,7 +113,7 @@ bool RegisterContextMemory::ReadAllRegis
   if (m_reg_data_addr != LLDB_INVALID_ADDRESS) {
     ProcessSP process_sp(CalculateProcess());
     if (process_sp) {
-      Error error;
+      Status error;
       if (process_sp->ReadMemory(m_reg_data_addr, data_sp->GetBytes(),
                                  data_sp->GetByteSize(),
                                  error) == data_sp->GetByteSize()) {
@@ -130,7 +130,7 @@ bool RegisterContextMemory::WriteAllRegi
   if (m_reg_data_addr != LLDB_INVALID_ADDRESS) {
     ProcessSP process_sp(CalculateProcess());
     if (process_sp) {
-      Error error;
+      Status error;
       SetAllRegisterValid(false);
       if (process_sp->WriteMemory(m_reg_data_addr, data_sp->GetBytes(),
                                   data_sp->GetByteSize(),

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp Thu May 11 23:51:55 2017
@@ -10,7 +10,7 @@
 #include "lldb/Target/OperatingSystem.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-private.h"
 
 #include "RegisterContextThreadMemory.h"
@@ -194,26 +194,26 @@ bool RegisterContextThreadMemory::Hardwa
   return false;
 }
 
-Error RegisterContextThreadMemory::ReadRegisterValueFromMemory(
+Status RegisterContextThreadMemory::ReadRegisterValueFromMemory(
     const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr,
     uint32_t src_len, RegisterValue &reg_value) {
   UpdateRegisterContext();
   if (m_reg_ctx_sp)
     return m_reg_ctx_sp->ReadRegisterValueFromMemory(reg_info, src_addr,
                                                      src_len, reg_value);
-  Error error;
+  Status error;
   error.SetErrorString("invalid register context");
   return error;
 }
 
-Error RegisterContextThreadMemory::WriteRegisterValueToMemory(
+Status RegisterContextThreadMemory::WriteRegisterValueToMemory(
     const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr,
     uint32_t dst_len, const RegisterValue &reg_value) {
   UpdateRegisterContext();
   if (m_reg_ctx_sp)
     return m_reg_ctx_sp->WriteRegisterValueToMemory(reg_info, dst_addr, dst_len,
                                                     reg_value);
-  Error error;
+  Status error;
   error.SetErrorString("invalid register context");
   return error;
 }

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h Thu May 11 23:51:55 2017
@@ -80,13 +80,13 @@ public:
 
   bool HardwareSingleStep(bool enable) override;
 
-  Error ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
-                                    lldb::addr_t src_addr, uint32_t src_len,
-                                    RegisterValue &reg_value) override;
+  Status ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info,
+                                     lldb::addr_t src_addr, uint32_t src_len,
+                                     RegisterValue &reg_value) override;
 
-  Error WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
-                                   lldb::addr_t dst_addr, uint32_t dst_len,
-                                   const RegisterValue &reg_value) override;
+  Status WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info,
+                                    lldb::addr_t dst_addr, uint32_t dst_len,
+                                    const RegisterValue &reg_value) override;
 
 protected:
   void UpdateRegisterContext();

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp Thu May 11 23:51:55 2017
@@ -105,7 +105,7 @@ size_t UnwindMacOSXFrameBackchain::GetSt
   m_cursors.push_back(cursor);
 
   const size_t k_frame_size = sizeof(frame);
-  Error error;
+  Status error;
   while (frame.fp != 0 && frame.pc != 0 && ((frame.fp & 7) == 0)) {
     // Read both the FP and PC (8 bytes)
     if (process->ReadMemory(frame.fp, &frame.fp, k_frame_size, error) !=
@@ -196,7 +196,7 @@ size_t UnwindMacOSXFrameBackchain::GetSt
   Frame_x86_64 frame = {cursor.fp, cursor.pc};
 
   m_cursors.push_back(cursor);
-  Error error;
+  Status error;
   const size_t k_frame_size = sizeof(frame);
   while (frame.fp != 0 && frame.pc != 0 && ((frame.fp & 7) == 0)) {
     // Read both the FP and PC (16 bytes)

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp Thu May 11 23:51:55 2017
@@ -19,9 +19,9 @@
 #include "lldb/Host/windows/ProcessLauncherWindows.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/Process/Windows/Common/ProcessWindowsLog.h"
 
@@ -60,11 +60,11 @@ DebuggerThread::DebuggerThread(DebugDele
 
 DebuggerThread::~DebuggerThread() { ::CloseHandle(m_debugging_ended_event); }
 
-Error DebuggerThread::DebugLaunch(const ProcessLaunchInfo &launch_info) {
+Status DebuggerThread::DebugLaunch(const ProcessLaunchInfo &launch_info) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   LLDB_LOG(log, "launching '{0}'", launch_info.GetExecutableFile().GetPath());
 
-  Error error;
+  Status error;
   DebugLaunchContext *context = new DebugLaunchContext(this, launch_info);
   HostThread slave_thread(ThreadLauncher::LaunchThread(
       "lldb.plugin.process-windows.slave[?]", DebuggerThreadLaunchRoutine,
@@ -76,12 +76,12 @@ Error DebuggerThread::DebugLaunch(const
   return error;
 }
 
-Error DebuggerThread::DebugAttach(lldb::pid_t pid,
-                                  const ProcessAttachInfo &attach_info) {
+Status DebuggerThread::DebugAttach(lldb::pid_t pid,
+                                   const ProcessAttachInfo &attach_info) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   LLDB_LOG(log, "attaching to '{0}'", pid);
 
-  Error error;
+  Status error;
   DebugAttachContext *context = new DebugAttachContext(this, pid, attach_info);
   HostThread slave_thread(ThreadLauncher::LaunchThread(
       "lldb.plugin.process-windows.slave[?]", DebuggerThreadAttachRoutine,
@@ -120,7 +120,7 @@ lldb::thread_result_t DebuggerThread::De
   LLDB_LOG(log, "preparing to launch '{0}' on background thread.",
            launch_info.GetExecutableFile().GetPath());
 
-  Error error;
+  Status error;
   ProcessLauncherWindows launcher;
   HostProcess process(launcher.LaunchProcess(launch_info, error));
   // If we couldn't create the process, notify waiters immediately.  Otherwise
@@ -152,7 +152,7 @@ lldb::thread_result_t DebuggerThread::De
            pid);
 
   if (!DebugActiveProcess((DWORD)pid)) {
-    Error error(::GetLastError(), eErrorTypeWin32);
+    Status error(::GetLastError(), eErrorTypeWin32);
     m_debug_delegate->OnDebuggerError(error, 0);
     return 0;
   }
@@ -167,8 +167,8 @@ lldb::thread_result_t DebuggerThread::De
   return 0;
 }
 
-Error DebuggerThread::StopDebugging(bool terminate) {
-  Error error;
+Status DebuggerThread::StopDebugging(bool terminate) {
+  Status error;
 
   lldb::pid_t pid = m_process.GetProcessId();
 
@@ -515,7 +515,7 @@ DebuggerThread::HandleRipEvent(const RIP
   LLDB_LOG(log, "encountered error {0} (type={1}) in process {2} thread {3}",
            info.dwError, info.dwType, m_process.GetProcessId(), thread_id);
 
-  Error error(info.dwError, eErrorTypeWin32);
+  Status error(info.dwError, eErrorTypeWin32);
   m_debug_delegate->OnDebuggerError(error, info.dwType);
 
   return DBG_CONTINUE;

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.h Thu May 11 23:51:55 2017
@@ -32,8 +32,8 @@ public:
   DebuggerThread(DebugDelegateSP debug_delegate);
   virtual ~DebuggerThread();
 
-  Error DebugLaunch(const ProcessLaunchInfo &launch_info);
-  Error DebugAttach(lldb::pid_t pid, const ProcessAttachInfo &attach_info);
+  Status DebugLaunch(const ProcessLaunchInfo &launch_info);
+  Status DebugAttach(lldb::pid_t pid, const ProcessAttachInfo &attach_info);
 
   HostProcess GetProcess() const { return m_process; }
   HostThread GetMainThread() const { return m_main_thread; }
@@ -41,7 +41,7 @@ public:
     return m_active_exception;
   }
 
-  Error StopDebugging(bool terminate);
+  Status StopDebugging(bool terminate);
 
   void ContinueAsyncException(ExceptionResult result);
 

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/IDebugDelegate.h Thu May 11 23:51:55 2017
@@ -16,7 +16,7 @@
 #include <string>
 
 namespace lldb_private {
-class Error;
+class Status;
 class HostThread;
 
 //----------------------------------------------------------------------
@@ -39,7 +39,7 @@ public:
                          lldb::addr_t module_addr) = 0;
   virtual void OnUnloadDll(lldb::addr_t module_addr) = 0;
   virtual void OnDebugString(const std::string &string) = 0;
-  virtual void OnDebuggerError(const Error &error, uint32_t type) = 0;
+  virtual void OnDebuggerError(const Status &error, uint32_t type) = 0;
 };
 }
 

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.cpp Thu May 11 23:51:55 2017
@@ -62,7 +62,7 @@ void LocalDebugDelegate::OnDebugString(c
     process->OnDebugString(string);
 }
 
-void LocalDebugDelegate::OnDebuggerError(const Error &error, uint32_t type) {
+void LocalDebugDelegate::OnDebuggerError(const Status &error, uint32_t type) {
   if (ProcessWindowsSP process = GetProcessPointer())
     process->OnDebuggerError(error, type);
 }

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/LocalDebugDelegate.h Thu May 11 23:51:55 2017
@@ -55,7 +55,7 @@ public:
                  lldb::addr_t module_addr) override;
   void OnUnloadDll(lldb::addr_t module_addr) override;
   void OnDebugString(const std::string &message) override;
-  void OnDebuggerError(const Error &error, uint32_t type) override;
+  void OnDebuggerError(const Status &error, uint32_t type) override;
 
 private:
   ProcessWindowsSP GetProcessPointer();

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp Thu May 11 23:51:55 2017
@@ -87,7 +87,7 @@ public:
 
   ~ProcessWindowsData() { ::CloseHandle(m_initial_stop_event); }
 
-  Error m_launch_error;
+  Status m_launch_error;
   DebuggerThreadSP m_debugger;
   StopInfoSP m_pending_stop_info;
   HANDLE m_initial_stop_event = nullptr;
@@ -132,18 +132,18 @@ ProcessWindows::ProcessWindows(lldb::Tar
 
 ProcessWindows::~ProcessWindows() {}
 
-size_t ProcessWindows::GetSTDOUT(char *buf, size_t buf_size, Error &error) {
+size_t ProcessWindows::GetSTDOUT(char *buf, size_t buf_size, Status &error) {
   error.SetErrorString("GetSTDOUT unsupported on Windows");
   return 0;
 }
 
-size_t ProcessWindows::GetSTDERR(char *buf, size_t buf_size, Error &error) {
+size_t ProcessWindows::GetSTDERR(char *buf, size_t buf_size, Status &error) {
   error.SetErrorString("GetSTDERR unsupported on Windows");
   return 0;
 }
 
 size_t ProcessWindows::PutSTDIN(const char *buf, size_t buf_size,
-                                Error &error) {
+                                Status &error) {
   error.SetErrorString("PutSTDIN unsupported on Windows");
   return 0;
 }
@@ -157,30 +157,30 @@ lldb_private::ConstString ProcessWindows
 
 uint32_t ProcessWindows::GetPluginVersion() { return 1; }
 
-Error ProcessWindows::EnableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessWindows::EnableBreakpointSite(BreakpointSite *bp_site) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_BREAKPOINTS);
   LLDB_LOG(log, "bp_site = {0:x}, id={1}, addr={2:x}", bp_site,
            bp_site->GetID(), bp_site->GetLoadAddress());
 
-  Error error = EnableSoftwareBreakpoint(bp_site);
+  Status error = EnableSoftwareBreakpoint(bp_site);
   if (!error.Success())
     LLDB_LOG(log, "error: {0}", error);
   return error;
 }
 
-Error ProcessWindows::DisableBreakpointSite(BreakpointSite *bp_site) {
+Status ProcessWindows::DisableBreakpointSite(BreakpointSite *bp_site) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_BREAKPOINTS);
   LLDB_LOG(log, "bp_site = {0:x}, id={1}, addr={2:x}", bp_site,
            bp_site->GetID(), bp_site->GetLoadAddress());
 
-  Error error = DisableSoftwareBreakpoint(bp_site);
+  Status error = DisableSoftwareBreakpoint(bp_site);
 
   if (!error.Success())
     LLDB_LOG(log, "error: {0}", error);
   return error;
 }
 
-Error ProcessWindows::DoDetach(bool keep_stopped) {
+Status ProcessWindows::DoDetach(bool keep_stopped) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   DebuggerThreadSP debugger_thread;
   StateType private_state;
@@ -196,13 +196,13 @@ Error ProcessWindows::DoDetach(bool keep
     if (!m_session_data) {
       LLDB_LOG(log, "state = {0}, but there is no active session.",
                private_state);
-      return Error();
+      return Status();
     }
 
     debugger_thread = m_session_data->m_debugger;
   }
 
-  Error error;
+  Status error;
   if (private_state != eStateExited && private_state != eStateDetached) {
     LLDB_LOG(log, "detaching from process {0} while state = {1}.",
              debugger_thread->GetProcess().GetNativeProcess().GetSystemHandle(),
@@ -226,8 +226,8 @@ Error ProcessWindows::DoDetach(bool keep
   return error;
 }
 
-Error ProcessWindows::DoLaunch(Module *exe_module,
-                               ProcessLaunchInfo &launch_info) {
+Status ProcessWindows::DoLaunch(Module *exe_module,
+                                ProcessLaunchInfo &launch_info) {
   // Even though m_session_data is accessed here, it is before a debugger thread
   // has been
   // kicked off.  So there's no race conditions, and it shouldn't be necessary
@@ -235,7 +235,7 @@ Error ProcessWindows::DoLaunch(Module *e
   // the mutex.
 
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
-  Error result;
+  Status result;
   if (!launch_info.GetFlags().Test(eLaunchFlagDebug)) {
     StreamString stream;
     stream.Printf("ProcessWindows unable to launch '%s'.  ProcessWindows can "
@@ -265,7 +265,7 @@ Error ProcessWindows::DoLaunch(Module *e
   }
 
   HostProcess process;
-  Error error = WaitForDebuggerConnection(debugger, process);
+  Status error = WaitForDebuggerConnection(debugger, process);
   if (error.Fail()) {
     LLDB_LOG(log, "failed launching '{0}'. {1}",
              launch_info.GetExecutableFile().GetPath(), error);
@@ -288,8 +288,9 @@ Error ProcessWindows::DoLaunch(Module *e
   return result;
 }
 
-Error ProcessWindows::DoAttachToProcessWithID(
-    lldb::pid_t pid, const ProcessAttachInfo &attach_info) {
+Status
+ProcessWindows::DoAttachToProcessWithID(lldb::pid_t pid,
+                                        const ProcessAttachInfo &attach_info) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   m_session_data.reset(
       new ProcessWindowsData(!attach_info.GetContinueOnceAttached()));
@@ -300,7 +301,7 @@ Error ProcessWindows::DoAttachToProcessW
   m_session_data->m_debugger = debugger;
 
   DWORD process_id = static_cast<DWORD>(pid);
-  Error error = debugger->DebugAttach(process_id, attach_info);
+  Status error = debugger->DebugAttach(process_id, attach_info);
   if (error.Fail()) {
     LLDB_LOG(
         log,
@@ -331,10 +332,10 @@ Error ProcessWindows::DoAttachToProcessW
   return error;
 }
 
-Error ProcessWindows::DoResume() {
+Status ProcessWindows::DoResume() {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   llvm::sys::ScopedLock lock(m_mutex);
-  Error error;
+  Status error;
 
   StateType private_state = GetPrivateState();
   if (private_state == eStateStopped || private_state == eStateCrashed) {
@@ -369,7 +370,7 @@ Error ProcessWindows::DoResume() {
   return error;
 }
 
-Error ProcessWindows::DoDestroy() {
+Status ProcessWindows::DoDestroy() {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
   DebuggerThreadSP debugger_thread;
   StateType private_state;
@@ -386,13 +387,13 @@ Error ProcessWindows::DoDestroy() {
     if (!m_session_data) {
       LLDB_LOG(log, "warning: state = {0}, but there is no active session.",
                private_state);
-      return Error();
+      return Status();
     }
 
     debugger_thread = m_session_data->m_debugger;
   }
 
-  Error error;
+  Status error;
   if (private_state != eStateExited && private_state != eStateDetached) {
     LLDB_LOG(log, "Shutting down process {0} while state = {1}.",
              debugger_thread->GetProcess().GetNativeProcess().GetSystemHandle(),
@@ -411,9 +412,9 @@ Error ProcessWindows::DoDestroy() {
   return error;
 }
 
-Error ProcessWindows::DoHalt(bool &caused_stop) {
+Status ProcessWindows::DoHalt(bool &caused_stop) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
-  Error error;
+  Status error;
   StateType state = GetPrivateState();
   if (state == eStateStopped)
     caused_stop = false;
@@ -623,7 +624,7 @@ bool ProcessWindows::IsAlive() {
 }
 
 size_t ProcessWindows::DoReadMemory(lldb::addr_t vm_addr, void *buf,
-                                    size_t size, Error &error) {
+                                    size_t size, Status &error) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_MEMORY);
   llvm::sys::ScopedLock lock(m_mutex);
 
@@ -645,7 +646,7 @@ size_t ProcessWindows::DoReadMemory(lldb
 }
 
 size_t ProcessWindows::DoWriteMemory(lldb::addr_t vm_addr, const void *buf,
-                                     size_t size, Error &error) {
+                                     size_t size, Status &error) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_MEMORY);
   llvm::sys::ScopedLock lock(m_mutex);
   LLDB_LOG(log, "attempting to write {0} bytes into address {1:x}", size,
@@ -669,10 +670,10 @@ size_t ProcessWindows::DoWriteMemory(lld
   return bytes_written;
 }
 
-Error ProcessWindows::GetMemoryRegionInfo(lldb::addr_t vm_addr,
-                                          MemoryRegionInfo &info) {
+Status ProcessWindows::GetMemoryRegionInfo(lldb::addr_t vm_addr,
+                                           MemoryRegionInfo &info) {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_MEMORY);
-  Error error;
+  Status error;
   llvm::sys::ScopedLock lock(m_mutex);
   info.Clear();
 
@@ -807,7 +808,7 @@ void ProcessWindows::OnDebuggerConnected
 
     FileSpec executable_file(file_name, true);
     ModuleSpec module_spec(executable_file);
-    Error error;
+    Status error;
     module = GetTarget().GetSharedModule(module_spec, &error);
     if (!module) {
       return;
@@ -931,7 +932,7 @@ void ProcessWindows::OnLoadDll(const Mod
   // GetSharedModule() with
   // a new module will add it to the module list and return a corresponding
   // ModuleSP.
-  Error error;
+  Status error;
   ModuleSP module = GetTarget().GetSharedModule(module_spec, &error);
   bool load_addr_changed = false;
   module->SetLoadAddress(GetTarget(), module_addr, false, load_addr_changed);
@@ -955,7 +956,7 @@ void ProcessWindows::OnUnloadDll(lldb::a
 
 void ProcessWindows::OnDebugString(const std::string &string) {}
 
-void ProcessWindows::OnDebuggerError(const Error &error, uint32_t type) {
+void ProcessWindows::OnDebuggerError(const Status &error, uint32_t type) {
   llvm::sys::ScopedLock lock(m_mutex);
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
 
@@ -981,9 +982,9 @@ void ProcessWindows::OnDebuggerError(con
   }
 }
 
-Error ProcessWindows::WaitForDebuggerConnection(DebuggerThreadSP debugger,
-                                                HostProcess &process) {
-  Error result;
+Status ProcessWindows::WaitForDebuggerConnection(DebuggerThreadSP debugger,
+                                                 HostProcess &process) {
+  Status result;
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS |
                                             WINDOWS_LOG_BREAKPOINTS);
   LLDB_LOG(log, "Waiting for loader breakpoint.");
@@ -996,7 +997,7 @@ Error ProcessWindows::WaitForDebuggerCon
     process = debugger->GetProcess();
     return m_session_data->m_launch_error;
   } else
-    return Error(::GetLastError(), eErrorTypeWin32);
+    return Status(::GetLastError(), eErrorTypeWin32);
 }
 
 // The Windows page protection bits are NOT independent masks that can be

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.h Thu May 11 23:51:55 2017
@@ -12,7 +12,7 @@
 
 // Other libraries and framework includes
 #include "lldb/Target/Process.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-forward.h"
 
 #include "llvm/Support/Mutex.h"
@@ -48,25 +48,25 @@ public:
 
   ~ProcessWindows();
 
-  size_t GetSTDOUT(char *buf, size_t buf_size, Error &error) override;
-  size_t GetSTDERR(char *buf, size_t buf_size, Error &error) override;
-  size_t PutSTDIN(const char *buf, size_t buf_size, Error &error) override;
+  size_t GetSTDOUT(char *buf, size_t buf_size, Status &error) override;
+  size_t GetSTDERR(char *buf, size_t buf_size, Status &error) override;
+  size_t PutSTDIN(const char *buf, size_t buf_size, Status &error) override;
 
   // lldb_private::Process overrides
   ConstString GetPluginName() override;
   uint32_t GetPluginVersion() override;
 
-  Error EnableBreakpointSite(BreakpointSite *bp_site) override;
-  Error DisableBreakpointSite(BreakpointSite *bp_site) override;
+  Status EnableBreakpointSite(BreakpointSite *bp_site) override;
+  Status DisableBreakpointSite(BreakpointSite *bp_site) override;
 
-  Error DoDetach(bool keep_stopped) override;
-  Error DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
-  Error DoAttachToProcessWithID(
+  Status DoDetach(bool keep_stopped) override;
+  Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
+  Status DoAttachToProcessWithID(
       lldb::pid_t pid,
       const lldb_private::ProcessAttachInfo &attach_info) override;
-  Error DoResume() override;
-  Error DoDestroy() override;
-  Error DoHalt(bool &caused_stop) override;
+  Status DoResume() override;
+  Status DoDestroy() override;
+  Status DoHalt(bool &caused_stop) override;
 
   void DidLaunch() override;
   void DidAttach(lldb_private::ArchSpec &arch_spec) override;
@@ -81,11 +81,11 @@ public:
   bool IsAlive() override;
 
   size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
-                      Error &error) override;
+                      Status &error) override;
   size_t DoWriteMemory(lldb::addr_t vm_addr, const void *buf, size_t size,
-                       Error &error) override;
-  Error GetMemoryRegionInfo(lldb::addr_t vm_addr,
-                            MemoryRegionInfo &info) override;
+                       Status &error) override;
+  Status GetMemoryRegionInfo(lldb::addr_t vm_addr,
+                             MemoryRegionInfo &info) override;
 
   lldb::addr_t GetImageInfoAddress() override;
 
@@ -100,11 +100,11 @@ public:
                  lldb::addr_t module_addr) override;
   void OnUnloadDll(lldb::addr_t module_addr) override;
   void OnDebugString(const std::string &string) override;
-  void OnDebuggerError(const Error &error, uint32_t type) override;
+  void OnDebuggerError(const Status &error, uint32_t type) override;
 
 private:
-  Error WaitForDebuggerConnection(DebuggerThreadSP debugger,
-                                  HostProcess &process);
+  Status WaitForDebuggerConnection(DebuggerThreadSP debugger,
+                                   HostProcess &process);
 
   // These decode the page protection bits.
   static bool IsPageReadable(uint32_t protect);

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp Thu May 11 23:51:55 2017
@@ -10,7 +10,7 @@
 #include "lldb/Host/windows/HostThreadWindows.h"
 #include "lldb/Host/windows/windows.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-private-types.h"
 
 #include "ProcessWindowsLog.h"

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp Thu May 11 23:51:55 2017
@@ -10,7 +10,7 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/windows/HostThreadWindows.h"
 #include "lldb/Host/windows/windows.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-private-types.h"
 
 #include "RegisterContextWindows_x64.h"

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp Thu May 11 23:51:55 2017
@@ -10,7 +10,7 @@
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/windows/HostThreadWindows.h"
 #include "lldb/Host/windows/windows.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-private-types.h"
 
 #include "ProcessWindowsLog.h"

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Thu May 11 23:51:55 2017
@@ -84,8 +84,8 @@ bool ProcessElfCore::CanDebug(lldb::Targ
   // For now we are just making sure the file exists for a given module
   if (!m_core_module_sp && m_core_file.Exists()) {
     ModuleSpec core_module_spec(m_core_file, target_sp->GetArchitecture());
-    Error error(ModuleList::GetSharedModule(core_module_spec, m_core_module_sp,
-                                            NULL, NULL, NULL));
+    Status error(ModuleList::GetSharedModule(core_module_spec, m_core_module_sp,
+                                             NULL, NULL, NULL));
     if (m_core_module_sp) {
       ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
       if (core_objfile && core_objfile->GetType() == ObjectFile::eTypeCoreFile)
@@ -157,8 +157,8 @@ lldb::addr_t ProcessElfCore::AddAddressR
 //----------------------------------------------------------------------
 // Process Control
 //----------------------------------------------------------------------
-Error ProcessElfCore::DoLoadCore() {
-  Error error;
+Status ProcessElfCore::DoLoadCore() {
+  Status error;
   if (!m_core_module_sp) {
     error.SetErrorString("invalid core module");
     return error;
@@ -289,7 +289,7 @@ bool ProcessElfCore::UpdateThreadList(Th
 
 void ProcessElfCore::RefreshStateAfterStop() {}
 
-Error ProcessElfCore::DoDestroy() { return Error(); }
+Status ProcessElfCore::DoDestroy() { return Status(); }
 
 //------------------------------------------------------------------
 // Process Queries
@@ -301,14 +301,14 @@ bool ProcessElfCore::IsAlive() { return
 // Process Memory
 //------------------------------------------------------------------
 size_t ProcessElfCore::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                  Error &error) {
+                                  Status &error) {
   // Don't allow the caching that lldb_private::Process::ReadMemory does
   // since in core files we have it all cached our our core file anyway.
   return DoReadMemory(addr, buf, size, error);
 }
 
-Error ProcessElfCore::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                          MemoryRegionInfo &region_info) {
+Status ProcessElfCore::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                           MemoryRegionInfo &region_info) {
   region_info.Clear();
   const VMRangeToPermissions::Entry *permission_entry =
       m_core_range_infos.FindEntryThatContainsOrFollows(load_addr);
@@ -335,7 +335,7 @@ Error ProcessElfCore::GetMemoryRegionInf
       region_info.SetExecutable(MemoryRegionInfo::eNo);
       region_info.SetMapped(MemoryRegionInfo::eNo);
     }
-    return Error();
+    return Status();
   }
 
   region_info.GetRange().SetRangeBase(load_addr);
@@ -344,11 +344,11 @@ Error ProcessElfCore::GetMemoryRegionInf
   region_info.SetWritable(MemoryRegionInfo::eNo);
   region_info.SetExecutable(MemoryRegionInfo::eNo);
   region_info.SetMapped(MemoryRegionInfo::eNo);
-  return Error();
+  return Status();
 }
 
 size_t ProcessElfCore::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                    Error &error) {
+                                    Status &error) {
   ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
 
   if (core_objfile == NULL)
@@ -540,7 +540,7 @@ static void ParseOpenBSDProcInfo(ThreadD
 ///        new thread when it finds NT_PRSTATUS or NT_PRPSINFO NOTE entry.
 ///    For case (b) there may be either one NT_PRPSINFO per thread, or a single
 ///    one that applies to all threads (depending on the platform type).
-Error ProcessElfCore::ParseThreadContextsFromNoteSegment(
+Status ProcessElfCore::ParseThreadContextsFromNoteSegment(
     const elf::ELFProgramHeader *segment_header, DataExtractor segment_data) {
   assert(segment_header && segment_header->p_type == llvm::ELF::PT_NOTE);
 
@@ -555,7 +555,7 @@ Error ProcessElfCore::ParseThreadContext
   ELFLinuxSigInfo siginfo;
   size_t header_size;
   size_t len;
-  Error error;
+  Status error;
 
   // Loop through the NOTE entires in the segment
   while (offset < segment_header->p_filesz) {

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h Thu May 11 23:51:55 2017
@@ -26,7 +26,7 @@
 // Project includes
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "Plugins/ObjectFile/ELF/ELFHeader.h"
 
@@ -66,7 +66,7 @@ public:
   //------------------------------------------------------------------
   // Creating a new process, or attaching to an existing one
   //------------------------------------------------------------------
-  lldb_private::Error DoLoadCore() override;
+  lldb_private::Status DoLoadCore() override;
 
   lldb_private::DynamicLoader *GetDynamicLoader() override;
 
@@ -80,7 +80,7 @@ public:
   //------------------------------------------------------------------
   // Process Control
   //------------------------------------------------------------------
-  lldb_private::Error DoDestroy() override;
+  lldb_private::Status DoDestroy() override;
 
   void RefreshStateAfterStop() override;
 
@@ -93,12 +93,12 @@ public:
   // Process Memory
   //------------------------------------------------------------------
   size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                    lldb_private::Error &error) override;
+                    lldb_private::Status &error) override;
 
   size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                      lldb_private::Error &error) override;
+                      lldb_private::Status &error) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetMemoryRegionInfo(lldb::addr_t load_addr,
                       lldb_private::MemoryRegionInfo &region_info) override;
 
@@ -160,7 +160,7 @@ private:
   std::vector<NT_FILE_Entry> m_nt_file_entries;
 
   // Parse thread(s) data structures(prstatus, prpsinfo) from given NOTE segment
-  lldb_private::Error ParseThreadContextsFromNoteSegment(
+  lldb_private::Status ParseThreadContextsFromNoteSegment(
       const elf::ELFProgramHeader *segment_header,
       lldb_private::DataExtractor segment_data);
 

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp Thu May 11 23:51:55 2017
@@ -71,7 +71,7 @@ bool RegisterContextCorePOSIX_x86_64::Re
     return false;
   }
 
-  Error error;
+  Status error;
   value.SetFromMemoryData(reg_info, src + offset, reg_info->byte_size,
                           lldb::eByteOrderLittle, error);
 

Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp Thu May 11 23:51:55 2017
@@ -274,8 +274,8 @@ size_t ELFLinuxPrStatus::GetSize(lldb_pr
   }
 }
 
-Error ELFLinuxPrStatus::Parse(DataExtractor &data, ArchSpec &arch) {
-  Error error;
+Status ELFLinuxPrStatus::Parse(DataExtractor &data, ArchSpec &arch) {
+  Status error;
   if (GetSize(arch) > data.GetByteSize()) {
     error.SetErrorStringWithFormat(
         "NT_PRSTATUS size should be %zu, but the remaining bytes are: %" PRIu64,
@@ -344,8 +344,8 @@ size_t ELFLinuxPrPsInfo::GetSize(lldb_pr
   }
 }
 
-Error ELFLinuxPrPsInfo::Parse(DataExtractor &data, ArchSpec &arch) {
-  Error error;
+Status ELFLinuxPrPsInfo::Parse(DataExtractor &data, ArchSpec &arch) {
+  Status error;
   ByteOrder byteorder = data.GetByteOrder();
   if (GetSize(arch) > data.GetByteSize()) {
     error.SetErrorStringWithFormat(
@@ -413,8 +413,8 @@ size_t ELFLinuxSigInfo::GetSize(const ll
   }
 }
 
-Error ELFLinuxSigInfo::Parse(DataExtractor &data, const ArchSpec &arch) {
-  Error error;
+Status ELFLinuxSigInfo::Parse(DataExtractor &data, const ArchSpec &arch) {
+  Status error;
   if (GetSize(arch) > data.GetByteSize()) {
     error.SetErrorStringWithFormat(
         "NT_SIGINFO size should be %zu, but the remaining bytes are: %" PRIu64,

Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h Thu May 11 23:51:55 2017
@@ -57,8 +57,8 @@ struct ELFLinuxPrStatus {
 
   ELFLinuxPrStatus();
 
-  lldb_private::Error Parse(lldb_private::DataExtractor &data,
-                            lldb_private::ArchSpec &arch);
+  lldb_private::Status Parse(lldb_private::DataExtractor &data,
+                             lldb_private::ArchSpec &arch);
 
   // Return the bytesize of the structure
   // 64 bit - just sizeof
@@ -78,8 +78,8 @@ struct ELFLinuxSigInfo {
 
   ELFLinuxSigInfo();
 
-  lldb_private::Error Parse(lldb_private::DataExtractor &data,
-                            const lldb_private::ArchSpec &arch);
+  lldb_private::Status Parse(lldb_private::DataExtractor &data,
+                             const lldb_private::ArchSpec &arch);
 
   // Return the bytesize of the structure
   // 64 bit - just sizeof
@@ -113,8 +113,8 @@ struct ELFLinuxPrPsInfo {
 
   ELFLinuxPrPsInfo();
 
-  lldb_private::Error Parse(lldb_private::DataExtractor &data,
-                            lldb_private::ArchSpec &arch);
+  lldb_private::Status Parse(lldb_private::DataExtractor &data,
+                             lldb_private::ArchSpec &arch);
 
   // Return the bytesize of the structure
   // 64 bit - just sizeof

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu May 11 23:51:55 2017
@@ -319,7 +319,7 @@ GDBRemoteCommunication::WaitForPacketNoL
                                             Timeout<std::micro> timeout,
                                             bool sync_on_timeout) {
   uint8_t buffer[8192];
-  Error error;
+  Status error;
 
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PACKETS));
 
@@ -933,9 +933,9 @@ GDBRemoteCommunication::CheckForPacket(c
   return GDBRemoteCommunication::PacketType::Invalid;
 }
 
-Error GDBRemoteCommunication::StartListenThread(const char *hostname,
-                                                uint16_t port) {
-  Error error;
+Status GDBRemoteCommunication::StartListenThread(const char *hostname,
+                                                 uint16_t port) {
+  Status error;
   if (m_listen_thread.IsJoinable()) {
     error.SetErrorString("listen thread already running");
   } else {
@@ -962,7 +962,7 @@ bool GDBRemoteCommunication::JoinListenT
 lldb::thread_result_t
 GDBRemoteCommunication::ListenThread(lldb::thread_arg_t arg) {
   GDBRemoteCommunication *comm = (GDBRemoteCommunication *)arg;
-  Error error;
+  Status error;
   ConnectionFileDescriptor *connection =
       (ConnectionFileDescriptor *)comm->GetConnection();
 
@@ -975,7 +975,7 @@ GDBRemoteCommunication::ListenThread(lld
   return NULL;
 }
 
-Error GDBRemoteCommunication::StartDebugserverProcess(
+Status GDBRemoteCommunication::StartDebugserverProcess(
     const char *url, Platform *platform, ProcessLaunchInfo &launch_info,
     uint16_t *port, const Args *inferior_args, int pass_comm_fd) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
@@ -984,7 +984,7 @@ Error GDBRemoteCommunication::StartDebug
                 __FUNCTION__, url ? url : "<empty>",
                 port ? *port : uint16_t(0));
 
-  Error error;
+  Status error;
   // If we locate debugserver, keep that located version around
   static FileSpec g_debugserver_file_spec;
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Thu May 11 23:51:55 2017
@@ -65,9 +65,9 @@ public:
 
   enum class PacketResult {
     Success = 0,        // Success
-    ErrorSendFailed,    // Error sending the packet
+    ErrorSendFailed,    // Status sending the packet
     ErrorSendAck,       // Didn't get an ack back after sending a packet
-    ErrorReplyFailed,   // Error getting the reply
+    ErrorReplyFailed,   // Status getting the reply
     ErrorReplyTimeout,  // Timed out waiting for reply
     ErrorReplyInvalid,  // Got a reply but it wasn't valid for the packet that
                         // was sent
@@ -131,7 +131,7 @@ public:
   // Start a debugserver instance on the current host using the
   // supplied connection URL.
   //------------------------------------------------------------------
-  Error StartDebugserverProcess(
+  Status StartDebugserverProcess(
       const char *url,
       Platform *platform, // If non nullptr, then check with the platform for
                           // the GDB server binary if it can't be located
@@ -255,8 +255,8 @@ protected:
   // on m_bytes.  The checksum was for the compressed packet.
   bool DecompressPacket();
 
-  Error StartListenThread(const char *hostname = "127.0.0.1",
-                          uint16_t port = 0);
+  Status StartListenThread(const char *hostname = "127.0.0.1",
+                           uint16_t port = 0);
 
   bool JoinListenThread();
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu May 11 23:51:55 2017
@@ -113,7 +113,7 @@ GDBRemoteCommunicationClient::~GDBRemote
     Disconnect();
 }
 
-bool GDBRemoteCommunicationClient::HandshakeWithServer(Error *error_ptr) {
+bool GDBRemoteCommunicationClient::HandshakeWithServer(Status *error_ptr) {
   ResetDiscoverableSettings(false);
 
   // Start the read thread after we send the handshake ack since if we
@@ -1394,8 +1394,8 @@ bool GDBRemoteCommunicationClient::Deall
   return false;
 }
 
-Error GDBRemoteCommunicationClient::Detach(bool keep_stopped) {
-  Error error;
+Status GDBRemoteCommunicationClient::Detach(bool keep_stopped) {
+  Status error;
 
   if (keep_stopped) {
     if (m_supports_detach_stay_stopped == eLazyBoolCalculate) {
@@ -1434,9 +1434,9 @@ Error GDBRemoteCommunicationClient::Deta
   return error;
 }
 
-Error GDBRemoteCommunicationClient::GetMemoryRegionInfo(
+Status GDBRemoteCommunicationClient::GetMemoryRegionInfo(
     lldb::addr_t addr, lldb_private::MemoryRegionInfo &region_info) {
-  Error error;
+  Status error;
   region_info.Clear();
 
   if (m_supports_memory_region_info != eLazyBoolNo) {
@@ -1529,8 +1529,8 @@ Error GDBRemoteCommunicationClient::GetM
   return error;
 }
 
-Error GDBRemoteCommunicationClient::GetWatchpointSupportInfo(uint32_t &num) {
-  Error error;
+Status GDBRemoteCommunicationClient::GetWatchpointSupportInfo(uint32_t &num) {
+  Status error;
 
   if (m_supports_watchpoint_support_info == eLazyBoolYes) {
     num = m_num_supported_hardware_watchpoints;
@@ -1568,18 +1568,18 @@ Error GDBRemoteCommunicationClient::GetW
   return error;
 }
 
-lldb_private::Error GDBRemoteCommunicationClient::GetWatchpointSupportInfo(
+lldb_private::Status GDBRemoteCommunicationClient::GetWatchpointSupportInfo(
     uint32_t &num, bool &after, const ArchSpec &arch) {
-  Error error(GetWatchpointSupportInfo(num));
+  Status error(GetWatchpointSupportInfo(num));
   if (error.Success())
     error = GetWatchpointsTriggerAfterInstruction(after, arch);
   return error;
 }
 
-lldb_private::Error
+lldb_private::Status
 GDBRemoteCommunicationClient::GetWatchpointsTriggerAfterInstruction(
     bool &after, const ArchSpec &arch) {
-  Error error;
+  Status error;
   llvm::Triple::ArchType atype = arch.GetMachine();
 
   // we assume watchpoints will happen after running the relevant opcode
@@ -2539,7 +2539,7 @@ uint8_t GDBRemoteCommunicationClient::Se
     if (response.IsOKResponse())
       return 0;
 
-    // Error while setting breakpoint, send back specific error
+    // Status while setting breakpoint, send back specific error
     if (response.IsErrorResponse())
       return response.GetError();
 
@@ -2635,7 +2635,7 @@ lldb::addr_t GDBRemoteCommunicationClien
   return response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS);
 }
 
-lldb_private::Error GDBRemoteCommunicationClient::RunShellCommand(
+lldb_private::Status GDBRemoteCommunicationClient::RunShellCommand(
     const char *command, // Shouldn't be NULL
     const FileSpec &
         working_dir, // Pass empty FileSpec to use the current working directory
@@ -2661,32 +2661,32 @@ lldb_private::Error GDBRemoteCommunicati
   if (SendPacketAndWaitForResponse(stream.GetString(), response, false) ==
       PacketResult::Success) {
     if (response.GetChar() != 'F')
-      return Error("malformed reply");
+      return Status("malformed reply");
     if (response.GetChar() != ',')
-      return Error("malformed reply");
+      return Status("malformed reply");
     uint32_t exitcode = response.GetHexMaxU32(false, UINT32_MAX);
     if (exitcode == UINT32_MAX)
-      return Error("unable to run remote process");
+      return Status("unable to run remote process");
     else if (status_ptr)
       *status_ptr = exitcode;
     if (response.GetChar() != ',')
-      return Error("malformed reply");
+      return Status("malformed reply");
     uint32_t signo = response.GetHexMaxU32(false, UINT32_MAX);
     if (signo_ptr)
       *signo_ptr = signo;
     if (response.GetChar() != ',')
-      return Error("malformed reply");
+      return Status("malformed reply");
     std::string output;
     response.GetEscapedBinaryData(output);
     if (command_output)
       command_output->assign(output);
-    return Error();
+    return Status();
   }
-  return Error("unable to send packet");
+  return Status("unable to send packet");
 }
 
-Error GDBRemoteCommunicationClient::MakeDirectory(const FileSpec &file_spec,
-                                                  uint32_t file_permissions) {
+Status GDBRemoteCommunicationClient::MakeDirectory(const FileSpec &file_spec,
+                                                   uint32_t file_permissions) {
   std::string path{file_spec.GetPath(false)};
   lldb_private::StreamString stream;
   stream.PutCString("qPlatform_mkdir:");
@@ -2698,16 +2698,17 @@ Error GDBRemoteCommunicationClient::Make
 
   if (SendPacketAndWaitForResponse(packet, response, false) !=
       PacketResult::Success)
-    return Error("failed to send '%s' packet", packet.str().c_str());
+    return Status("failed to send '%s' packet", packet.str().c_str());
 
   if (response.GetChar() != 'F')
-    return Error("invalid response to '%s' packet", packet.str().c_str());
+    return Status("invalid response to '%s' packet", packet.str().c_str());
 
-  return Error(response.GetU32(UINT32_MAX), eErrorTypePOSIX);
+  return Status(response.GetU32(UINT32_MAX), eErrorTypePOSIX);
 }
 
-Error GDBRemoteCommunicationClient::SetFilePermissions(
-    const FileSpec &file_spec, uint32_t file_permissions) {
+Status
+GDBRemoteCommunicationClient::SetFilePermissions(const FileSpec &file_spec,
+                                                 uint32_t file_permissions) {
   std::string path{file_spec.GetPath(false)};
   lldb_private::StreamString stream;
   stream.PutCString("qPlatform_chmod:");
@@ -2719,16 +2720,16 @@ Error GDBRemoteCommunicationClient::SetF
 
   if (SendPacketAndWaitForResponse(packet, response, false) !=
       PacketResult::Success)
-    return Error("failed to send '%s' packet", stream.GetData());
+    return Status("failed to send '%s' packet", stream.GetData());
 
   if (response.GetChar() != 'F')
-    return Error("invalid response to '%s' packet", stream.GetData());
+    return Status("invalid response to '%s' packet", stream.GetData());
 
-  return Error(response.GetU32(UINT32_MAX), eErrorTypePOSIX);
+  return Status(response.GetU32(UINT32_MAX), eErrorTypePOSIX);
 }
 
 static uint64_t ParseHostIOPacketResponse(StringExtractorGDBRemote &response,
-                                          uint64_t fail_result, Error &error) {
+                                          uint64_t fail_result, Status &error) {
   response.SetFilePos(0);
   if (response.GetChar() != 'F')
     return fail_result;
@@ -2748,7 +2749,7 @@ static uint64_t ParseHostIOPacketRespons
 lldb::user_id_t
 GDBRemoteCommunicationClient::OpenFile(const lldb_private::FileSpec &file_spec,
                                        uint32_t flags, mode_t mode,
-                                       Error &error) {
+                                       Status &error) {
   std::string path(file_spec.GetPath(false));
   lldb_private::StreamString stream;
   stream.PutCString("vFile:open:");
@@ -2767,7 +2768,8 @@ GDBRemoteCommunicationClient::OpenFile(c
   return UINT64_MAX;
 }
 
-bool GDBRemoteCommunicationClient::CloseFile(lldb::user_id_t fd, Error &error) {
+bool GDBRemoteCommunicationClient::CloseFile(lldb::user_id_t fd,
+                                             Status &error) {
   lldb_private::StreamString stream;
   stream.Printf("vFile:close:%i", (int)fd);
   StringExtractorGDBRemote response;
@@ -2796,10 +2798,11 @@ lldb::user_id_t GDBRemoteCommunicationCl
   return UINT64_MAX;
 }
 
-Error GDBRemoteCommunicationClient::GetFilePermissions(
-    const FileSpec &file_spec, uint32_t &file_permissions) {
+Status
+GDBRemoteCommunicationClient::GetFilePermissions(const FileSpec &file_spec,
+                                                 uint32_t &file_permissions) {
   std::string path{file_spec.GetPath(false)};
-  Error error;
+  Status error;
   lldb_private::StreamString stream;
   stream.PutCString("vFile:mode:");
   stream.PutCStringAsRawHex8(path.c_str());
@@ -2834,7 +2837,7 @@ Error GDBRemoteCommunicationClient::GetF
 uint64_t GDBRemoteCommunicationClient::ReadFile(lldb::user_id_t fd,
                                                 uint64_t offset, void *dst,
                                                 uint64_t dst_len,
-                                                Error &error) {
+                                                Status &error) {
   lldb_private::StreamString stream;
   stream.Printf("vFile:pread:%i,%" PRId64 ",%" PRId64, (int)fd, dst_len,
                 offset);
@@ -2868,7 +2871,7 @@ uint64_t GDBRemoteCommunicationClient::W
                                                  uint64_t offset,
                                                  const void *src,
                                                  uint64_t src_len,
-                                                 Error &error) {
+                                                 Status &error) {
   lldb_private::StreamGDBRemote stream;
   stream.Printf("vFile:pwrite:%i,%" PRId64 ",", (int)fd, offset);
   stream.PutEscapedBytes(src, src_len);
@@ -2896,10 +2899,10 @@ uint64_t GDBRemoteCommunicationClient::W
   return 0;
 }
 
-Error GDBRemoteCommunicationClient::CreateSymlink(const FileSpec &src,
-                                                  const FileSpec &dst) {
+Status GDBRemoteCommunicationClient::CreateSymlink(const FileSpec &src,
+                                                   const FileSpec &dst) {
   std::string src_path{src.GetPath(false)}, dst_path{dst.GetPath(false)};
-  Error error;
+  Status error;
   lldb_private::StreamGDBRemote stream;
   stream.PutCString("vFile:symlink:");
   // the unix symlink() command reverses its parameters where the dst if first,
@@ -2930,9 +2933,9 @@ Error GDBRemoteCommunicationClient::Crea
   return error;
 }
 
-Error GDBRemoteCommunicationClient::Unlink(const FileSpec &file_spec) {
+Status GDBRemoteCommunicationClient::Unlink(const FileSpec &file_spec) {
   std::string path{file_spec.GetPath(false)};
-  Error error;
+  Status error;
   lldb_private::StreamGDBRemote stream;
   stream.PutCString("vFile:unlink:");
   // the unix symlink() command reverses its parameters where the dst if first,
@@ -3311,7 +3314,7 @@ GDBRemoteCommunicationClient::GetModules
 bool GDBRemoteCommunicationClient::ReadExtFeature(
     const lldb_private::ConstString object,
     const lldb_private::ConstString annex, std::string &out,
-    lldb_private::Error &err) {
+    lldb_private::Status &err) {
 
   std::stringstream output;
   StringExtractorGDBRemote chunk;
@@ -3590,7 +3593,7 @@ GDBRemoteCommunicationClient::GetSupport
              : nullptr;
 }
 
-Error GDBRemoteCommunicationClient::SendSignalsToIgnore(
+Status GDBRemoteCommunicationClient::SendSignalsToIgnore(
     llvm::ArrayRef<int32_t> signals) {
   // Format packet:
   // QPassSignals:<hex_sig1>;<hex_sig2>...;<hex_sigN>
@@ -3601,18 +3604,18 @@ Error GDBRemoteCommunicationClient::Send
   auto send_status = SendPacketAndWaitForResponse(packet, response, false);
 
   if (send_status != GDBRemoteCommunication::PacketResult::Success)
-    return Error("Sending QPassSignals packet failed");
+    return Status("Sending QPassSignals packet failed");
 
   if (response.IsOKResponse()) {
-    return Error();
+    return Status();
   } else {
-    return Error("Unknown error happened during sending QPassSignals packet.");
+    return Status("Unknown error happened during sending QPassSignals packet.");
   }
 }
 
-Error GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(
+Status GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(
     const ConstString &type_name, const StructuredData::ObjectSP &config_sp) {
-  Error error;
+  Status error;
 
   if (type_name.GetLength() == 0) {
     error.SetErrorString("invalid type_name argument");

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Thu May 11 23:51:55 2017
@@ -41,7 +41,7 @@ public:
   // After connecting, send the handshake to the server to make sure
   // we are communicating with it.
   //------------------------------------------------------------------
-  bool HandshakeWithServer(Error *error_ptr);
+  bool HandshakeWithServer(Status *error_ptr);
 
   // For packets which specify a range of output to be returned,
   // return all of the output via a series of request packets of the form
@@ -230,17 +230,17 @@ public:
 
   bool DeallocateMemory(lldb::addr_t addr);
 
-  Error Detach(bool keep_stopped);
+  Status Detach(bool keep_stopped);
 
-  Error GetMemoryRegionInfo(lldb::addr_t addr, MemoryRegionInfo &range_info);
+  Status GetMemoryRegionInfo(lldb::addr_t addr, MemoryRegionInfo &range_info);
 
-  Error GetWatchpointSupportInfo(uint32_t &num);
+  Status GetWatchpointSupportInfo(uint32_t &num);
 
-  Error GetWatchpointSupportInfo(uint32_t &num, bool &after,
-                                 const ArchSpec &arch);
+  Status GetWatchpointSupportInfo(uint32_t &num, bool &after,
+                                  const ArchSpec &arch);
 
-  Error GetWatchpointsTriggerAfterInstruction(bool &after,
-                                              const ArchSpec &arch);
+  Status GetWatchpointsTriggerAfterInstruction(bool &after,
+                                               const ArchSpec &arch);
 
   const ArchSpec &GetHostArchitecture();
 
@@ -365,33 +365,33 @@ public:
                              bool &sequence_mutex_unavailable);
 
   lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
-                           mode_t mode, Error &error);
+                           mode_t mode, Status &error);
 
-  bool CloseFile(lldb::user_id_t fd, Error &error);
+  bool CloseFile(lldb::user_id_t fd, Status &error);
 
   lldb::user_id_t GetFileSize(const FileSpec &file_spec);
 
-  Error GetFilePermissions(const FileSpec &file_spec,
-                           uint32_t &file_permissions);
+  Status GetFilePermissions(const FileSpec &file_spec,
+                            uint32_t &file_permissions);
 
-  Error SetFilePermissions(const FileSpec &file_spec,
-                           uint32_t file_permissions);
+  Status SetFilePermissions(const FileSpec &file_spec,
+                            uint32_t file_permissions);
 
   uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
-                    uint64_t dst_len, Error &error);
+                    uint64_t dst_len, Status &error);
 
   uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src,
-                     uint64_t src_len, Error &error);
+                     uint64_t src_len, Status &error);
 
-  Error CreateSymlink(const FileSpec &src, const FileSpec &dst);
+  Status CreateSymlink(const FileSpec &src, const FileSpec &dst);
 
-  Error Unlink(const FileSpec &file_spec);
+  Status Unlink(const FileSpec &file_spec);
 
-  Error MakeDirectory(const FileSpec &file_spec, uint32_t mode);
+  Status MakeDirectory(const FileSpec &file_spec, uint32_t mode);
 
   bool GetFileExists(const FileSpec &file_spec);
 
-  Error RunShellCommand(
+  Status RunShellCommand(
       const char *command,         // Shouldn't be nullptr
       const FileSpec &working_dir, // Pass empty FileSpec to use the current
                                    // working directory
@@ -448,12 +448,12 @@ public:
 
   bool ReadExtFeature(const lldb_private::ConstString object,
                       const lldb_private::ConstString annex, std::string &out,
-                      lldb_private::Error &err);
+                      lldb_private::Status &err);
 
   void ServeSymbolLookups(lldb_private::Process *process);
 
   // Sends QPassSignals packet to the server with given signals to ignore.
-  Error SendSignalsToIgnore(llvm::ArrayRef<int32_t> signals);
+  Status SendSignalsToIgnore(llvm::ArrayRef<int32_t> signals);
 
   //------------------------------------------------------------------
   /// Return the feature set supported by the gdb-remote server.
@@ -495,7 +495,7 @@ public:
   ///
   /// @see \b Process::ConfigureStructuredData(...) for details.
   //------------------------------------------------------------------
-  Error
+  Status
   ConfigureRemoteStructuredData(const ConstString &type_name,
                                 const StructuredData::ObjectSP &config_sp);
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp Thu May 11 23:51:55 2017
@@ -39,7 +39,7 @@ void GDBRemoteCommunicationServer::Regis
 
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServer::GetPacketAndSendResponse(
-    Timeout<std::micro> timeout, Error &error, bool &interrupt, bool &quit) {
+    Timeout<std::micro> timeout, Status &error, bool &interrupt, bool &quit) {
   StringExtractorGDBRemote packet;
 
   PacketResult packet_result = WaitForPacketNoLock(packet, timeout, false);

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h Thu May 11 23:51:55 2017
@@ -31,8 +31,8 @@ class GDBRemoteCommunicationServer : pub
 public:
   using PortMap = std::map<uint16_t, lldb::pid_t>;
   using PacketHandler =
-      std::function<PacketResult(StringExtractorGDBRemote &packet, Error &error,
-                                 bool &interrupt, bool &quit)>;
+      std::function<PacketResult(StringExtractorGDBRemote &packet,
+                                 Status &error, bool &interrupt, bool &quit)>;
 
   GDBRemoteCommunicationServer(const char *comm_name,
                                const char *listener_name);
@@ -44,7 +44,7 @@ public:
                         PacketHandler handler);
 
   PacketResult GetPacketAndSendResponse(Timeout<std::micro> timeout,
-                                        Error &error, bool &interrupt,
+                                        Status &error, bool &interrupt,
                                         bool &quit);
 
   // After connecting, do a little handshake with the client to make sure

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Thu May 11 23:51:55 2017
@@ -523,7 +523,7 @@ GDBRemoteCommunicationServerCommon::Hand
           File::ConvertOpenOptionsForPOSIXOpen(packet.GetHexMaxU32(false, 0));
       if (packet.GetChar() == ',') {
         mode_t mode = packet.GetHexMaxU32(false, 0600);
-        Error error;
+        Status error;
         const FileSpec path_spec{path, true};
         int fd = ::open(path_spec.GetCString(), flags, mode);
         const int save_errno = fd == -1 ? errno : 0;
@@ -544,7 +544,7 @@ GDBRemoteCommunicationServerCommon::Hand
     StringExtractorGDBRemote &packet) {
   packet.SetFilePos(::strlen("vFile:close:"));
   int fd = packet.GetS32(-1);
-  Error error;
+  Status error;
   int err = -1;
   int save_errno = 0;
   if (fd >= 0) {
@@ -663,7 +663,7 @@ GDBRemoteCommunicationServerCommon::Hand
   std::string path;
   packet.GetHexByteString(path);
   if (!path.empty()) {
-    Error error;
+    Status error;
     const uint32_t mode = File::GetPermissions(FileSpec{path, true}, error);
     StreamString response;
     response.Printf("F%u", mode);
@@ -702,7 +702,7 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.GetHexByteStringTerminatedBy(dst, ',');
   packet.GetChar(); // Skip ',' char
   packet.GetHexByteString(src);
-  Error error = FileSystem::Symlink(FileSpec{src, true}, FileSpec{dst, false});
+  Status error = FileSystem::Symlink(FileSpec{src, true}, FileSpec{dst, false});
   StreamString response;
   response.Printf("F%u,%u", error.GetError(), error.GetError());
   return SendPacketNoLock(response.GetString());
@@ -714,7 +714,7 @@ GDBRemoteCommunicationServerCommon::Hand
   packet.SetFilePos(::strlen("vFile:unlink:"));
   std::string path;
   packet.GetHexByteString(path);
-  Error error(llvm::sys::fs::remove(path));
+  Status error(llvm::sys::fs::remove(path));
   StreamString response;
   response.Printf("F%u,%u", error.GetError(), error.GetError());
   return SendPacketNoLock(response.GetString());
@@ -736,7 +736,7 @@ GDBRemoteCommunicationServerCommon::Hand
         packet.GetHexByteString(working_dir);
       int status, signo;
       std::string output;
-      Error err =
+      Status err =
           Host::RunShellCommand(path.c_str(), FileSpec{working_dir, true},
                                 &status, &signo, &output, timeout);
       StreamGDBRemote response;
@@ -794,7 +794,7 @@ GDBRemoteCommunicationServerCommon::Hand
   if (packet.GetChar() == ',') {
     std::string path;
     packet.GetHexByteString(path);
-    Error error(llvm::sys::fs::create_directory(path, mode));
+    Status error(llvm::sys::fs::create_directory(path, mode));
 
     StreamGDBRemote response;
     response.Printf("F%u", error.GetError());
@@ -814,7 +814,7 @@ GDBRemoteCommunicationServerCommon::Hand
   if (packet.GetChar() == ',') {
     std::string path;
     packet.GetHexByteString(path);
-    Error error(llvm::sys::fs::setPermissions(path, perms));
+    Status error(llvm::sys::fs::setPermissions(path, perms));
 
     StreamGDBRemote response;
     response.Printf("F%u", error.GetError());

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h Thu May 11 23:51:55 2017
@@ -38,7 +38,7 @@ public:
 
 protected:
   ProcessLaunchInfo m_process_launch_info;
-  Error m_process_launch_error;
+  Status m_process_launch_error;
   ProcessInstanceInfoList m_proc_infos;
   uint32_t m_proc_infos_index;
   bool m_thread_suffix_supported;
@@ -130,7 +130,7 @@ protected:
       PacketResult (T::*handler)(StringExtractorGDBRemote &packet)) {
     RegisterPacketHandler(packet_type,
                           [this, handler](StringExtractorGDBRemote packet,
-                                          Error &error, bool &interrupt,
+                                          Status &error, bool &interrupt,
                                           bool &quit) {
                             return (static_cast<T *>(this)->*handler)(packet);
                           });
@@ -144,10 +144,10 @@ protected:
   /// with all the information for a child process to be launched.
   ///
   /// @return
-  ///     An Error object indicating the success or failure of the
+  ///     An Status object indicating the success or failure of the
   ///     launch.
   //------------------------------------------------------------------
-  virtual Error LaunchProcess() = 0;
+  virtual Status LaunchProcess() = 0;
 
   virtual FileSpec FindModuleFile(const std::string &module_path,
                                   const ArchSpec &arch);

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Thu May 11 23:51:55 2017
@@ -184,35 +184,36 @@ void GDBRemoteCommunicationServerLLGS::R
       &GDBRemoteCommunicationServerLLGS::Handle_QPassSignals);
 
   RegisterPacketHandler(StringExtractorGDBRemote::eServerPacketType_k,
-                        [this](StringExtractorGDBRemote packet, Error &error,
+                        [this](StringExtractorGDBRemote packet, Status &error,
                                bool &interrupt, bool &quit) {
                           quit = true;
                           return this->Handle_k(packet);
                         });
 }
 
-Error GDBRemoteCommunicationServerLLGS::SetLaunchArguments(
-    const char *const args[], int argc) {
+Status
+GDBRemoteCommunicationServerLLGS::SetLaunchArguments(const char *const args[],
+                                                     int argc) {
   if ((argc < 1) || !args || !args[0] || !args[0][0])
-    return Error("%s: no process command line specified to launch",
-                 __FUNCTION__);
+    return Status("%s: no process command line specified to launch",
+                  __FUNCTION__);
 
   m_process_launch_info.SetArguments(const_cast<const char **>(args), true);
-  return Error();
+  return Status();
 }
 
-Error GDBRemoteCommunicationServerLLGS::SetLaunchFlags(
-    unsigned int launch_flags) {
+Status
+GDBRemoteCommunicationServerLLGS::SetLaunchFlags(unsigned int launch_flags) {
   m_process_launch_info.GetFlags().Set(launch_flags);
-  return Error();
+  return Status();
 }
 
-Error GDBRemoteCommunicationServerLLGS::LaunchProcess() {
+Status GDBRemoteCommunicationServerLLGS::LaunchProcess() {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (!m_process_launch_info.GetArguments().GetArgumentCount())
-    return Error("%s: no process command line specified to launch",
-                 __FUNCTION__);
+    return Status("%s: no process command line specified to launch",
+                  __FUNCTION__);
 
   const bool should_forward_stdio =
       m_process_launch_info.GetFileActionForFD(STDIN_FILENO) == nullptr ||
@@ -224,7 +225,7 @@ Error GDBRemoteCommunicationServerLLGS::
   const bool default_to_use_pty = true;
   m_process_launch_info.FinalizeFileActions(nullptr, default_to_use_pty);
 
-  Error error;
+  Status error;
   {
     std::lock_guard<std::recursive_mutex> guard(m_debugged_process_mutex);
     assert(!m_debugged_process_sp && "lldb-server creating debugged "
@@ -286,8 +287,8 @@ Error GDBRemoteCommunicationServerLLGS::
   return error;
 }
 
-Error GDBRemoteCommunicationServerLLGS::AttachToProcess(lldb::pid_t pid) {
-  Error error;
+Status GDBRemoteCommunicationServerLLGS::AttachToProcess(lldb::pid_t pid) {
+  Status error;
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log)
@@ -298,10 +299,10 @@ Error GDBRemoteCommunicationServerLLGS::
   // else.
   if (m_debugged_process_sp &&
       m_debugged_process_sp->GetID() != LLDB_INVALID_PROCESS_ID)
-    return Error("cannot attach to a process %" PRIu64
-                 " when another process with pid %" PRIu64
-                 " is being debugged.",
-                 pid, m_debugged_process_sp->GetID());
+    return Status("cannot attach to a process %" PRIu64
+                  " when another process with pid %" PRIu64
+                  " is being debugged.",
+                  pid, m_debugged_process_sp->GetID());
 
   // Try to attach.
   error = NativeProcessProtocol::Attach(pid, *this, m_mainloop,
@@ -420,7 +421,7 @@ static void WriteRegisterValueInHexFixed
     lldb::ByteOrder byte_order) {
   RegisterValue reg_value;
   if (!reg_value_p) {
-    Error error = reg_ctx_sp->ReadRegister(&reg_info, reg_value);
+    Status error = reg_ctx_sp->ReadRegister(&reg_info, reg_value);
     if (error.Success())
       reg_value_p = &reg_value;
     // else log.
@@ -488,7 +489,7 @@ static JSONObject::SP GetRegistersAsJSON
                 // registers.
 
     RegisterValue reg_value;
-    Error error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
+    Status error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
     if (error.Fail()) {
       if (log)
         log->Printf("%s failed to read register '%s' index %" PRIu32 ": %s",
@@ -739,7 +740,7 @@ GDBRemoteCommunicationServerLLGS::SendSt
           reg_ctx_sp->GetRegisterInfoAtIndex(reg_to_read);
 
       RegisterValue reg_value;
-      Error error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
+      Status error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
       if (error.Fail()) {
         if (log)
           log->Printf("%s failed to read register '%s' index %" PRIu32 ": %s",
@@ -793,7 +794,7 @@ GDBRemoteCommunicationServerLLGS::SendSt
         } else if (reg_info_p->value_regs == nullptr) {
           // Only expediate registers that are not contained in other registers.
           RegisterValue reg_value;
-          Error error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
+          Status error = reg_ctx_sp->ReadRegister(reg_info_p, reg_value);
           if (error.Success()) {
             response.Printf("%.02x:", *reg_num_p);
             WriteRegisterValueInHexFixedWidth(response, reg_ctx_sp, *reg_info_p,
@@ -960,7 +961,7 @@ void GDBRemoteCommunicationServerLLGS::D
 
   bool interrupt = false;
   bool done = false;
-  Error error;
+  Status error;
   while (true) {
     const PacketResult result = GetPacketAndSendResponse(
         std::chrono::microseconds(0), error, interrupt, done);
@@ -978,12 +979,12 @@ void GDBRemoteCommunicationServerLLGS::D
   }
 }
 
-Error GDBRemoteCommunicationServerLLGS::InitializeConnection(
+Status GDBRemoteCommunicationServerLLGS::InitializeConnection(
     std::unique_ptr<Connection> &&connection) {
   IOObjectSP read_object_sp = connection->GetReadObject();
   GDBRemoteCommunicationServer::SetConnection(connection.release());
 
-  Error error;
+  Status error;
   m_network_handle_up = m_mainloop.RegisterReadObject(
       read_object_sp, [this](MainLoopBase &) { DataAvailableCallback(); },
       error);
@@ -1005,8 +1006,8 @@ GDBRemoteCommunicationServerLLGS::SendON
   return SendPacketNoLock(response.GetString());
 }
 
-Error GDBRemoteCommunicationServerLLGS::SetSTDIOFileDescriptor(int fd) {
-  Error error;
+Status GDBRemoteCommunicationServerLLGS::SetSTDIOFileDescriptor(int fd) {
+  Status error;
 
   // Set up the reading/handling of process I/O
   std::unique_ptr<ConnectionFileDescriptor> conn_up(
@@ -1024,7 +1025,7 @@ Error GDBRemoteCommunicationServerLLGS::
     return error;
   }
 
-  return Error();
+  return Status();
 }
 
 void GDBRemoteCommunicationServerLLGS::StartSTDIOForwarding() {
@@ -1032,7 +1033,7 @@ void GDBRemoteCommunicationServerLLGS::S
   if (!m_stdio_communication.IsConnected())
     return;
 
-  Error error;
+  Status error;
   lldbassert(!m_stdio_handle_up);
   m_stdio_handle_up = m_mainloop.RegisterReadObject(
       m_stdio_communication.GetConnection()->GetReadObject(),
@@ -1055,7 +1056,7 @@ void GDBRemoteCommunicationServerLLGS::S
 void GDBRemoteCommunicationServerLLGS::SendProcessOutput() {
   char buffer[1024];
   ConnectionStatus status;
-  Error error;
+  Status error;
   while (true) {
     size_t bytes_read = m_stdio_communication.Read(
         buffer, sizeof buffer, std::chrono::microseconds(0), status, &error);
@@ -1140,7 +1141,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     return PacketResult::Success;
   }
 
-  Error error = m_debugged_process_sp->Kill();
+  Status error = m_debugged_process_sp->Kill();
   if (error.Fail() && log)
     log->Printf("GDBRemoteCommunicationServerLLGS::%s Failed to kill debugged "
                 "process %" PRIu64 ": %s",
@@ -1223,7 +1224,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   }
 
   ResumeActionList resume_actions(StateType::eStateRunning, 0);
-  Error error;
+  Status error;
 
   // We have two branches: what to do if a continue thread is specified (in
   // which case we target
@@ -1304,7 +1305,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   // Build the ResumeActionList
   ResumeActionList actions(StateType::eStateRunning, 0);
 
-  Error error = m_debugged_process_sp->Resume(actions);
+  Status error = m_debugged_process_sp->Resume(actions);
   if (error.Fail()) {
     if (log) {
       log->Printf(
@@ -1428,7 +1429,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     thread_actions.Append(thread_action);
   }
 
-  Error error = m_debugged_process_sp->Resume(thread_actions);
+  Status error = m_debugged_process_sp->Resume(thread_actions);
   if (error.Fail()) {
     if (log) {
       log->Printf("GDBRemoteCommunicationServerLLGS::%s vCont failed for "
@@ -1853,7 +1854,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Retrieve the value
   RegisterValue reg_value;
-  Error error = reg_context_sp->ReadRegister(reg_info, reg_value);
+  Status error = reg_context_sp->ReadRegister(reg_info, reg_value);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, read of "
@@ -1973,7 +1974,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   StreamGDBRemote response;
 
   RegisterValue reg_value(reg_bytes, reg_size, process_arch.GetByteOrder());
-  Error error = reg_context_sp->WriteRegister(reg_info, reg_value);
+  Status error = reg_context_sp->WriteRegister(reg_info, reg_value);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, write of "
@@ -2088,7 +2089,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     // TODO: enqueue this block in circular buffer and send window size to
     // remote host
     ConnectionStatus status;
-    Error error;
+    Status error;
     m_stdio_communication.Write(tmp, read, status, &error);
     if (error.Fail()) {
       return SendErrorResponse(0x15);
@@ -2114,7 +2115,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   }
 
   // Interrupt the process.
-  Error error = m_debugged_process_sp->Interrupt();
+  Status error = m_debugged_process_sp->Interrupt();
   if (error.Fail()) {
     if (log) {
       log->Printf(
@@ -2181,7 +2182,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Retrieve the process memory.
   size_t bytes_read = 0;
-  Error error = m_debugged_process_sp->ReadMemoryWithoutTrap(
+  Status error = m_debugged_process_sp->ReadMemoryWithoutTrap(
       read_addr, &buf[0], byte_count, bytes_read);
   if (error.Fail()) {
     if (log)
@@ -2282,8 +2283,8 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Write the process memory.
   size_t bytes_written = 0;
-  Error error = m_debugged_process_sp->WriteMemory(write_addr, &buf[0],
-                                                   byte_count, bytes_written);
+  Status error = m_debugged_process_sp->WriteMemory(write_addr, &buf[0],
+                                                    byte_count, bytes_written);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
@@ -2329,7 +2330,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Test if we can get any region back when asking for the region around NULL.
   MemoryRegionInfo region_info;
-  const Error error =
+  const Status error =
       m_debugged_process_sp->GetMemoryRegionInfo(0, region_info);
   if (error.Fail()) {
     // We don't support memory region info collection for this
@@ -2367,7 +2368,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Get the memory region info for the target address.
   MemoryRegionInfo region_info;
-  const Error error =
+  const Status error =
       m_debugged_process_sp->GetMemoryRegionInfo(read_addr, region_info);
   if (error.Fail()) {
     // Return the error message.
@@ -2485,7 +2486,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   if (want_breakpoint) {
     // Try to set the breakpoint.
-    const Error error =
+    const Status error =
         m_debugged_process_sp->SetBreakpoint(addr, size, want_hardware);
     if (error.Success())
       return SendOKResponse();
@@ -2498,7 +2499,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     return SendErrorResponse(0x09);
   } else {
     // Try to set the watchpoint.
-    const Error error = m_debugged_process_sp->SetWatchpoint(
+    const Status error = m_debugged_process_sp->SetWatchpoint(
         addr, size, watch_flags, want_hardware);
     if (error.Success())
       return SendOKResponse();
@@ -2582,7 +2583,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   if (want_breakpoint) {
     // Try to clear the breakpoint.
-    const Error error =
+    const Status error =
         m_debugged_process_sp->RemoveBreakpoint(addr, want_hardware);
     if (error.Success())
       return SendOKResponse();
@@ -2595,7 +2596,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     return SendErrorResponse(0x09);
   } else {
     // Try to clear the watchpoint.
-    const Error error = m_debugged_process_sp->RemoveWatchpoint(addr);
+    const Status error = m_debugged_process_sp->RemoveWatchpoint(addr);
     if (error.Success())
       return SendOKResponse();
     Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
@@ -2646,7 +2647,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // All other threads stop while we're single stepping a thread.
   actions.SetDefaultThreadActionIfNeeded(eStateStopped, 0);
-  Error error = m_debugged_process_sp->Resume(actions);
+  Status error = m_debugged_process_sp->Resume(actions);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
@@ -2782,7 +2783,7 @@ GDBRemoteCommunicationServerLLGS::Handle
 
   // Save registers to a buffer.
   DataBufferSP register_data_sp;
-  Error error = reg_context_sp->ReadAllRegisterValues(register_data_sp);
+  Status error = reg_context_sp->ReadAllRegisterValues(register_data_sp);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
@@ -2871,7 +2872,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     m_saved_registers_map.erase(it);
   }
 
-  Error error = reg_context_sp->WriteAllRegisterValues(register_data_sp);
+  Status error = reg_context_sp->WriteAllRegisterValues(register_data_sp);
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
@@ -2906,7 +2907,7 @@ GDBRemoteCommunicationServerLLGS::Handle
                 "pid %" PRIu64,
                 __FUNCTION__, pid);
 
-  Error error = AttachToProcess(pid);
+  Status error = AttachToProcess(pid);
 
   if (error.Fail()) {
     if (log)
@@ -2954,7 +2955,7 @@ GDBRemoteCommunicationServerLLGS::Handle
     return SendIllFormedResponse(packet, "Invalid pid");
   }
 
-  const Error error = m_debugged_process_sp->Detach();
+  const Status error = m_debugged_process_sp->Detach();
   if (error.Fail()) {
     if (log)
       log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to detach from "
@@ -3058,7 +3059,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   packet.GetHexByteString(file_name);
 
   lldb::addr_t file_load_address = LLDB_INVALID_ADDRESS;
-  Error error =
+  Status error =
       m_debugged_process_sp->GetFileLoadAddress(file_name, file_load_address);
   if (error.Fail())
     return SendErrorResponse(69);
@@ -3098,7 +3099,7 @@ GDBRemoteCommunicationServerLLGS::Handle
   if (!m_debugged_process_sp)
     return SendErrorResponse(68);
 
-  Error error = m_debugged_process_sp->IgnoreSignals(signals);
+  Status error = m_debugged_process_sp->IgnoreSignals(signals);
   if (error.Fail())
     return SendErrorResponse(69);
 
@@ -3112,7 +3113,7 @@ void GDBRemoteCommunicationServerLLGS::M
   if (m_stdio_communication.IsConnected()) {
     auto connection = m_stdio_communication.GetConnection();
     if (connection) {
-      Error error;
+      Status error;
       connection->Disconnect(&error);
 
       if (error.Success()) {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h Thu May 11 23:51:55 2017
@@ -51,10 +51,10 @@ public:
   ///     The number of elements in the args array of cstring pointers.
   ///
   /// @return
-  ///     An Error object indicating the success or failure of making
+  ///     An Status object indicating the success or failure of making
   ///     the setting.
   //------------------------------------------------------------------
-  Error SetLaunchArguments(const char *const args[], int argc);
+  Status SetLaunchArguments(const char *const args[], int argc);
 
   //------------------------------------------------------------------
   /// Specify the launch flags for the process.
@@ -63,10 +63,10 @@ public:
   ///     The launch flags to use when launching this process.
   ///
   /// @return
-  ///     An Error object indicating the success or failure of making
+  ///     An Status object indicating the success or failure of making
   ///     the setting.
   //------------------------------------------------------------------
-  Error SetLaunchFlags(unsigned int launch_flags);
+  Status SetLaunchFlags(unsigned int launch_flags);
 
   //------------------------------------------------------------------
   /// Launch a process with the current launch settings.
@@ -76,10 +76,10 @@ public:
   /// with all the information for a child process to be launched.
   ///
   /// @return
-  ///     An Error object indicating the success or failure of the
+  ///     An Status object indicating the success or failure of the
   ///     launch.
   //------------------------------------------------------------------
-  Error LaunchProcess() override;
+  Status LaunchProcess() override;
 
   //------------------------------------------------------------------
   /// Attach to a process.
@@ -88,10 +88,10 @@ public:
   /// configured Platform.
   ///
   /// @return
-  ///     An Error object indicating the success or failure of the
+  ///     An Status object indicating the success or failure of the
   ///     attach operation.
   //------------------------------------------------------------------
-  Error AttachToProcess(lldb::pid_t pid);
+  Status AttachToProcess(lldb::pid_t pid);
 
   //------------------------------------------------------------------
   // NativeProcessProtocol::NativeDelegate overrides
@@ -103,7 +103,7 @@ public:
 
   void DidExec(NativeProcessProtocol *process) override;
 
-  Error InitializeConnection(std::unique_ptr<Connection> &&connection);
+  Status InitializeConnection(std::unique_ptr<Connection> &&connection);
 
 protected:
   MainLoop &m_mainloop;
@@ -213,7 +213,7 @@ protected:
 
   lldb::tid_t GetContinueThreadID() const { return m_continue_tid; }
 
-  Error SetSTDIOFileDescriptor(int fd);
+  Status SetSTDIOFileDescriptor(int fd);
 
   FileSpec FindModuleFile(const std::string &module_path,
                           const ArchSpec &arch) override;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp Thu May 11 23:51:55 2017
@@ -82,7 +82,7 @@ GDBRemoteCommunicationServerPlatform::GD
       &GDBRemoteCommunicationServerPlatform::Handle_jSignalsInfo);
 
   RegisterPacketHandler(StringExtractorGDBRemote::eServerPacketType_interrupt,
-                        [](StringExtractorGDBRemote packet, Error &error,
+                        [](StringExtractorGDBRemote packet, Status &error,
                            bool &interrupt, bool &quit) {
                           error.SetErrorString("interrupt received");
                           interrupt = true;
@@ -95,7 +95,7 @@ GDBRemoteCommunicationServerPlatform::GD
 //----------------------------------------------------------------------
 GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() {}
 
-Error GDBRemoteCommunicationServerPlatform::LaunchGDBServer(
+Status GDBRemoteCommunicationServerPlatform::LaunchGDBServer(
     const lldb_private::Args &args, std::string hostname, lldb::pid_t &pid,
     uint16_t &port, std::string &socket_name) {
   if (port == UINT16_MAX)
@@ -147,7 +147,7 @@ Error GDBRemoteCommunicationServerPlatfo
     port_ptr = nullptr;
   }
 
-  Error error = StartDebugserverProcess(
+  Status error = StartDebugserverProcess(
       url.str().c_str(), nullptr, debugserver_launch_info, port_ptr, &args, -1);
 
   pid = debugserver_launch_info.GetProcessID();
@@ -192,7 +192,7 @@ GDBRemoteCommunicationServerPlatform::Ha
 
   lldb::pid_t debugserver_pid = LLDB_INVALID_PROCESS_ID;
   std::string socket_name;
-  Error error =
+  Status error =
       LaunchGDBServer(Args(), hostname, debugserver_pid, port, socket_name);
   if (error.Fail()) {
     if (log)
@@ -439,10 +439,10 @@ bool GDBRemoteCommunicationServerPlatfor
   return true;
 }
 
-Error GDBRemoteCommunicationServerPlatform::LaunchProcess() {
+Status GDBRemoteCommunicationServerPlatform::LaunchProcess() {
   if (!m_process_launch_info.GetArguments().GetArgumentCount())
-    return Error("%s: no process command line specified to launch",
-                 __FUNCTION__);
+    return Status("%s: no process command line specified to launch",
+                  __FUNCTION__);
 
   // specify the process monitor if not already set.  This should
   // generally be what happens since we need to reap started
@@ -454,7 +454,7 @@ Error GDBRemoteCommunicationServerPlatfo
             this, std::placeholders::_1),
         false);
 
-  Error error = Host::LaunchProcess(m_process_launch_info);
+  Status error = Host::LaunchProcess(m_process_launch_info);
   if (!error.Success()) {
     fprintf(stderr, "%s: failed to launch executable %s", __FUNCTION__,
             m_process_launch_info.GetArguments().GetArgumentAtIndex(0));

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h Thu May 11 23:51:55 2017
@@ -34,7 +34,7 @@ public:
 
   ~GDBRemoteCommunicationServerPlatform() override;
 
-  Error LaunchProcess() override;
+  Status LaunchProcess() override;
 
   // Set both ports to zero to let the platform automatically bind to
   // a port chosen by the OS.
@@ -61,9 +61,9 @@ public:
 
   void SetInferiorArguments(const lldb_private::Args &args);
 
-  Error LaunchGDBServer(const lldb_private::Args &args, std::string hostname,
-                        lldb::pid_t &pid, uint16_t &port,
-                        std::string &socket_name);
+  Status LaunchGDBServer(const lldb_private::Args &args, std::string hostname,
+                         lldb::pid_t &pid, uint16_t &port,
+                         std::string &socket_name);
 
   void SetPendingGdbServer(lldb::pid_t pid, uint16_t port,
                            const std::string &socket_name);

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Thu May 11 23:51:55 2017
@@ -95,8 +95,8 @@ bool GDBRemoteRegisterContext::ReadRegis
   // Read the register
   if (ReadRegisterBytes(reg_info, m_reg_data)) {
     const bool partial_data_ok = false;
-    Error error(value.SetValueFromData(reg_info, m_reg_data,
-                                       reg_info->byte_offset, partial_data_ok));
+    Status error(value.SetValueFromData(
+        reg_info, m_reg_data, reg_info->byte_offset, partial_data_ok));
     return error.Success();
   }
   return false;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu May 11 23:51:55 2017
@@ -97,8 +97,8 @@ namespace lldb {
 // function and get the packet history dumped to a file.
 void DumpProcessGDBRemotePacketHistory(void *p, const char *path) {
   StreamFile strm;
-  Error error(strm.GetFile().Open(path, File::eOpenOptionWrite |
-                                            File::eOpenOptionCanCreate));
+  Status error(strm.GetFile().Open(path, File::eOpenOptionWrite |
+                                             File::eOpenOptionCanCreate));
   if (error.Success())
     ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory(strm);
 }
@@ -324,7 +324,7 @@ bool ProcessGDBRemote::ParsePythonTarget
     const FileSpec &target_definition_fspec) {
   ScriptInterpreter *interpreter =
       GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter();
-  Error error;
+  Status error;
   StructuredData::ObjectSP module_object_sp(
       interpreter->LoadPluginModule(target_definition_fspec, error));
   if (module_object_sp) {
@@ -639,23 +639,23 @@ void ProcessGDBRemote::BuildDynamicRegis
   m_register_info.Finalize(GetTarget().GetArchitecture());
 }
 
-Error ProcessGDBRemote::WillLaunch(Module *module) {
+Status ProcessGDBRemote::WillLaunch(Module *module) {
   return WillLaunchOrAttach();
 }
 
-Error ProcessGDBRemote::WillAttachToProcessWithID(lldb::pid_t pid) {
+Status ProcessGDBRemote::WillAttachToProcessWithID(lldb::pid_t pid) {
   return WillLaunchOrAttach();
 }
 
-Error ProcessGDBRemote::WillAttachToProcessWithName(const char *process_name,
-                                                    bool wait_for_launch) {
+Status ProcessGDBRemote::WillAttachToProcessWithName(const char *process_name,
+                                                     bool wait_for_launch) {
   return WillLaunchOrAttach();
 }
 
-Error ProcessGDBRemote::DoConnectRemote(Stream *strm,
-                                        llvm::StringRef remote_url) {
+Status ProcessGDBRemote::DoConnectRemote(Stream *strm,
+                                         llvm::StringRef remote_url) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  Error error(WillLaunchOrAttach());
+  Status error(WillLaunchOrAttach());
 
   if (error.Fail())
     return error;
@@ -744,8 +744,8 @@ Error ProcessGDBRemote::DoConnectRemote(
   return error;
 }
 
-Error ProcessGDBRemote::WillLaunchOrAttach() {
-  Error error;
+Status ProcessGDBRemote::WillLaunchOrAttach() {
+  Status error;
   m_stdio_communication.Clear();
   return error;
 }
@@ -753,10 +753,10 @@ Error ProcessGDBRemote::WillLaunchOrAtta
 //----------------------------------------------------------------------
 // Process Control
 //----------------------------------------------------------------------
-Error ProcessGDBRemote::DoLaunch(Module *exe_module,
-                                 ProcessLaunchInfo &launch_info) {
+Status ProcessGDBRemote::DoLaunch(Module *exe_module,
+                                  ProcessLaunchInfo &launch_info) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  Error error;
+  Status error;
 
   if (log)
     log->Printf("ProcessGDBRemote::%s() entered", __FUNCTION__);
@@ -965,8 +965,8 @@ Error ProcessGDBRemote::DoLaunch(Module
   return error;
 }
 
-Error ProcessGDBRemote::ConnectToDebugserver(llvm::StringRef connect_url) {
-  Error error;
+Status ProcessGDBRemote::ConnectToDebugserver(llvm::StringRef connect_url) {
+  Status error;
   // Only connect if we have a valid connect URL
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
 
@@ -1169,10 +1169,10 @@ void ProcessGDBRemote::DidLaunch() {
   DidLaunchOrAttach(process_arch);
 }
 
-Error ProcessGDBRemote::DoAttachToProcessWithID(
+Status ProcessGDBRemote::DoAttachToProcessWithID(
     lldb::pid_t attach_pid, const ProcessAttachInfo &attach_info) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  Error error;
+  Status error;
 
   if (log)
     log->Printf("ProcessGDBRemote::%s()", __FUNCTION__);
@@ -1197,9 +1197,9 @@ Error ProcessGDBRemote::DoAttachToProces
   return error;
 }
 
-Error ProcessGDBRemote::DoAttachToProcessWithName(
+Status ProcessGDBRemote::DoAttachToProcessWithName(
     const char *process_name, const ProcessAttachInfo &attach_info) {
-  Error error;
+  Status error;
   // Clear out and clean up from any current state
   Clear();
 
@@ -1247,18 +1247,18 @@ void ProcessGDBRemote::DidAttach(ArchSpe
   DidLaunchOrAttach(process_arch);
 }
 
-Error ProcessGDBRemote::WillResume() {
+Status ProcessGDBRemote::WillResume() {
   m_continue_c_tids.clear();
   m_continue_C_tids.clear();
   m_continue_s_tids.clear();
   m_continue_S_tids.clear();
   m_jstopinfo_sp.reset();
   m_jthreadsinfo_sp.reset();
-  return Error();
+  return Status();
 }
 
-Error ProcessGDBRemote::DoResume() {
-  Error error;
+Status ProcessGDBRemote::DoResume() {
+  Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   if (log)
     log->Printf("ProcessGDBRemote::Resume()");
@@ -2400,8 +2400,8 @@ void ProcessGDBRemote::RefreshStateAfter
   m_thread_list_real.RefreshStateAfterStop();
 }
 
-Error ProcessGDBRemote::DoHalt(bool &caused_stop) {
-  Error error;
+Status ProcessGDBRemote::DoHalt(bool &caused_stop) {
+  Status error;
 
   if (m_public_state.GetValue() == eStateAttaching) {
     // We are being asked to halt during an attach. We need to just close
@@ -2412,8 +2412,8 @@ Error ProcessGDBRemote::DoHalt(bool &cau
   return error;
 }
 
-Error ProcessGDBRemote::DoDetach(bool keep_stopped) {
-  Error error;
+Status ProcessGDBRemote::DoDetach(bool keep_stopped) {
+  Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   if (log)
     log->Printf("ProcessGDBRemote::DoDetach(keep_stopped: %i)", keep_stopped);
@@ -2441,8 +2441,8 @@ Error ProcessGDBRemote::DoDetach(bool ke
   return error;
 }
 
-Error ProcessGDBRemote::DoDestroy() {
-  Error error;
+Status ProcessGDBRemote::DoDestroy() {
+  Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   if (log)
     log->Printf("ProcessGDBRemote::DoDestroy()");
@@ -2722,7 +2722,7 @@ void ProcessGDBRemote::WillPublicStop()
 // Process Memory
 //------------------------------------------------------------------
 size_t ProcessGDBRemote::DoReadMemory(addr_t addr, void *buf, size_t size,
-                                      Error &error) {
+                                      Status &error) {
   GetMaxMemorySize();
   bool binary_memory_read = m_gdb_comm.GetxPacketSupported();
   // M and m packets take 2 bytes for 1 byte of memory
@@ -2781,7 +2781,7 @@ size_t ProcessGDBRemote::DoReadMemory(ad
 }
 
 size_t ProcessGDBRemote::DoWriteMemory(addr_t addr, const void *buf,
-                                       size_t size, Error &error) {
+                                       size_t size, Status &error) {
   GetMaxMemorySize();
   // M and m packets take 2 bytes for 1 byte of memory
   size_t max_memory_size = m_max_memory_size / 2;
@@ -2822,7 +2822,7 @@ size_t ProcessGDBRemote::DoWriteMemory(a
 
 lldb::addr_t ProcessGDBRemote::DoAllocateMemory(size_t size,
                                                 uint32_t permissions,
-                                                Error &error) {
+                                                Status &error) {
   Log *log(
       GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_EXPRESSIONS));
   addr_t allocated_addr = LLDB_INVALID_ADDRESS;
@@ -2866,27 +2866,27 @@ lldb::addr_t ProcessGDBRemote::DoAllocat
   return allocated_addr;
 }
 
-Error ProcessGDBRemote::GetMemoryRegionInfo(addr_t load_addr,
-                                            MemoryRegionInfo &region_info) {
+Status ProcessGDBRemote::GetMemoryRegionInfo(addr_t load_addr,
+                                             MemoryRegionInfo &region_info) {
 
-  Error error(m_gdb_comm.GetMemoryRegionInfo(load_addr, region_info));
+  Status error(m_gdb_comm.GetMemoryRegionInfo(load_addr, region_info));
   return error;
 }
 
-Error ProcessGDBRemote::GetWatchpointSupportInfo(uint32_t &num) {
+Status ProcessGDBRemote::GetWatchpointSupportInfo(uint32_t &num) {
 
-  Error error(m_gdb_comm.GetWatchpointSupportInfo(num));
+  Status error(m_gdb_comm.GetWatchpointSupportInfo(num));
   return error;
 }
 
-Error ProcessGDBRemote::GetWatchpointSupportInfo(uint32_t &num, bool &after) {
-  Error error(m_gdb_comm.GetWatchpointSupportInfo(
+Status ProcessGDBRemote::GetWatchpointSupportInfo(uint32_t &num, bool &after) {
+  Status error(m_gdb_comm.GetWatchpointSupportInfo(
       num, after, GetTarget().GetArchitecture()));
   return error;
 }
 
-Error ProcessGDBRemote::DoDeallocateMemory(lldb::addr_t addr) {
-  Error error;
+Status ProcessGDBRemote::DoDeallocateMemory(lldb::addr_t addr) {
+  Status error;
   LazyBool supported = m_gdb_comm.SupportsAllocDeallocMemory();
 
   switch (supported) {
@@ -2924,7 +2924,7 @@ Error ProcessGDBRemote::DoDeallocateMemo
 // Process STDIO
 //------------------------------------------------------------------
 size_t ProcessGDBRemote::PutSTDIN(const char *src, size_t src_len,
-                                  Error &error) {
+                                  Status &error) {
   if (m_stdio_communication.IsConnected()) {
     ConnectionStatus status;
     m_stdio_communication.Write(src, src_len, status, NULL);
@@ -2934,8 +2934,8 @@ size_t ProcessGDBRemote::PutSTDIN(const
   return 0;
 }
 
-Error ProcessGDBRemote::EnableBreakpointSite(BreakpointSite *bp_site) {
-  Error error;
+Status ProcessGDBRemote::EnableBreakpointSite(BreakpointSite *bp_site) {
+  Status error;
   assert(bp_site != NULL);
 
   // Get logging info
@@ -3072,8 +3072,8 @@ Error ProcessGDBRemote::EnableBreakpoint
   return EnableSoftwareBreakpoint(bp_site);
 }
 
-Error ProcessGDBRemote::DisableBreakpointSite(BreakpointSite *bp_site) {
-  Error error;
+Status ProcessGDBRemote::DisableBreakpointSite(BreakpointSite *bp_site) {
+  Status error;
   assert(bp_site != NULL);
   addr_t addr = bp_site->GetLoadAddress();
   user_id_t site_id = bp_site->GetID();
@@ -3141,8 +3141,8 @@ static GDBStoppointType GetGDBStoppointT
     return eWatchpointWrite;
 }
 
-Error ProcessGDBRemote::EnableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessGDBRemote::EnableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   if (wp) {
     user_id_t watchID = wp->GetID();
     addr_t addr = wp->GetLoadAddress();
@@ -3178,8 +3178,8 @@ Error ProcessGDBRemote::EnableWatchpoint
   return error;
 }
 
-Error ProcessGDBRemote::DisableWatchpoint(Watchpoint *wp, bool notify) {
-  Error error;
+Status ProcessGDBRemote::DisableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
   if (wp) {
     user_id_t watchID = wp->GetID();
 
@@ -3231,8 +3231,8 @@ void ProcessGDBRemote::Clear() {
   m_thread_list.Clear();
 }
 
-Error ProcessGDBRemote::DoSignal(int signo) {
-  Error error;
+Status ProcessGDBRemote::DoSignal(int signo) {
+  Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   if (log)
     log->Printf("ProcessGDBRemote::DoSignal (signal = %d)", signo);
@@ -3242,15 +3242,15 @@ Error ProcessGDBRemote::DoSignal(int sig
   return error;
 }
 
-Error ProcessGDBRemote::EstablishConnectionIfNeeded(
-    const ProcessInfo &process_info) {
+Status
+ProcessGDBRemote::EstablishConnectionIfNeeded(const ProcessInfo &process_info) {
   // Make sure we aren't already connected?
   if (m_gdb_comm.IsConnected())
-    return Error();
+    return Status();
 
   PlatformSP platform_sp(GetTarget().GetPlatform());
   if (platform_sp && !platform_sp->IsHost())
-    return Error("Lost debug server connection");
+    return Status("Lost debug server connection");
 
   auto error = LaunchAndConnectToDebugserver(process_info);
   if (error.Fail()) {
@@ -3277,11 +3277,11 @@ static bool SetCloexecFlag(int fd) {
 }
 #endif
 
-Error ProcessGDBRemote::LaunchAndConnectToDebugserver(
+Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
     const ProcessInfo &process_info) {
   using namespace std::placeholders; // For _1, _2, etc.
 
-  Error error;
+  Status error;
   if (m_debugserver_pid == LLDB_INVALID_PROCESS_ID) {
     // If we locate debugserver, keep that located version around
     static FileSpec g_debugserver_file_spec;
@@ -3739,30 +3739,30 @@ bool ProcessGDBRemote::NewThreadNotifyBr
   return false;
 }
 
-Error ProcessGDBRemote::UpdateAutomaticSignalFiltering() {
+Status ProcessGDBRemote::UpdateAutomaticSignalFiltering() {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   LLDB_LOG(log, "Check if need to update ignored signals");
 
   // QPassSignals package is not supported by the server,
   // there is no way we can ignore any signals on server side.
   if (!m_gdb_comm.GetQPassSignalsSupported())
-    return Error();
+    return Status();
 
   // No signals, nothing to send.
   if (m_unix_signals_sp == nullptr)
-    return Error();
+    return Status();
 
   // Signals' version hasn't changed, no need to send anything.
   uint64_t new_signals_version = m_unix_signals_sp->GetVersion();
   if (new_signals_version == m_last_signals_version) {
     LLDB_LOG(log, "Signals' version hasn't changed. version={0}",
              m_last_signals_version);
-    return Error();
+    return Status();
   }
 
   auto signals_to_ignore =
       m_unix_signals_sp->GetFilteredSignals(false, false, false);
-  Error error = m_gdb_comm.SendSignalsToIgnore(signals_to_ignore);
+  Status error = m_gdb_comm.SendSignalsToIgnore(signals_to_ignore);
 
   LLDB_LOG(log,
            "Signals' version changed. old version={0}, new version={1}, "
@@ -3820,11 +3820,11 @@ DynamicLoader *ProcessGDBRemote::GetDyna
   return m_dyld_ap.get();
 }
 
-Error ProcessGDBRemote::SendEventData(const char *data) {
+Status ProcessGDBRemote::SendEventData(const char *data) {
   int return_value;
   bool was_supported;
 
-  Error error;
+  Status error;
 
   return_value = m_gdb_comm.SendLaunchEventDataPacket(data, &was_supported);
   if (return_value != 0) {
@@ -3995,7 +3995,7 @@ StructuredData::ObjectSP ProcessGDBRemot
   return object_sp;
 }
 
-Error ProcessGDBRemote::ConfigureStructuredData(
+Status ProcessGDBRemote::ConfigureStructuredData(
     const ConstString &type_name, const StructuredData::ObjectSP &config_sp) {
   return m_gdb_comm.ConfigureRemoteStructuredData(type_name, config_sp);
 }
@@ -4332,7 +4332,7 @@ bool ProcessGDBRemote::GetGDBServerRegis
 
   // request the target xml file
   std::string raw;
-  lldb_private::Error lldberr;
+  lldb_private::Status lldberr;
   if (!comm.ReadExtFeature(ConstString("features"), ConstString("target.xml"),
                            raw, lldberr)) {
     return false;
@@ -4424,10 +4424,10 @@ bool ProcessGDBRemote::GetGDBServerRegis
   return m_register_info.GetNumRegisters() > 0;
 }
 
-Error ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
+Status ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
   // Make sure LLDB has an XML parser it can use first
   if (!XMLDocument::XMLEnabled())
-    return Error(0, ErrorType::eErrorTypeGeneric);
+    return Status(0, ErrorType::eErrorTypeGeneric);
 
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS);
   if (log)
@@ -4441,11 +4441,11 @@ Error ProcessGDBRemote::GetLoadedModuleL
 
     // request the loaded library list
     std::string raw;
-    lldb_private::Error lldberr;
+    lldb_private::Status lldberr;
 
     if (!comm.ReadExtFeature(ConstString("libraries-svr4"), ConstString(""),
                              raw, lldberr))
-      return Error(0, ErrorType::eErrorTypeGeneric);
+      return Status(0, ErrorType::eErrorTypeGeneric);
 
     // parse the xml file in memory
     if (log)
@@ -4453,11 +4453,11 @@ Error ProcessGDBRemote::GetLoadedModuleL
     XMLDocument doc;
 
     if (!doc.ParseMemory(raw.c_str(), raw.size(), "noname.xml"))
-      return Error(0, ErrorType::eErrorTypeGeneric);
+      return Status(0, ErrorType::eErrorTypeGeneric);
 
     XMLNode root_element = doc.GetRootElement("library-list-svr4");
     if (!root_element)
-      return Error();
+      return Status();
 
     // main link map structure
     llvm::StringRef main_lm = root_element.GetAttributeValue("main-lm");
@@ -4528,22 +4528,22 @@ Error ProcessGDBRemote::GetLoadedModuleL
 
     // request the loaded library list
     std::string raw;
-    lldb_private::Error lldberr;
+    lldb_private::Status lldberr;
 
     if (!comm.ReadExtFeature(ConstString("libraries"), ConstString(""), raw,
                              lldberr))
-      return Error(0, ErrorType::eErrorTypeGeneric);
+      return Status(0, ErrorType::eErrorTypeGeneric);
 
     if (log)
       log->Printf("parsing: %s", raw.c_str());
     XMLDocument doc;
 
     if (!doc.ParseMemory(raw.c_str(), raw.size(), "noname.xml"))
-      return Error(0, ErrorType::eErrorTypeGeneric);
+      return Status(0, ErrorType::eErrorTypeGeneric);
 
     XMLNode root_element = doc.GetRootElement("library-list");
     if (!root_element)
-      return Error();
+      return Status();
 
     root_element.ForEachChildElementWithName(
         "library", [log, &list](const XMLNode &library) -> bool {
@@ -4584,10 +4584,10 @@ Error ProcessGDBRemote::GetLoadedModuleL
       log->Printf("found %" PRId32 " modules in total",
                   (int)list.m_list.size());
   } else {
-    return Error(0, ErrorType::eErrorTypeGeneric);
+    return Status(0, ErrorType::eErrorTypeGeneric);
   }
 
-  return Error();
+  return Status();
 }
 
 lldb::ModuleSP ProcessGDBRemote::LoadModuleAtAddress(const FileSpec &file,
@@ -4686,15 +4686,15 @@ size_t ProcessGDBRemote::LoadModules() {
   return LoadModules(module_list);
 }
 
-Error ProcessGDBRemote::GetFileLoadAddress(const FileSpec &file,
-                                           bool &is_loaded,
-                                           lldb::addr_t &load_addr) {
+Status ProcessGDBRemote::GetFileLoadAddress(const FileSpec &file,
+                                            bool &is_loaded,
+                                            lldb::addr_t &load_addr) {
   is_loaded = false;
   load_addr = LLDB_INVALID_ADDRESS;
 
   std::string file_path = file.GetPath(false);
   if (file_path.empty())
-    return Error("Empty file name specified");
+    return Status("Empty file name specified");
 
   StreamString packet;
   packet.PutCString("qFileLoadAddress:");
@@ -4704,27 +4704,28 @@ Error ProcessGDBRemote::GetFileLoadAddre
   if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetString(), response,
                                               false) !=
       GDBRemoteCommunication::PacketResult::Success)
-    return Error("Sending qFileLoadAddress packet failed");
+    return Status("Sending qFileLoadAddress packet failed");
 
   if (response.IsErrorResponse()) {
     if (response.GetError() == 1) {
       // The file is not loaded into the inferior
       is_loaded = false;
       load_addr = LLDB_INVALID_ADDRESS;
-      return Error();
+      return Status();
     }
 
-    return Error(
+    return Status(
         "Fetching file load address from remote server returned an error");
   }
 
   if (response.IsNormalResponse()) {
     is_loaded = true;
     load_addr = response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS);
-    return Error();
+    return Status();
   }
 
-  return Error("Unknown error happened during sending the load address packet");
+  return Status(
+      "Unknown error happened during sending the load address packet");
 }
 
 void ProcessGDBRemote::ModulesDidLoad(ModuleList &module_list) {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Thu May 11 23:51:55 2017
@@ -30,7 +30,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StringExtractor.h"
 #include "lldb/Utility/StringList.h"
@@ -78,25 +78,25 @@ public:
   //------------------------------------------------------------------
   // Creating a new process, or attaching to an existing one
   //------------------------------------------------------------------
-  Error WillLaunch(Module *module) override;
+  Status WillLaunch(Module *module) override;
 
-  Error DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
+  Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
 
   void DidLaunch() override;
 
-  Error WillAttachToProcessWithID(lldb::pid_t pid) override;
+  Status WillAttachToProcessWithID(lldb::pid_t pid) override;
 
-  Error WillAttachToProcessWithName(const char *process_name,
-                                    bool wait_for_launch) override;
+  Status WillAttachToProcessWithName(const char *process_name,
+                                     bool wait_for_launch) override;
 
-  Error DoConnectRemote(Stream *strm, llvm::StringRef remote_url) override;
+  Status DoConnectRemote(Stream *strm, llvm::StringRef remote_url) override;
 
-  Error WillLaunchOrAttach();
+  Status WillLaunchOrAttach();
 
-  Error DoAttachToProcessWithID(lldb::pid_t pid,
-                                const ProcessAttachInfo &attach_info) override;
+  Status DoAttachToProcessWithID(lldb::pid_t pid,
+                                 const ProcessAttachInfo &attach_info) override;
 
-  Error
+  Status
   DoAttachToProcessWithName(const char *process_name,
                             const ProcessAttachInfo &attach_info) override;
 
@@ -112,19 +112,19 @@ public:
   //------------------------------------------------------------------
   // Process Control
   //------------------------------------------------------------------
-  Error WillResume() override;
+  Status WillResume() override;
 
-  Error DoResume() override;
+  Status DoResume() override;
 
-  Error DoHalt(bool &caused_stop) override;
+  Status DoHalt(bool &caused_stop) override;
 
-  Error DoDetach(bool keep_stopped) override;
+  Status DoDetach(bool keep_stopped) override;
 
   bool DetachRequiresHalt() override { return true; }
 
-  Error DoSignal(int signal) override;
+  Status DoSignal(int signal) override;
 
-  Error DoDestroy() override;
+  Status DoDestroy() override;
 
   void RefreshStateAfterStop() override;
 
@@ -143,41 +143,41 @@ public:
   // Process Memory
   //------------------------------------------------------------------
   size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                      Error &error) override;
+                      Status &error) override;
 
   size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                       Error &error) override;
+                       Status &error) override;
 
   lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions,
-                                Error &error) override;
+                                Status &error) override;
 
-  Error GetMemoryRegionInfo(lldb::addr_t load_addr,
-                            MemoryRegionInfo &region_info) override;
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &region_info) override;
 
-  Error DoDeallocateMemory(lldb::addr_t ptr) override;
+  Status DoDeallocateMemory(lldb::addr_t ptr) override;
 
   //------------------------------------------------------------------
   // Process STDIO
   //------------------------------------------------------------------
-  size_t PutSTDIN(const char *buf, size_t buf_size, Error &error) override;
+  size_t PutSTDIN(const char *buf, size_t buf_size, Status &error) override;
 
   //----------------------------------------------------------------------
   // Process Breakpoints
   //----------------------------------------------------------------------
-  Error EnableBreakpointSite(BreakpointSite *bp_site) override;
+  Status EnableBreakpointSite(BreakpointSite *bp_site) override;
 
-  Error DisableBreakpointSite(BreakpointSite *bp_site) override;
+  Status DisableBreakpointSite(BreakpointSite *bp_site) override;
 
   //----------------------------------------------------------------------
   // Process Watchpoints
   //----------------------------------------------------------------------
-  Error EnableWatchpoint(Watchpoint *wp, bool notify = true) override;
+  Status EnableWatchpoint(Watchpoint *wp, bool notify = true) override;
 
-  Error DisableWatchpoint(Watchpoint *wp, bool notify = true) override;
+  Status DisableWatchpoint(Watchpoint *wp, bool notify = true) override;
 
-  Error GetWatchpointSupportInfo(uint32_t &num) override;
+  Status GetWatchpointSupportInfo(uint32_t &num) override;
 
-  Error GetWatchpointSupportInfo(uint32_t &num, bool &after) override;
+  Status GetWatchpointSupportInfo(uint32_t &num, bool &after) override;
 
   bool StartNoticingNewThreads() override;
 
@@ -185,7 +185,7 @@ public:
 
   GDBRemoteCommunicationClient &GetGDBRemote() { return m_gdb_comm; }
 
-  Error SendEventData(const char *data) override;
+  Status SendEventData(const char *data) override;
 
   //----------------------------------------------------------------------
   // Override DidExit so we can disconnect from the remote GDB server
@@ -207,8 +207,8 @@ public:
 
   size_t LoadModules() override;
 
-  Error GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
-                           lldb::addr_t &load_addr) override;
+  Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
+                            lldb::addr_t &load_addr) override;
 
   void ModulesDidLoad(ModuleList &module_list) override;
 
@@ -216,7 +216,7 @@ public:
   GetLoadedDynamicLibrariesInfos(lldb::addr_t image_list_address,
                                  lldb::addr_t image_count) override;
 
-  Error
+  Status
   ConfigureStructuredData(const ConstString &type_name,
                           const StructuredData::ObjectSP &config_sp) override;
 
@@ -315,9 +315,9 @@ protected:
   bool UpdateThreadList(ThreadList &old_thread_list,
                         ThreadList &new_thread_list) override;
 
-  Error EstablishConnectionIfNeeded(const ProcessInfo &process_info);
+  Status EstablishConnectionIfNeeded(const ProcessInfo &process_info);
 
-  Error LaunchAndConnectToDebugserver(const ProcessInfo &process_info);
+  Status LaunchAndConnectToDebugserver(const ProcessInfo &process_info);
 
   void KillDebugserverProcess();
 
@@ -379,7 +379,7 @@ protected:
 
   void DidLaunchOrAttach(ArchSpec &process_arch);
 
-  Error ConnectToDebugserver(llvm::StringRef host_port);
+  Status ConnectToDebugserver(llvm::StringRef host_port);
 
   const char *GetDispatchQueueNameForThread(lldb::addr_t thread_dispatch_qaddr,
                                             std::string &dispatch_queue_name);
@@ -390,14 +390,14 @@ protected:
   bool GetGDBServerRegisterInfo(ArchSpec &arch);
 
   // Query remote GDBServer for a detailed loaded library list
-  Error GetLoadedModuleList(LoadedModuleInfoList &);
+  Status GetLoadedModuleList(LoadedModuleInfoList &);
 
   lldb::ModuleSP LoadModuleAtAddress(const FileSpec &file,
                                      lldb::addr_t link_map,
                                      lldb::addr_t base_addr,
                                      bool value_is_offset);
 
-  Error UpdateAutomaticSignalFiltering() override;
+  Status UpdateAutomaticSignalFiltering() override;
 
 private:
   //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Thu May 11 23:51:55 2017
@@ -97,8 +97,8 @@ bool ProcessMachCore::CanDebug(lldb::Tar
     // ModuleSpecList::FindMatchingModuleSpec
     // enforces a strict arch mach.
     ModuleSpec core_module_spec(m_core_file);
-    Error error(ModuleList::GetSharedModule(core_module_spec, m_core_module_sp,
-                                            NULL, NULL, NULL));
+    Status error(ModuleList::GetSharedModule(core_module_spec, m_core_module_sp,
+                                             NULL, NULL, NULL));
 
     if (m_core_module_sp) {
       ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
@@ -143,7 +143,7 @@ bool ProcessMachCore::GetDynamicLoaderAd
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER |
                                                   LIBLLDB_LOG_PROCESS));
   llvm::MachO::mach_header header;
-  Error error;
+  Status error;
   if (DoReadMemory(addr, &header, sizeof(header), error) != sizeof(header))
     return false;
   if (header.magic == llvm::MachO::MH_CIGAM ||
@@ -200,10 +200,10 @@ bool ProcessMachCore::GetDynamicLoaderAd
 //----------------------------------------------------------------------
 // Process Control
 //----------------------------------------------------------------------
-Error ProcessMachCore::DoLoadCore() {
+Status ProcessMachCore::DoLoadCore() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER |
                                                   LIBLLDB_LOG_PROCESS));
-  Error error;
+  Status error;
   if (!m_core_module_sp) {
     error.SetErrorString("invalid core module");
     return error;
@@ -514,7 +514,7 @@ void ProcessMachCore::RefreshStateAfterS
   // SetThreadStopInfo (m_last_stop_packet);
 }
 
-Error ProcessMachCore::DoDestroy() { return Error(); }
+Status ProcessMachCore::DoDestroy() { return Status(); }
 
 //------------------------------------------------------------------
 // Process Queries
@@ -528,14 +528,14 @@ bool ProcessMachCore::WarnBeforeDetach()
 // Process Memory
 //------------------------------------------------------------------
 size_t ProcessMachCore::ReadMemory(addr_t addr, void *buf, size_t size,
-                                   Error &error) {
+                                   Status &error) {
   // Don't allow the caching that lldb_private::Process::ReadMemory does
   // since in core files we have it all cached our our core file anyway.
   return DoReadMemory(addr, buf, size, error);
 }
 
 size_t ProcessMachCore::DoReadMemory(addr_t addr, void *buf, size_t size,
-                                     Error &error) {
+                                     Status &error) {
   ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
   size_t bytes_read = 0;
 
@@ -589,8 +589,8 @@ size_t ProcessMachCore::DoReadMemory(add
   return bytes_read;
 }
 
-Error ProcessMachCore::GetMemoryRegionInfo(addr_t load_addr,
-                                           MemoryRegionInfo &region_info) {
+Status ProcessMachCore::GetMemoryRegionInfo(addr_t load_addr,
+                                            MemoryRegionInfo &region_info) {
   region_info.Clear();
   const VMRangeToPermissions::Entry *permission_entry =
       m_core_range_infos.FindEntryThatContainsOrFollows(load_addr);
@@ -617,7 +617,7 @@ Error ProcessMachCore::GetMemoryRegionIn
       region_info.SetExecutable(MemoryRegionInfo::eNo);
       region_info.SetMapped(MemoryRegionInfo::eNo);
     }
-    return Error();
+    return Status();
   }
 
   region_info.GetRange().SetRangeBase(load_addr);
@@ -626,7 +626,7 @@ Error ProcessMachCore::GetMemoryRegionIn
   region_info.SetWritable(MemoryRegionInfo::eNo);
   region_info.SetExecutable(MemoryRegionInfo::eNo);
   region_info.SetMapped(MemoryRegionInfo::eNo);
-  return Error();
+  return Status();
 }
 
 void ProcessMachCore::Clear() { m_thread_list.Clear(); }

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h Thu May 11 23:51:55 2017
@@ -19,7 +19,7 @@
 // Project includes
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 class ThreadKDP;
 
@@ -54,7 +54,7 @@ public:
   //------------------------------------------------------------------
   // Creating a new process, or attaching to an existing one
   //------------------------------------------------------------------
-  lldb_private::Error DoLoadCore() override;
+  lldb_private::Status DoLoadCore() override;
 
   lldb_private::DynamicLoader *GetDynamicLoader() override;
 
@@ -68,7 +68,7 @@ public:
   //------------------------------------------------------------------
   // Process Control
   //------------------------------------------------------------------
-  lldb_private::Error DoDestroy() override;
+  lldb_private::Status DoDestroy() override;
 
   void RefreshStateAfterStop() override;
 
@@ -83,12 +83,12 @@ public:
   // Process Memory
   //------------------------------------------------------------------
   size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                    lldb_private::Error &error) override;
+                    lldb_private::Status &error) override;
 
   size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                      lldb_private::Error &error) override;
+                      lldb_private::Status &error) override;
 
-  lldb_private::Error
+  lldb_private::Status
   GetMemoryRegionInfo(lldb::addr_t load_addr,
                       lldb_private::MemoryRegionInfo &region_info) override;
 

Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.cpp Thu May 11 23:51:55 2017
@@ -45,7 +45,7 @@ MinidumpParser::Create(const lldb::DataB
   }
 
   const MinidumpDirectory *directory = nullptr;
-  Error error;
+  Status error;
   llvm::ArrayRef<uint8_t> directory_data(
       data_buf_sp->GetBytes() + directory_list_offset,
       sizeof(MinidumpDirectory) * header->streams_count);
@@ -126,7 +126,7 @@ MinidumpParser::GetThreadContextWow64(co
     return {};
 
   const TEB64 *wow64teb;
-  Error error = consumeObject(teb_mem, wow64teb);
+  Status error = consumeObject(teb_mem, wow64teb);
   if (error.Fail())
     return {};
 

Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h Thu May 11 23:51:55 2017
@@ -17,7 +17,7 @@
 // Other libraries and framework includes
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"

Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.cpp Thu May 11 23:51:55 2017
@@ -19,7 +19,7 @@ using namespace minidump;
 
 const MinidumpHeader *MinidumpHeader::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpHeader *header = nullptr;
-  Error error = consumeObject(data, header);
+  Status error = consumeObject(data, header);
 
   const MinidumpHeaderConstants signature =
       static_cast<const MinidumpHeaderConstants>(
@@ -45,7 +45,7 @@ lldb_private::minidump::parseMinidumpStr
   std::string result;
 
   const uint32_t *source_length;
-  Error error = consumeObject(data, source_length);
+  Status error = consumeObject(data, source_length);
   if (error.Fail() || *source_length > data.size() || *source_length % 2 != 0)
     return llvm::None;
 
@@ -71,7 +71,7 @@ lldb_private::minidump::parseMinidumpStr
 // MinidumpThread
 const MinidumpThread *MinidumpThread::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpThread *thread = nullptr;
-  Error error = consumeObject(data, thread);
+  Status error = consumeObject(data, thread);
   if (error.Fail())
     return nullptr;
 
@@ -81,7 +81,7 @@ const MinidumpThread *MinidumpThread::Pa
 llvm::ArrayRef<MinidumpThread>
 MinidumpThread::ParseThreadList(llvm::ArrayRef<uint8_t> &data) {
   const llvm::support::ulittle32_t *thread_count;
-  Error error = consumeObject(data, thread_count);
+  Status error = consumeObject(data, thread_count);
   if (error.Fail() || *thread_count * sizeof(MinidumpThread) > data.size())
     return {};
 
@@ -93,7 +93,7 @@ MinidumpThread::ParseThreadList(llvm::Ar
 const MinidumpSystemInfo *
 MinidumpSystemInfo::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpSystemInfo *system_info;
-  Error error = consumeObject(data, system_info);
+  Status error = consumeObject(data, system_info);
   if (error.Fail())
     return nullptr;
 
@@ -103,7 +103,7 @@ MinidumpSystemInfo::Parse(llvm::ArrayRef
 // MinidumpMiscInfo
 const MinidumpMiscInfo *MinidumpMiscInfo::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpMiscInfo *misc_info;
-  Error error = consumeObject(data, misc_info);
+  Status error = consumeObject(data, misc_info);
   if (error.Fail())
     return nullptr;
 
@@ -147,7 +147,7 @@ lldb::pid_t LinuxProcStatus::GetPid() co
 // Module stuff
 const MinidumpModule *MinidumpModule::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpModule *module = nullptr;
-  Error error = consumeObject(data, module);
+  Status error = consumeObject(data, module);
   if (error.Fail())
     return nullptr;
 
@@ -158,7 +158,7 @@ llvm::ArrayRef<MinidumpModule>
 MinidumpModule::ParseModuleList(llvm::ArrayRef<uint8_t> &data) {
 
   const llvm::support::ulittle32_t *modules_count;
-  Error error = consumeObject(data, modules_count);
+  Status error = consumeObject(data, modules_count);
   if (error.Fail() || *modules_count * sizeof(MinidumpModule) > data.size())
     return {};
 
@@ -170,7 +170,7 @@ MinidumpModule::ParseModuleList(llvm::Ar
 const MinidumpExceptionStream *
 MinidumpExceptionStream::Parse(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpExceptionStream *exception_stream = nullptr;
-  Error error = consumeObject(data, exception_stream);
+  Status error = consumeObject(data, exception_stream);
   if (error.Fail())
     return nullptr;
 
@@ -180,7 +180,7 @@ MinidumpExceptionStream::Parse(llvm::Arr
 llvm::ArrayRef<MinidumpMemoryDescriptor>
 MinidumpMemoryDescriptor::ParseMemoryList(llvm::ArrayRef<uint8_t> &data) {
   const llvm::support::ulittle32_t *mem_ranges_count;
-  Error error = consumeObject(data, mem_ranges_count);
+  Status error = consumeObject(data, mem_ranges_count);
   if (error.Fail() ||
       *mem_ranges_count * sizeof(MinidumpMemoryDescriptor) > data.size())
     return {};
@@ -193,7 +193,7 @@ MinidumpMemoryDescriptor::ParseMemoryLis
 std::pair<llvm::ArrayRef<MinidumpMemoryDescriptor64>, uint64_t>
 MinidumpMemoryDescriptor64::ParseMemory64List(llvm::ArrayRef<uint8_t> &data) {
   const llvm::support::ulittle64_t *mem_ranges_count;
-  Error error = consumeObject(data, mem_ranges_count);
+  Status error = consumeObject(data, mem_ranges_count);
   if (error.Fail() ||
       *mem_ranges_count * sizeof(MinidumpMemoryDescriptor64) > data.size())
     return {};
@@ -213,7 +213,7 @@ MinidumpMemoryDescriptor64::ParseMemory6
 std::vector<const MinidumpMemoryInfo *>
 MinidumpMemoryInfo::ParseMemoryInfoList(llvm::ArrayRef<uint8_t> &data) {
   const MinidumpMemoryInfoListHeader *header;
-  Error error = consumeObject(data, header);
+  Status error = consumeObject(data, header);
   if (error.Fail() ||
       header->size_of_header < sizeof(MinidumpMemoryInfoListHeader) ||
       header->size_of_entry < sizeof(MinidumpMemoryInfo))

Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.h (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpTypes.h Thu May 11 23:51:55 2017
@@ -13,7 +13,7 @@
 // Project includes
 
 // Other libraries and framework includes
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/BitmaskEnum.h"
@@ -158,8 +158,8 @@ enum class MinidumpMiscInfoFlags : uint3
 };
 
 template <typename T>
-Error consumeObject(llvm::ArrayRef<uint8_t> &Buffer, const T *&Object) {
-  Error error;
+Status consumeObject(llvm::ArrayRef<uint8_t> &Buffer, const T *&Object) {
+  Status error;
   if (Buffer.size() < sizeof(T)) {
     error.SetErrorString("Insufficient buffer!");
     return error;

Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp Thu May 11 23:51:55 2017
@@ -113,8 +113,8 @@ void ProcessMinidump::Terminate() {
   PluginManager::UnregisterPlugin(ProcessMinidump::CreateInstance);
 }
 
-Error ProcessMinidump::DoLoadCore() {
-  Error error;
+Status ProcessMinidump::DoLoadCore() {
+  Status error;
 
   m_thread_list = m_minidump_parser.GetThreads();
   m_active_exception = m_minidump_parser.GetExceptionStream();
@@ -141,7 +141,7 @@ ConstString ProcessMinidump::GetPluginNa
 
 uint32_t ProcessMinidump::GetPluginVersion() { return 1; }
 
-Error ProcessMinidump::DoDestroy() { return Error(); }
+Status ProcessMinidump::DoDestroy() { return Status(); }
 
 void ProcessMinidump::RefreshStateAfterStop() {
   if (!m_active_exception)
@@ -184,14 +184,14 @@ bool ProcessMinidump::IsAlive() { return
 bool ProcessMinidump::WarnBeforeDetach() const { return false; }
 
 size_t ProcessMinidump::ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                   Error &error) {
+                                   Status &error) {
   // Don't allow the caching that lldb_private::Process::ReadMemory does
   // since we have it all cached in our dump file anyway.
   return DoReadMemory(addr, buf, size, error);
 }
 
 size_t ProcessMinidump::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                                     Error &error) {
+                                     Status &error) {
 
   llvm::ArrayRef<uint8_t> mem = m_minidump_parser.GetMemory(addr, size);
   if (mem.empty()) {
@@ -215,9 +215,9 @@ ArchSpec ProcessMinidump::GetArchitectur
   return ArchSpec(triple);
 }
 
-Error ProcessMinidump::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                           MemoryRegionInfo &range_info) {
-  Error error;
+Status ProcessMinidump::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                            MemoryRegionInfo &range_info) {
+  Status error;
   auto info = m_minidump_parser.GetMemoryRegionInfo(load_addr);
   if (!info) {
     error.SetErrorString("No valid MemoryRegionInfo found!");
@@ -278,7 +278,7 @@ void ProcessMinidump::ReadModuleList() {
 
     const auto file_spec = FileSpec(name.getValue(), true);
     ModuleSpec module_spec = file_spec;
-    Error error;
+    Status error;
     lldb::ModuleSP module_sp = GetTarget().GetSharedModule(module_spec, &error);
     if (!module_sp || error.Fail()) {
       continue;

Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.h Thu May 11 23:51:55 2017
@@ -19,7 +19,7 @@
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/Support/Format.h"
 #include "llvm/Support/raw_ostream.h"
@@ -53,7 +53,7 @@ public:
   bool CanDebug(lldb::TargetSP target_sp,
                 bool plugin_specified_by_name) override;
 
-  Error DoLoadCore() override;
+  Status DoLoadCore() override;
 
   DynamicLoader *GetDynamicLoader() override;
 
@@ -61,7 +61,7 @@ public:
 
   uint32_t GetPluginVersion() override;
 
-  Error DoDestroy() override;
+  Status DoDestroy() override;
 
   void RefreshStateAfterStop() override;
 
@@ -70,15 +70,15 @@ public:
   bool WarnBeforeDetach() const override;
 
   size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                    Error &error) override;
+                    Status &error) override;
 
   size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                      Error &error) override;
+                      Status &error) override;
 
   ArchSpec GetArchitecture();
 
-  Error GetMemoryRegionInfo(lldb::addr_t load_addr,
-                            MemoryRegionInfo &range_info) override;
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &range_info) override;
 
   bool GetProcessInfo(ProcessInstanceInfo &info) override;
 

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Thu May 11 23:51:55 2017
@@ -723,7 +723,7 @@ bool ScriptInterpreterPython::ExecuteOne
         // 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::ExecuteOne
   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::SetBreakpo
       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::SetBreakp
 }
 
 // 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::SetBreakp
   // 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::SetWatchpo
   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:
 
 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::LoadPluginModul
 
 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::GenerateTy
   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::Get
 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::RunScriptF
 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::RunScriptF
 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::RunScriptF
 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::RunScriptF
 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, c
 
 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::SynchronicityHa
 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::RunScriptB
 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");

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h Thu May 11 23:51:55 2017
@@ -161,11 +161,11 @@ public:
       void *ret_value,
       const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
 
-  lldb_private::Error ExecuteMultipleLines(
+  lldb_private::Status ExecuteMultipleLines(
       const char *in_string,
       const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
 
-  Error
+  Status
   ExportFunctionDefinitionToInterpreter(StringList &function_def) override;
 
   bool GenerateTypeScriptFunction(StringList &input, std::string &output,
@@ -229,12 +229,12 @@ public:
 
   StructuredData::ObjectSP
   LoadPluginModule(const FileSpec &file_spec,
-                   lldb_private::Error &error) override;
+                   lldb_private::Status &error) override;
 
   StructuredData::DictionarySP
   GetDynamicSettings(StructuredData::ObjectSP plugin_module_sp, Target *target,
                      const char *setting_name,
-                     lldb_private::Error &error) override;
+                     lldb_private::Status &error) override;
 
   size_t CalculateNumChildren(const StructuredData::ObjectSP &implementor,
                               uint32_t max) override;
@@ -262,21 +262,21 @@ public:
   RunScriptBasedCommand(const char *impl_function, const char *args,
                         ScriptedCommandSynchronicity synchronicity,
                         lldb_private::CommandReturnObject &cmd_retobj,
-                        Error &error,
+                        Status &error,
                         const lldb_private::ExecutionContext &exe_ctx) override;
 
   bool
   RunScriptBasedCommand(StructuredData::GenericSP impl_obj_sp, const char *args,
                         ScriptedCommandSynchronicity synchronicity,
                         lldb_private::CommandReturnObject &cmd_retobj,
-                        Error &error,
+                        Status &error,
                         const lldb_private::ExecutionContext &exe_ctx) override;
 
-  Error GenerateFunction(const char *signature,
-                         const StringList &input) override;
+  Status GenerateFunction(const char *signature,
+                          const StringList &input) override;
 
-  Error GenerateBreakpointCommandCallbackData(StringList &input,
-                                              std::string &output) override;
+  Status GenerateBreakpointCommandCallbackData(StringList &input,
+                                               std::string &output) override;
 
   bool GenerateWatchpointCommandCallbackData(StringList &input,
                                              std::string &output) override;
@@ -332,23 +332,23 @@ public:
   }
 
   bool RunScriptFormatKeyword(const char *impl_function, Process *process,
-                              std::string &output, Error &error) override;
+                              std::string &output, Status &error) override;
 
   bool RunScriptFormatKeyword(const char *impl_function, Thread *thread,
-                              std::string &output, Error &error) override;
+                              std::string &output, Status &error) override;
 
   bool RunScriptFormatKeyword(const char *impl_function, Target *target,
-                              std::string &output, Error &error) override;
+                              std::string &output, Status &error) override;
 
   bool RunScriptFormatKeyword(const char *impl_function, StackFrame *frame,
-                              std::string &output, Error &error) override;
+                              std::string &output, Status &error) override;
 
   bool RunScriptFormatKeyword(const char *impl_function, ValueObject *value,
-                              std::string &output, Error &error) override;
+                              std::string &output, Status &error) override;
 
   bool
   LoadScriptingModule(const char *filename, bool can_reload, bool init_session,
-                      lldb_private::Error &error,
+                      lldb_private::Status &error,
                       StructuredData::ObjectSP *module_sp = nullptr) override;
 
   bool IsReservedWord(const char *word) override;
@@ -364,14 +364,14 @@ public:
                                           CommandReturnObject &result) override;
 
   /// Set the callback body text into the callback for the breakpoint.
-  Error SetBreakpointCommandCallback(BreakpointOptions *bp_options,
-                                     const char *callback_body) override;
+  Status SetBreakpointCommandCallback(BreakpointOptions *bp_options,
+                                      const char *callback_body) override;
 
   void SetBreakpointCommandCallbackFunction(BreakpointOptions *bp_options,
                                             const char *function_name) override;
 
   /// This one is for deserialization:
-  Error SetBreakpointCommandCallback(
+  Status SetBreakpointCommandCallback(
       BreakpointOptions *bp_options,
       std::unique_ptr<BreakpointOptions::CommandData> &data_up) override;
 

Modified: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp (original)
+++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp Thu May 11 23:51:55 2017
@@ -209,7 +209,7 @@ public:
 
   using OperationCreationFunc =
       std::function<FilterRuleSP(bool accept, size_t attribute_index,
-                                 const std::string &op_arg, Error &error)>;
+                                 const std::string &op_arg, Status &error)>;
 
   static void RegisterOperation(const ConstString &operation,
                                 const OperationCreationFunc &creation_func) {
@@ -218,7 +218,7 @@ public:
 
   static FilterRuleSP CreateRule(bool match_accepts, size_t attribute,
                                  const ConstString &operation,
-                                 const std::string &op_arg, Error &error) {
+                                 const std::string &op_arg, Status &error) {
     // Find the creation func for this type of filter rule.
     auto map = GetCreationFuncMap();
     auto find_it = map.find(operation);
@@ -304,7 +304,8 @@ protected:
 
 private:
   static FilterRuleSP CreateOperation(bool accept, size_t attribute_index,
-                                      const std::string &op_arg, Error &error) {
+                                      const std::string &op_arg,
+                                      Status &error) {
     // We treat the op_arg as a regex.  Validate it.
     if (op_arg.empty()) {
       error.SetErrorString("regex filter type requires a regex "
@@ -358,7 +359,8 @@ protected:
 
 private:
   static FilterRuleSP CreateOperation(bool accept, size_t attribute_index,
-                                      const std::string &op_arg, Error &error) {
+                                      const std::string &op_arg,
+                                      Status &error) {
     if (op_arg.empty()) {
       error.SetErrorString("exact match filter type requires an "
                            "argument containing the text that must "
@@ -524,9 +526,9 @@ public:
     m_filter_rules.clear();
   }
 
-  Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
-                       ExecutionContext *execution_context) override {
-    Error error;
+  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+                        ExecutionContext *execution_context) override {
+    Status error;
 
     const int short_option = m_getopt_table[option_idx].val;
     switch (short_option) {
@@ -664,8 +666,8 @@ public:
   bool GetBroadcastEvents() const { return m_broadcast_events; }
 
 private:
-  Error ParseFilterRule(llvm::StringRef rule_text) {
-    Error error;
+  Status ParseFilterRule(llvm::StringRef rule_text) {
+    Status error;
 
     if (rule_text.empty()) {
       error.SetErrorString("invalid rule_text");
@@ -899,7 +901,7 @@ protected:
     // Send configuration to the feature by way of the process.
     // Construct the options we will use.
     auto config_sp = m_options_sp->BuildConfigurationData(m_enable);
-    const Error error =
+    const Status error =
         process_sp->ConfigureStructuredData(GetDarwinLogTypeName(), config_sp);
 
     // Report results.
@@ -1040,7 +1042,7 @@ public:
   }
 };
 
-EnableOptionsSP ParseAutoEnableOptions(Error &error, Debugger &debugger) {
+EnableOptionsSP ParseAutoEnableOptions(Status &error, Debugger &debugger) {
   // We are abusing the options data model here so that we can parse
   // options without requiring the Debugger instance.
 
@@ -1212,7 +1214,7 @@ void StructuredDataDarwinLog::HandleArri
   // to inspect, including showing backtraces.
 }
 
-static void SetErrorWithJSON(Error &error, const char *message,
+static void SetErrorWithJSON(Status &error, const char *message,
                              StructuredData::Object &object) {
   if (!message) {
     error.SetErrorString("Internal error: message not set.");
@@ -1226,9 +1228,9 @@ static void SetErrorWithJSON(Error &erro
   error.SetErrorStringWithFormat("%s: %s", message, object_stream.GetData());
 }
 
-Error StructuredDataDarwinLog::GetDescription(
+Status StructuredDataDarwinLog::GetDescription(
     const StructuredData::ObjectSP &object_sp, lldb_private::Stream &stream) {
-  Error error;
+  Status error;
 
   if (!object_sp) {
     error.SetErrorString("No structured data.");
@@ -1483,9 +1485,9 @@ void StructuredDataDarwinLog::DebuggerIn
   }
 }
 
-Error StructuredDataDarwinLog::FilterLaunchInfo(ProcessLaunchInfo &launch_info,
-                                                Target *target) {
-  Error error;
+Status StructuredDataDarwinLog::FilterLaunchInfo(ProcessLaunchInfo &launch_info,
+                                                 Target *target) {
+  Status error;
 
   // If we're not debugging this launched process, there's nothing for us
   // to do here.
@@ -1991,7 +1993,7 @@ void StructuredDataDarwinLog::EnableNow(
 
   // We can run it directly.
   // Send configuration to the feature by way of the process.
-  const Error error =
+  const Status error =
       process_sp->ConfigureStructuredData(GetDarwinLogTypeName(), config_sp);
 
   // Report results.

Modified: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h (original)
+++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h Thu May 11 23:51:55 2017
@@ -67,8 +67,8 @@ public:
       Process &process, const ConstString &type_name,
       const StructuredData::ObjectSP &object_sp) override;
 
-  Error GetDescription(const StructuredData::ObjectSP &object_sp,
-                       lldb_private::Stream &stream) override;
+  Status GetDescription(const StructuredData::ObjectSP &object_sp,
+                        lldb_private::Stream &stream) override;
 
   bool GetEnabled(const ConstString &type_name) const override;
 
@@ -96,7 +96,8 @@ private:
                                          lldb::user_id_t break_id,
                                          lldb::user_id_t break_loc_id);
 
-  static Error FilterLaunchInfo(ProcessLaunchInfo &launch_info, Target *target);
+  static Status FilterLaunchInfo(ProcessLaunchInfo &launch_info,
+                                 Target *target);
 
   // -------------------------------------------------------------------------
   // Internal helper methods used by friend classes

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp Thu May 11 23:51:55 2017
@@ -8,8 +8,8 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Symbol/TypeList.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Thu May 11 23:51:55 2017
@@ -202,7 +202,7 @@ bool DWARFDebugInfoEntry::Extract(Symbol
   const uint32_t cu_end_offset = cu->GetNextCompileUnitOffset();
   lldb::offset_t offset = *offset_ptr;
   //  if (offset >= cu_end_offset)
-  //      Log::Error("DIE at offset 0x%8.8x is beyond the end of the current
+  //      Log::Status("DIE at offset 0x%8.8x is beyond the end of the current
   //      compile unit (0x%8.8x)", m_offset, cu_end_offset);
   if ((offset < cu_end_offset) && debug_info_data.ValidOffset(offset)) {
     m_offset = offset;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu May 11 23:51:55 2017
@@ -1599,7 +1599,7 @@ void SymbolFileDWARF::UpdateExternalModu
             dwo_module_spec.GetArchitecture() =
                 m_obj_file->GetModule()->GetArchitecture();
             // printf ("Loading dwo = '%s'\n", dwo_path);
-            Error error = ModuleList::GetSharedModule(
+            Status error = ModuleList::GetSharedModule(
                 dwo_module_spec, module_sp, NULL, NULL, NULL);
             if (!module_sp) {
               GetObjectFile()->GetModule()->ReportWarning(
@@ -1637,7 +1637,7 @@ SymbolFileDWARF::GlobalVariableMap &Symb
               if (var_sp && !var_sp->GetLocationIsConstantValueData()) {
                 const DWARFExpression &location = var_sp->LocationExpression();
                 Value location_result;
-                Error error;
+                Status error;
                 if (location.Evaluate(nullptr, nullptr, nullptr,
                                       LLDB_INVALID_ADDRESS, nullptr, nullptr,
                                       location_result, &error)) {

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp Thu May 11 23:51:55 2017
@@ -150,7 +150,7 @@ lldb::addr_t AppleGetItemInfoHandler::Se
 
     if (!m_get_item_info_impl_code.get()) {
       if (g_get_item_info_function_code != NULL) {
-        Error error;
+        Status error;
         m_get_item_info_impl_code.reset(
             exe_ctx.GetTargetRef().GetUtilityFunctionForLanguage(
                 g_get_item_info_function_code, eLanguageTypeObjC,
@@ -177,7 +177,7 @@ lldb::addr_t AppleGetItemInfoHandler::Se
       }
 
       // Next make the runner function for our implementation utility function.
-      Error error;
+      Status error;
 
       TypeSystem *type_system =
           thread.GetProcess()->GetTarget().GetScratchTypeSystemForLanguage(
@@ -230,7 +230,8 @@ lldb::addr_t AppleGetItemInfoHandler::Se
 AppleGetItemInfoHandler::GetItemInfoReturnInfo
 AppleGetItemInfoHandler::GetItemInfo(Thread &thread, uint64_t item,
                                      addr_t page_to_free,
-                                     uint64_t page_to_free_size, Error &error) {
+                                     uint64_t page_to_free_size,
+                                     Status &error) {
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.h (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.h Thu May 11 23:51:55 2017
@@ -20,7 +20,7 @@
 // Project includes
 #include "lldb/Expression/UtilityFunction.h"
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-public.h"
 
 // This class will insert a UtilityFunction into the inferior process for
@@ -95,7 +95,7 @@ public:
   GetItemInfoReturnInfo GetItemInfo(Thread &thread, lldb::addr_t item,
                                     lldb::addr_t page_to_free,
                                     uint64_t page_to_free_size,
-                                    lldb_private::Error &error);
+                                    lldb_private::Status &error);
 
   void Detach();
 

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp Thu May 11 23:51:55 2017
@@ -155,7 +155,7 @@ lldb::addr_t AppleGetPendingItemsHandler
 
     if (!m_get_pending_items_impl_code.get()) {
       if (g_get_pending_items_function_code != NULL) {
-        Error error;
+        Status error;
         m_get_pending_items_impl_code.reset(
             exe_ctx.GetTargetRef().GetUtilityFunctionForLanguage(
                 g_get_pending_items_function_code, eLanguageTypeObjC,
@@ -183,7 +183,7 @@ lldb::addr_t AppleGetPendingItemsHandler
       }
 
       // Next make the runner function for our implementation utility function.
-      Error error;
+      Status error;
       ClangASTContext *clang_ast_context =
           thread.GetProcess()->GetTarget().GetScratchClangASTContext();
       CompilerType get_pending_items_return_type =
@@ -234,7 +234,7 @@ AppleGetPendingItemsHandler::GetPendingI
 AppleGetPendingItemsHandler::GetPendingItems(Thread &thread, addr_t queue,
                                              addr_t page_to_free,
                                              uint64_t page_to_free_size,
-                                             Error &error) {
+                                             Status &error) {
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h Thu May 11 23:51:55 2017
@@ -20,7 +20,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-public.h"
 
 // This class will insert a UtilityFunction into the inferior process for
@@ -99,7 +99,7 @@ public:
   GetPendingItemsReturnInfo GetPendingItems(Thread &thread, lldb::addr_t queue,
                                             lldb::addr_t page_to_free,
                                             uint64_t page_to_free_size,
-                                            lldb_private::Error &error);
+                                            lldb_private::Status &error);
 
   void Detach();
 

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp Thu May 11 23:51:55 2017
@@ -167,7 +167,7 @@ AppleGetQueuesHandler::SetupGetQueuesFun
 
     if (!m_get_queues_impl_code_up.get()) {
       if (g_get_current_queues_function_code != NULL) {
-        Error error;
+        Status error;
         m_get_queues_impl_code_up.reset(
             exe_ctx.GetTargetRef().GetUtilityFunctionForLanguage(
                 g_get_current_queues_function_code, eLanguageTypeC,
@@ -202,7 +202,7 @@ AppleGetQueuesHandler::SetupGetQueuesFun
         thread.GetProcess()->GetTarget().GetScratchClangASTContext();
     CompilerType get_queues_return_type =
         clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
-    Error error;
+    Status error;
     get_queues_caller = m_get_queues_impl_code_up->MakeFunctionCaller(
         get_queues_return_type, get_queues_arglist, thread_sp, error);
     if (error.Fail() || get_queues_caller == nullptr) {
@@ -237,7 +237,7 @@ AppleGetQueuesHandler::SetupGetQueuesFun
 AppleGetQueuesHandler::GetQueuesReturnInfo
 AppleGetQueuesHandler::GetCurrentQueues(Thread &thread, addr_t page_to_free,
                                         uint64_t page_to_free_size,
-                                        Error &error) {
+                                        Status &error) {
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.h Thu May 11 23:51:55 2017
@@ -19,7 +19,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-public.h"
 
 // This class will insert a UtilityFunction into the inferior process for
@@ -92,7 +92,7 @@ public:
   GetQueuesReturnInfo GetCurrentQueues(Thread &thread,
                                        lldb::addr_t page_to_free,
                                        uint64_t page_to_free_size,
-                                       lldb_private::Error &error);
+                                       lldb_private::Status &error);
 
   void Detach();
 

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp Thu May 11 23:51:55 2017
@@ -161,7 +161,7 @@ lldb::addr_t AppleGetThreadItemInfoHandl
     // First stage is to make the ClangUtility to hold our injected function:
 
     if (!m_get_thread_item_info_impl_code.get()) {
-      Error error;
+      Status error;
       if (g_get_thread_item_info_function_code != NULL) {
         m_get_thread_item_info_impl_code.reset(
             exe_ctx.GetTargetRef().GetUtilityFunctionForLanguage(
@@ -243,7 +243,7 @@ AppleGetThreadItemInfoHandler::GetThread
                                                  tid_t thread_id,
                                                  addr_t page_to_free,
                                                  uint64_t page_to_free_size,
-                                                 Error &error) {
+                                                 Status &error) {
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.h Thu May 11 23:51:55 2017
@@ -20,7 +20,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-public.h"
 
 // This class will insert a UtilityFunction into the inferior process for
@@ -93,7 +93,7 @@ public:
                                                 lldb::tid_t thread_id,
                                                 lldb::addr_t page_to_free,
                                                 uint64_t page_to_free_size,
-                                                lldb_private::Error &error);
+                                                lldb_private::Status &error);
 
   void Detach();
 

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp Thu May 11 23:51:55 2017
@@ -129,7 +129,7 @@ SystemRuntimeMacOSX::GetQueueNameFromThr
     // deref it to get the address of the dispatch_queue_t structure for this
     // thread's
     // queue.
-    Error error;
+    Status error;
     addr_t dispatch_queue_addr =
         m_process->ReadPointerFromMemory(dispatch_qaddr, error);
     if (error.Success()) {
@@ -164,7 +164,7 @@ SystemRuntimeMacOSX::GetQueueNameFromThr
 lldb::addr_t SystemRuntimeMacOSX::GetLibdispatchQueueAddressFromThreadQAddress(
     addr_t dispatch_qaddr) {
   addr_t libdispatch_queue_t_address = LLDB_INVALID_ADDRESS;
-  Error error;
+  Status error;
   libdispatch_queue_t_address =
       m_process->ReadPointerFromMemory(dispatch_qaddr, error);
   if (!error.Success()) {
@@ -181,7 +181,7 @@ lldb::QueueKind SystemRuntimeMacOSX::Get
   ReadLibdispatchOffsets();
   if (m_libdispatch_offsets.IsValid() &&
       m_libdispatch_offsets.dqo_version >= 4) {
-    Error error;
+    Status error;
     uint64_t width = m_process->ReadUnsignedIntegerFromMemory(
         dispatch_queue_addr + m_libdispatch_offsets.dqo_width,
         m_libdispatch_offsets.dqo_width_size, 0, error);
@@ -252,7 +252,7 @@ SystemRuntimeMacOSX::GetQueueIDFromThrea
     // deref it to get the address of the dispatch_queue_t structure for this
     // thread's
     // queue.
-    Error error;
+    Status error;
     uint64_t dispatch_queue_addr =
         m_process->ReadPointerFromMemory(dispatch_qaddr, error);
     if (error.Success()) {
@@ -313,7 +313,7 @@ void SystemRuntimeMacOSX::ReadLibdispatc
                      m_process->GetByteOrder(),
                      m_process->GetAddressByteSize());
 
-  Error error;
+  Status error;
   if (m_process->ReadMemory(m_dispatch_queue_offsets_addr, memory_buffer,
                             sizeof(memory_buffer),
                             error) == sizeof(memory_buffer)) {
@@ -361,7 +361,7 @@ void SystemRuntimeMacOSX::ReadLibpthread
     DataExtractor data(memory_buffer, sizeof(memory_buffer),
                        m_process->GetByteOrder(),
                        m_process->GetAddressByteSize());
-    Error error;
+    Status error;
     if (m_process->ReadMemory(m_libpthread_layout_offsets_addr, memory_buffer,
                               sizeof(memory_buffer),
                               error) == sizeof(memory_buffer)) {
@@ -416,7 +416,7 @@ void SystemRuntimeMacOSX::ReadLibdispatc
         Address dti_struct_addr;
         if (m_process->GetTarget().ResolveLoadAddress (m_dispatch_tsd_indexes_addr, dti_struct_addr))
         {
-            Error error;
+            Status error;
             uint16_t version = m_process->GetTarget().ReadUnsignedIntegerFromMemory (dti_struct_addr, false, 2, UINT16_MAX, error);
             if (error.Success() && dti_version != UINT16_MAX)
             {
@@ -470,7 +470,7 @@ ThreadSP SystemRuntimeMacOSX::GetExtende
   ThreadSP originating_thread_sp;
   if (BacktraceRecordingHeadersInitialized() &&
       type == ConstString("libdispatch")) {
-    Error error;
+    Status error;
 
     // real_thread is either an actual, live thread (in which case we need to
     // call into
@@ -532,7 +532,7 @@ SystemRuntimeMacOSX::GetExtendedBacktrac
   AppleGetItemInfoHandler::GetItemInfoReturnInfo ret;
   ThreadSP cur_thread_sp(
       m_process->GetThreadList().GetExpressionExecutionThread());
-  Error error;
+  Status error;
   ret = m_get_item_info_handler.GetItemInfo(*cur_thread_sp.get(), item_ref,
                                             m_page_to_free, m_page_to_free_size,
                                             error);
@@ -667,7 +667,7 @@ bool SystemRuntimeMacOSX::BacktraceRecor
       queue_info_data_offset_address != LLDB_INVALID_ADDRESS &&
       item_info_version_address != LLDB_INVALID_ADDRESS &&
       item_info_data_offset_address != LLDB_INVALID_ADDRESS) {
-    Error error;
+    Status error;
     m_lib_backtrace_recording_info.queue_info_version =
         m_process->ReadUnsignedIntegerFromMemory(queue_info_version_address, 2,
                                                  0, error);
@@ -715,7 +715,7 @@ void SystemRuntimeMacOSX::PopulateQueueL
     ThreadSP cur_thread_sp(
         m_process->GetThreadList().GetExpressionExecutionThread());
     if (cur_thread_sp) {
-      Error error;
+      Status error;
       queue_info_pointer = m_get_queues_handler.GetCurrentQueues(
           *cur_thread_sp.get(), m_page_to_free, m_page_to_free_size, error);
       m_page_to_free = LLDB_INVALID_ADDRESS;
@@ -783,7 +783,7 @@ SystemRuntimeMacOSX::GetPendingItemRefsF
   ThreadSP cur_thread_sp(
       m_process->GetThreadList().GetExpressionExecutionThread());
   if (cur_thread_sp) {
-    Error error;
+    Status error;
     pending_items_pointer = m_get_pending_items_handler.GetPendingItems(
         *cur_thread_sp.get(), queue, m_page_to_free, m_page_to_free_size,
         error);
@@ -877,7 +877,7 @@ void SystemRuntimeMacOSX::CompleteQueueI
 
   ThreadSP cur_thread_sp(
       m_process->GetThreadList().GetExpressionExecutionThread());
-  Error error;
+  Status error;
   ret = m_get_item_info_handler.GetItemInfo(*cur_thread_sp.get(), item_ref,
                                             m_page_to_free, m_page_to_free_size,
                                             error);
@@ -910,7 +910,7 @@ void SystemRuntimeMacOSX::CompleteQueueI
 void SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(
     lldb::addr_t queues_buffer, uint64_t queues_buffer_size, uint64_t count,
     lldb_private::QueueList &queue_list) {
-  Error error;
+  Status error;
   DataBufferHeap data(queues_buffer_size, 0);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
   if (m_process->ReadMemory(queues_buffer, data.GetBytes(), queues_buffer_size,

Modified: lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp Thu May 11 23:51:55 2017
@@ -21,8 +21,8 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -37,7 +37,7 @@ bool UnwindAssemblyInstEmulation::GetNon
   std::vector<uint8_t> function_text(range.GetByteSize());
   ProcessSP process_sp(thread.GetProcess());
   if (process_sp) {
-    Error error;
+    Status error;
     const bool prefer_file_cache = true;
     if (process_sp->GetTarget().ReadMemory(
             range.GetBaseAddress(), prefer_file_cache, function_text.data(),

Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp Thu May 11 23:51:55 2017
@@ -26,7 +26,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/UnwindAssembly.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -54,7 +54,7 @@ bool UnwindAssembly_x86::GetNonCallSiteU
     return false;
   const bool prefer_file_cache = true;
   std::vector<uint8_t> function_text(func.GetByteSize());
-  Error error;
+  Status error;
   if (process_sp->GetTarget().ReadMemory(
           func.GetBaseAddress(), prefer_file_cache, function_text.data(),
           func.GetByteSize(), error) == func.GetByteSize()) {
@@ -161,7 +161,7 @@ bool UnwindAssembly_x86::AugmentUnwindPl
       return false;
     const bool prefer_file_cache = true;
     std::vector<uint8_t> function_text(func.GetByteSize());
-    Error error;
+    Status error;
     if (process_sp->GetTarget().ReadMemory(
             func.GetBaseAddress(), prefer_file_cache, function_text.data(),
             func.GetByteSize(), error) == func.GetByteSize()) {
@@ -192,7 +192,7 @@ bool UnwindAssembly_x86::GetFastUnwindPl
   if (process_sp) {
     Target &target(process_sp->GetTarget());
     const bool prefer_file_cache = true;
-    Error error;
+    Status error;
     if (target.ReadMemory(func.GetBaseAddress(), prefer_file_cache,
                           opcode_data.data(), 4, error) == 4) {
       uint8_t i386_push_mov[] = {0x55, 0x89, 0xe5};
@@ -228,7 +228,7 @@ bool UnwindAssembly_x86::FirstNonPrologu
 
   const bool prefer_file_cache = true;
   std::vector<uint8_t> function_text(func.GetByteSize());
-  Error error;
+  Status error;
   if (target->ReadMemory(func.GetBaseAddress(), prefer_file_cache,
                          function_text.data(), func.GetByteSize(),
                          error) == func.GetByteSize()) {

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu May 11 23:51:55 2017
@@ -6433,7 +6433,7 @@ CompilerType ClangASTContext::GetChildCo
             if (base_class->isVirtual()) {
               bool handled = false;
               if (valobj) {
-                Error err;
+                Status err;
                 AddressType addr_type = eAddressTypeInvalid;
                 lldb::addr_t vtable_ptr_addr =
                     valobj->GetCPPVTableAddress(addr_type);
@@ -8827,7 +8827,7 @@ ClangASTContext::ConvertStringToFloatVal
       if (dst_size >= byte_size) {
         Scalar scalar = ap_float.bitcastToAPInt().zextOrTrunc(
             llvm::NextPowerOf2(byte_size) * 8);
-        lldb_private::Error get_data_error;
+        lldb_private::Status get_data_error;
         if (scalar.GetAsMemoryData(dst, byte_size,
                                    lldb_private::endian::InlHostByteOrder(),
                                    get_data_error))
@@ -9396,7 +9396,7 @@ void ClangASTContext::DumpSummary(lldb::
         buf.back() = '\0';
         size_t bytes_read;
         size_t total_cstr_len = 0;
-        Error error;
+        Status error;
         while ((bytes_read = process->ReadMemory(pointer_address, &buf.front(),
                                                  buf.size(), error)) > 0) {
           const size_t len = strlen((const char *)&buf.front());

Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original)
+++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Thu May 11 23:51:55 2017
@@ -272,7 +272,7 @@ void CompactUnwindInfo::ScanIndex(const
         return;
       m_section_contents_if_encrypted.reset(
           new DataBufferHeap(m_section_sp->GetByteSize(), 0));
-      Error error;
+      Status error;
       if (process_sp->ReadMemory(
               m_section_sp->GetLoadBaseAddress(&process_sp->GetTarget()),
               m_section_contents_if_encrypted->GetBytes(),
@@ -836,7 +836,7 @@ bool CompactUnwindInfo::CreateUnwindPlan
         if (process_sp) {
           Address subl_payload_addr(function_info.valid_range_offset_start, sl);
           subl_payload_addr.Slide(offset_to_subl_insn);
-          Error error;
+          Status error;
           uint64_t large_stack_size = process_sp->ReadUnsignedIntegerFromMemory(
               subl_payload_addr.GetLoadAddress(&target), 4, 0, error);
           if (large_stack_size != 0 && error.Success()) {
@@ -1100,7 +1100,7 @@ bool CompactUnwindInfo::CreateUnwindPlan
         if (process_sp) {
           Address subl_payload_addr(function_info.valid_range_offset_start, sl);
           subl_payload_addr.Slide(offset_to_subl_insn);
-          Error error;
+          Status error;
           uint64_t large_stack_size = process_sp->ReadUnsignedIntegerFromMemory(
               subl_payload_addr.GetLoadAddress(&target), 4, 0, error);
           if (large_stack_size != 0 && error.Success()) {

Modified: lldb/trunk/source/Symbol/CompilerType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompilerType.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompilerType.cpp (original)
+++ lldb/trunk/source/Symbol/CompilerType.cpp Thu May 11 23:51:55 2017
@@ -1004,7 +1004,7 @@ bool CompilerType::ReadFromMemory(lldb_p
       if (exe_ctx)
         process = exe_ctx->GetProcessPtr();
       if (process) {
-        Error error;
+        Status error;
         return process->ReadMemory(addr, dst, byte_size, error) == byte_size;
       }
     }
@@ -1039,7 +1039,7 @@ bool CompilerType::WriteToMemory(lldb_pr
       if (exe_ctx)
         process = exe_ctx->GetProcessPtr();
       if (process) {
-        Error error;
+        Status error;
         return process->WriteMemory(addr, new_value.GetData(), byte_size,
                                     error) == byte_size;
       }

Modified: lldb/trunk/source/Symbol/JavaASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/JavaASTContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/JavaASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/JavaASTContext.cpp Thu May 11 23:51:55 2017
@@ -137,7 +137,7 @@ public:
     if (m_dynamic_type_id.Evaluate(exe_ctx->GetBestExecutionContextScope(),
                                    nullptr, nullptr, 0, &obj_load_address,
                                    nullptr, result, nullptr)) {
-      Error error;
+      Status error;
 
       lldb::addr_t type_id_addr = result.GetScalar().UInt();
       lldb::ProcessSP process_sp = exe_ctx->GetProcessSP();
@@ -303,7 +303,7 @@ public:
     if (!m_length_expression.IsValid())
       return UINT32_MAX;
 
-    Error error;
+    Status error;
     ValueObjectSP address_obj = value_obj->AddressOf(error);
     if (error.Fail())
       return UINT32_MAX;

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Thu May 11 23:51:55 2017
@@ -454,7 +454,7 @@ DataBufferSP ObjectFile::ReadMemory(cons
   DataBufferSP data_sp;
   if (process_sp) {
     std::unique_ptr<DataBufferHeap> data_ap(new DataBufferHeap(byte_size, 0));
-    Error error;
+    Status error;
     const size_t bytes_read = process_sp->ReadMemory(
         addr, data_ap->GetBytes(), data_ap->GetByteSize(), error);
     if (bytes_read == byte_size)
@@ -493,7 +493,7 @@ size_t ObjectFile::ReadSectionData(const
   if (IsInMemory()) {
     ProcessSP process_sp(m_process_wp.lock());
     if (process_sp) {
-      Error error;
+      Status error;
       const addr_t base_load_addr =
           section->GetLoadBaseAddress(&process_sp->GetTarget());
       if (base_load_addr != LLDB_INVALID_ADDRESS)
@@ -654,17 +654,17 @@ ConstString ObjectFile::GetNextSynthetic
   return ConstString(ss.GetString());
 }
 
-Error ObjectFile::LoadInMemory(Target &target, bool set_pc) {
-  Error error;
+Status ObjectFile::LoadInMemory(Target &target, bool set_pc) {
+  Status error;
   ProcessSP process = target.CalculateProcess();
   if (!process)
-    return Error("No Process");
+    return Status("No Process");
   if (set_pc && !GetEntryPointAddress().IsValid())
-    return Error("No entry address in object file");
+    return Status("No entry address in object file");
 
   SectionList *section_list = GetSectionList();
   if (!section_list)
-      return Error("No section in object file");
+    return Status("No section in object file");
   size_t section_count = section_list->GetNumSections(0);
   for (size_t i = 0; i < section_count; ++i) {
     SectionSP section_sp = section_list->GetSectionAtIndex(i);

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu May 11 23:51:55 2017
@@ -735,7 +735,7 @@ LineEntry SymbolContext::GetFunctionStar
 
 bool SymbolContext::GetAddressRangeFromHereToEndLine(uint32_t end_line,
                                                      AddressRange &range,
-                                                     Error &error) {
+                                                     Status &error) {
   if (!line_entry.IsValid()) {
     error.SetErrorString("Symbol context has no line table.");
     return false;

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Thu May 11 23:51:55 2017
@@ -410,7 +410,7 @@ bool Type::ReadFromMemory(ExecutionConte
       if (exe_ctx) {
         Process *process = exe_ctx->GetProcessPtr();
         if (process) {
-          Error error;
+          Status error;
           return exe_ctx->GetProcessPtr()->ReadMemory(addr, dst, byte_size,
                                                       error) == byte_size;
         }

Modified: lldb/trunk/source/Symbol/Variable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Variable.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Variable.cpp (original)
+++ lldb/trunk/source/Symbol/Variable.cpp Thu May 11 23:51:55 2017
@@ -330,11 +330,11 @@ bool Variable::IsInScope(StackFrame *fra
   return false;
 }
 
-Error Variable::GetValuesForVariableExpressionPath(
+Status Variable::GetValuesForVariableExpressionPath(
     llvm::StringRef variable_expr_path, ExecutionContextScope *scope,
     GetVariableCallback callback, void *baton, VariableList &variable_list,
     ValueObjectList &valobj_list) {
-  Error error;
+  Status error;
   if (!callback || variable_expr_path.empty()) {
     error.SetErrorString("unknown error");
     return error;
@@ -350,7 +350,7 @@ Error Variable::GetValuesForVariableExpr
       return error;
     }
     for (uint32_t i = 0; i < valobj_list.GetSize();) {
-      Error tmp_error;
+      Status tmp_error;
       ValueObjectSP valobj_sp(
           valobj_list.GetValueObjectAtIndex(i)->Dereference(tmp_error));
       if (tmp_error.Fail()) {
@@ -368,7 +368,7 @@ Error Variable::GetValuesForVariableExpr
         valobj_list);
     if (error.Success()) {
       for (uint32_t i = 0; i < valobj_list.GetSize();) {
-        Error tmp_error;
+        Status tmp_error;
         ValueObjectSP valobj_sp(
             valobj_list.GetValueObjectAtIndex(i)->AddressOf(tmp_error));
         if (tmp_error.Fail()) {

Modified: lldb/trunk/source/Target/Language.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Language.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Language.cpp (original)
+++ lldb/trunk/source/Target/Language.cpp Thu May 11 23:51:55 2017
@@ -387,7 +387,7 @@ DumpValueObjectOptions::DeclPrintingHelp
   return nullptr;
 }
 
-LazyBool Language::IsLogicalTrue(ValueObject &valobj, Error &error) {
+LazyBool Language::IsLogicalTrue(ValueObject &valobj, Status &error) {
   return eLazyBoolCalculate;
 }
 

Modified: lldb/trunk/source/Target/LanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/LanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/LanguageRuntime.cpp Thu May 11 23:51:55 2017
@@ -89,7 +89,8 @@ ExceptionSearchFilter::DoCopyForBreakpoi
 }
 
 SearchFilter *ExceptionSearchFilter::CreateFromStructuredData(
-    Target &target, const StructuredData::Dictionary &data_dict, Error &error) {
+    Target &target, const StructuredData::Dictionary &data_dict,
+    Status &error) {
   SearchFilter *result = nullptr;
   return result;
 }

Modified: lldb/trunk/source/Target/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Memory.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Memory.cpp (original)
+++ lldb/trunk/source/Target/Memory.cpp Thu May 11 23:51:55 2017
@@ -129,7 +129,8 @@ bool MemoryCache::RemoveInvalidRange(lld
   return false;
 }
 
-size_t MemoryCache::Read(addr_t addr, void *dst, size_t dst_len, Error &error) {
+size_t MemoryCache::Read(addr_t addr, void *dst, size_t dst_len,
+                         Status &error) {
   size_t bytes_left = dst_len;
 
   // Check the L1 cache for a range that contain the entire memory read.
@@ -344,7 +345,7 @@ void AllocatedMemoryCache::Clear() {
 
 AllocatedMemoryCache::AllocatedBlockSP
 AllocatedMemoryCache::AllocatePage(uint32_t byte_size, uint32_t permissions,
-                                   uint32_t chunk_size, Error &error) {
+                                   uint32_t chunk_size, Status &error) {
   AllocatedBlockSP block_sp;
   const size_t page_size = 4096;
   const size_t num_pages = (byte_size + page_size - 1) / page_size;
@@ -370,7 +371,7 @@ AllocatedMemoryCache::AllocatePage(uint3
 
 lldb::addr_t AllocatedMemoryCache::AllocateMemory(size_t byte_size,
                                                   uint32_t permissions,
-                                                  Error &error) {
+                                                  Status &error) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
   addr_t addr = LLDB_INVALID_ADDRESS;

Modified: lldb/trunk/source/Target/ModuleCache.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ModuleCache.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ModuleCache.cpp (original)
+++ lldb/trunk/source/Target/ModuleCache.cpp Thu May 11 23:51:55 2017
@@ -54,7 +54,7 @@ private:
   FileSpec m_file_spec;
 
 public:
-  ModuleLock(const FileSpec &root_dir_spec, const UUID &uuid, Error &error);
+  ModuleLock(const FileSpec &root_dir_spec, const UUID &uuid, Status &error);
   void Delete();
 };
 
@@ -64,7 +64,7 @@ static FileSpec JoinPath(const FileSpec
   return result_spec;
 }
 
-static Error MakeDirectory(const FileSpec &dir_path) {
+static Status MakeDirectory(const FileSpec &dir_path) {
   namespace fs = llvm::sys::fs;
 
   return fs::create_directories(dir_path.GetPath(), true, fs::perms::owner_all);
@@ -92,7 +92,7 @@ void DeleteExistingModule(const FileSpec
   if (!module_uuid.IsValid())
     return;
 
-  Error error;
+  Status error;
   ModuleLock lock(root_dir_spec, module_uuid, error);
   if (error.Fail()) {
     if (log)
@@ -125,17 +125,17 @@ void DecrementRefExistingModule(const Fi
   llvm::sys::fs::remove(symfile_spec.GetPath());
 }
 
-Error CreateHostSysRootModuleLink(const FileSpec &root_dir_spec,
-                                  const char *hostname,
-                                  const FileSpec &platform_module_spec,
-                                  const FileSpec &local_module_spec,
-                                  bool delete_existing) {
+Status CreateHostSysRootModuleLink(const FileSpec &root_dir_spec,
+                                   const char *hostname,
+                                   const FileSpec &platform_module_spec,
+                                   const FileSpec &local_module_spec,
+                                   bool delete_existing) {
   const auto sysroot_module_path_spec =
       JoinPath(JoinPath(root_dir_spec, hostname),
                platform_module_spec.GetPath().c_str());
   if (sysroot_module_path_spec.Exists()) {
     if (!delete_existing)
-      return Error();
+      return Status();
 
     DecrementRefExistingModule(root_dir_spec, sysroot_module_path_spec);
   }
@@ -152,7 +152,7 @@ Error CreateHostSysRootModuleLink(const
 } // namespace
 
 ModuleLock::ModuleLock(const FileSpec &root_dir_spec, const UUID &uuid,
-                       Error &error) {
+                       Status &error) {
   const auto lock_dir_spec = JoinPath(root_dir_spec, kLockDirName);
   error = MakeDirectory(lock_dir_spec);
   if (error.Fail())
@@ -184,9 +184,9 @@ void ModuleLock::Delete() {
 
 /////////////////////////////////////////////////////////////////////////
 
-Error ModuleCache::Put(const FileSpec &root_dir_spec, const char *hostname,
-                       const ModuleSpec &module_spec, const FileSpec &tmp_file,
-                       const FileSpec &target_file) {
+Status ModuleCache::Put(const FileSpec &root_dir_spec, const char *hostname,
+                        const ModuleSpec &module_spec, const FileSpec &tmp_file,
+                        const FileSpec &target_file) {
   const auto module_spec_dir =
       GetModuleDirectory(root_dir_spec, module_spec.GetUUID());
   const auto module_file_path =
@@ -196,27 +196,27 @@ Error ModuleCache::Put(const FileSpec &r
   const auto err_code =
       llvm::sys::fs::rename(tmp_file_path, module_file_path.GetPath());
   if (err_code)
-    return Error("Failed to rename file %s to %s: %s", tmp_file_path.c_str(),
-                 module_file_path.GetPath().c_str(),
-                 err_code.message().c_str());
+    return Status("Failed to rename file %s to %s: %s", tmp_file_path.c_str(),
+                  module_file_path.GetPath().c_str(),
+                  err_code.message().c_str());
 
   const auto error = CreateHostSysRootModuleLink(
       root_dir_spec, hostname, target_file, module_file_path, true);
   if (error.Fail())
-    return Error("Failed to create link to %s: %s",
-                 module_file_path.GetPath().c_str(), error.AsCString());
-  return Error();
+    return Status("Failed to create link to %s: %s",
+                  module_file_path.GetPath().c_str(), error.AsCString());
+  return Status();
 }
 
-Error ModuleCache::Get(const FileSpec &root_dir_spec, const char *hostname,
-                       const ModuleSpec &module_spec,
-                       ModuleSP &cached_module_sp, bool *did_create_ptr) {
+Status ModuleCache::Get(const FileSpec &root_dir_spec, const char *hostname,
+                        const ModuleSpec &module_spec,
+                        ModuleSP &cached_module_sp, bool *did_create_ptr) {
   const auto find_it =
       m_loaded_modules.find(module_spec.GetUUID().GetAsString());
   if (find_it != m_loaded_modules.end()) {
     cached_module_sp = (*find_it).second.lock();
     if (cached_module_sp)
-      return Error();
+      return Status();
     m_loaded_modules.erase(find_it);
   }
 
@@ -226,10 +226,10 @@ Error ModuleCache::Get(const FileSpec &r
       module_spec_dir, module_spec.GetFileSpec().GetFilename().AsCString());
 
   if (!module_file_path.Exists())
-    return Error("Module %s not found", module_file_path.GetPath().c_str());
+    return Status("Module %s not found", module_file_path.GetPath().c_str());
   if (module_file_path.GetByteSize() != module_spec.GetObjectSize())
-    return Error("Module %s has invalid file size",
-                 module_file_path.GetPath().c_str());
+    return Status("Module %s has invalid file size",
+                  module_file_path.GetPath().c_str());
 
   // We may have already cached module but downloaded from an another host - in
   // this case let's create a link to it.
@@ -237,8 +237,8 @@ Error ModuleCache::Get(const FileSpec &r
                                            module_spec.GetFileSpec(),
                                            module_file_path, false);
   if (error.Fail())
-    return Error("Failed to create link to %s: %s",
-                 module_file_path.GetPath().c_str(), error.AsCString());
+    return Status("Failed to create link to %s: %s",
+                  module_file_path.GetPath().c_str(), error.AsCString());
 
   auto cached_module_spec(module_spec);
   cached_module_spec.GetUUID().Clear(); // Clear UUID since it may contain md5
@@ -258,16 +258,16 @@ Error ModuleCache::Get(const FileSpec &r
   m_loaded_modules.insert(
       std::make_pair(module_spec.GetUUID().GetAsString(), cached_module_sp));
 
-  return Error();
+  return Status();
 }
 
-Error ModuleCache::GetAndPut(const FileSpec &root_dir_spec,
-                             const char *hostname,
-                             const ModuleSpec &module_spec,
-                             const ModuleDownloader &module_downloader,
-                             const SymfileDownloader &symfile_downloader,
-                             lldb::ModuleSP &cached_module_sp,
-                             bool *did_create_ptr) {
+Status ModuleCache::GetAndPut(const FileSpec &root_dir_spec,
+                              const char *hostname,
+                              const ModuleSpec &module_spec,
+                              const ModuleDownloader &module_downloader,
+                              const SymfileDownloader &symfile_downloader,
+                              lldb::ModuleSP &cached_module_sp,
+                              bool *did_create_ptr) {
   const auto module_spec_dir =
       GetModuleDirectory(root_dir_spec, module_spec.GetUUID());
   auto error = MakeDirectory(module_spec_dir);
@@ -276,9 +276,9 @@ Error ModuleCache::GetAndPut(const FileS
 
   ModuleLock lock(root_dir_spec, module_spec.GetUUID(), error);
   if (error.Fail())
-    return Error("Failed to lock module %s: %s",
-                 module_spec.GetUUID().GetAsString().c_str(),
-                 error.AsCString());
+    return Status("Failed to lock module %s: %s",
+                  module_spec.GetUUID().GetAsString().c_str(),
+                  error.AsCString());
 
   const auto escaped_hostname(GetEscapedHostname(hostname));
   // Check local cache for a module.
@@ -291,13 +291,13 @@ Error ModuleCache::GetAndPut(const FileS
   error = module_downloader(module_spec, tmp_download_file_spec);
   llvm::FileRemover tmp_file_remover(tmp_download_file_spec.GetPath());
   if (error.Fail())
-    return Error("Failed to download module: %s", error.AsCString());
+    return Status("Failed to download module: %s", error.AsCString());
 
   // Put downloaded file into local module cache.
   error = Put(root_dir_spec, escaped_hostname.c_str(), module_spec,
               tmp_download_file_spec, module_spec.GetFileSpec());
   if (error.Fail())
-    return Error("Failed to put module into cache: %s", error.AsCString());
+    return Status("Failed to put module into cache: %s", error.AsCString());
 
   tmp_file_remover.releaseFile();
   error = Get(root_dir_spec, escaped_hostname.c_str(), module_spec,
@@ -315,17 +315,18 @@ Error ModuleCache::GetAndPut(const FileS
     // module might
     // contain the necessary symbols and the debugging is also possible without
     // a symfile.
-    return Error();
+    return Status();
 
   error = Put(root_dir_spec, escaped_hostname.c_str(), module_spec,
               tmp_download_sym_file_spec,
               GetSymbolFileSpec(module_spec.GetFileSpec()));
   if (error.Fail())
-    return Error("Failed to put symbol file into cache: %s", error.AsCString());
+    return Status("Failed to put symbol file into cache: %s",
+                  error.AsCString());
 
   tmp_symfile_remover.releaseFile();
 
   FileSpec symfile_spec = GetSymbolFileSpec(cached_module_sp->GetFileSpec());
   cached_module_sp->SetSymbolFileFileSpec(symfile_spec);
-  return Error();
+  return Status();
 }

Modified: lldb/trunk/source/Target/ObjCLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCLanguageRuntime.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ObjCLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/ObjCLanguageRuntime.cpp Thu May 11 23:51:55 2017
@@ -250,7 +250,7 @@ ObjCLanguageRuntime::GetClassDescriptor(
 
       Process *process = exe_ctx.GetProcessPtr();
       if (process) {
-        Error error;
+        Status error;
         ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
         if (isa != LLDB_INVALID_ADDRESS)
           objc_class_sp = GetClassDescriptorFromISA(isa);
@@ -377,9 +377,9 @@ bool ObjCLanguageRuntime::ObjCExceptionP
 void ObjCLanguageRuntime::ObjCExceptionPrecondition::GetDescription(
     Stream &stream, lldb::DescriptionLevel level) {}
 
-Error ObjCLanguageRuntime::ObjCExceptionPrecondition::ConfigurePrecondition(
+Status ObjCLanguageRuntime::ObjCExceptionPrecondition::ConfigurePrecondition(
     Args &args) {
-  Error error;
+  Status error;
   if (args.GetArgumentCount() > 0)
     error.SetErrorString(
         "The ObjC Exception breakpoint doesn't support extra options.");

Modified: lldb/trunk/source/Target/PathMappingList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/PathMappingList.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/PathMappingList.cpp (original)
+++ lldb/trunk/source/Target/PathMappingList.cpp Thu May 11 23:51:55 2017
@@ -16,8 +16,8 @@
 // Project includes
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Target/PathMappingList.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/Stream.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Thu May 11 23:51:55 2017
@@ -39,9 +39,9 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/UnixSignals.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/Support/FileSystem.h"
 
@@ -170,11 +170,11 @@ void Platform::SetHostPlatform(const lld
   }
 }
 
-Error Platform::GetFileWithUUID(const FileSpec &platform_file,
-                                const UUID *uuid_ptr, FileSpec &local_file) {
+Status Platform::GetFileWithUUID(const FileSpec &platform_file,
+                                 const UUID *uuid_ptr, FileSpec &local_file) {
   // Default to the local case
   local_file = platform_file;
-  return Error();
+  return Status();
 }
 
 FileSpecList
@@ -217,11 +217,11 @@ Platform::LocateExecutableScriptingResou
 //    return PlatformSP();
 //}
 
-Error Platform::GetSharedModule(const ModuleSpec &module_spec, Process *process,
-                                ModuleSP &module_sp,
-                                const FileSpecList *module_search_paths_ptr,
-                                ModuleSP *old_module_sp_ptr,
-                                bool *did_create_ptr) {
+Status Platform::GetSharedModule(const ModuleSpec &module_spec,
+                                 Process *process, ModuleSP &module_sp,
+                                 const FileSpecList *module_search_paths_ptr,
+                                 ModuleSP *old_module_sp_ptr,
+                                 bool *did_create_ptr) {
   if (IsHost())
     return ModuleList::GetSharedModule(
         module_spec, module_sp, module_search_paths_ptr, old_module_sp_ptr,
@@ -229,7 +229,7 @@ Error Platform::GetSharedModule(const Mo
 
   return GetRemoteSharedModule(module_spec, process, module_sp,
                                [&](const ModuleSpec &spec) {
-                                 Error error = ModuleList::GetSharedModule(
+                                 Status error = ModuleList::GetSharedModule(
                                      spec, module_sp, module_search_paths_ptr,
                                      old_module_sp_ptr, did_create_ptr, false);
                                  if (error.Success() && module_sp)
@@ -267,7 +267,7 @@ PlatformSP Platform::Find(const ConstStr
   return PlatformSP();
 }
 
-PlatformSP Platform::Create(const ConstString &name, Error &error) {
+PlatformSP Platform::Create(const ConstString &name, Status &error) {
   PlatformCreateInstance create_callback = nullptr;
   lldb::PlatformSP platform_sp;
   if (name) {
@@ -295,7 +295,7 @@ PlatformSP Platform::Create(const ConstS
 }
 
 PlatformSP Platform::Create(const ArchSpec &arch, ArchSpec *platform_arch_ptr,
-                            Error &error) {
+                            Status &error) {
   lldb::PlatformSP platform_sp;
   if (arch.IsValid()) {
     // Scope for locker
@@ -540,7 +540,7 @@ FileSpec Platform::GetWorkingDirectory()
 struct RecurseCopyBaton {
   const FileSpec &dst;
   Platform *platform_ptr;
-  Error error;
+  Status error;
 };
 
 static FileSpec::EnumerateDirectoryResult
@@ -560,7 +560,7 @@ RecurseCopy_Callback(void *baton, llvm::
     FileSpec dst_dir = rc_baton->dst;
     if (!dst_dir.GetFilename())
       dst_dir.GetFilename() = src.GetLastPathComponent();
-    Error error = rc_baton->platform_ptr->MakeDirectory(
+    Status error = rc_baton->platform_ptr->MakeDirectory(
         dst_dir, lldb::eFilePermissionsDirectoryDefault);
     if (error.Fail()) {
       rc_baton->error.SetErrorStringWithFormat(
@@ -575,7 +575,8 @@ RecurseCopy_Callback(void *baton, llvm::
     // when we enumerate we can quickly fill in the filename for dst copies
     FileSpec recurse_dst;
     recurse_dst.GetDirectory().SetCString(dst_dir.GetPath().c_str());
-    RecurseCopyBaton rc_baton2 = {recurse_dst, rc_baton->platform_ptr, Error()};
+    RecurseCopyBaton rc_baton2 = {recurse_dst, rc_baton->platform_ptr,
+                                  Status()};
     FileSpec::EnumerateDirectory(src_dir_path, true, true, true,
                                  RecurseCopy_Callback, &rc_baton2);
     if (rc_baton2.error.Fail()) {
@@ -612,7 +613,7 @@ RecurseCopy_Callback(void *baton, llvm::
     FileSpec dst_file = rc_baton->dst;
     if (!dst_file.GetFilename())
       dst_file.GetFilename() = src.GetFilename();
-    Error err = rc_baton->platform_ptr->PutFile(src, dst_file);
+    Status err = rc_baton->platform_ptr->PutFile(src, dst_file);
     if (err.Fail()) {
       rc_baton->error.SetErrorString(err.AsCString());
       return FileSpec::eEnumerateDirectoryResultQuit; // got an error, bail out
@@ -629,8 +630,8 @@ RecurseCopy_Callback(void *baton, llvm::
   llvm_unreachable("Unhandled file_type!");
 }
 
-Error Platform::Install(const FileSpec &src, const FileSpec &dst) {
-  Error error;
+Status Platform::Install(const FileSpec &src, const FileSpec &dst) {
+  Status error;
 
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
   if (log)
@@ -708,7 +709,7 @@ Error Platform::Install(const FileSpec &
         FileSpec recurse_dst;
         recurse_dst.GetDirectory().SetCString(fixed_dst.GetCString());
         std::string src_dir_path(src.GetPath());
-        RecurseCopyBaton baton = {recurse_dst, this, Error()};
+        RecurseCopyBaton baton = {recurse_dst, this, Status()};
         FileSpec::EnumerateDirectory(src_dir_path, true, true, true,
                                      RecurseCopy_Callback, &baton);
         return baton.error;
@@ -757,11 +758,12 @@ bool Platform::SetWorkingDirectory(const
   }
 }
 
-Error Platform::MakeDirectory(const FileSpec &file_spec, uint32_t permissions) {
+Status Platform::MakeDirectory(const FileSpec &file_spec,
+                               uint32_t permissions) {
   if (IsHost())
     return llvm::sys::fs::create_directory(file_spec.GetPath(), permissions);
   else {
-    Error error;
+    Status error;
     error.SetErrorStringWithFormat("remote platform %s doesn't support %s",
                                    GetPluginName().GetCString(),
                                    LLVM_PRETTY_FUNCTION);
@@ -769,15 +771,15 @@ Error Platform::MakeDirectory(const File
   }
 }
 
-Error Platform::GetFilePermissions(const FileSpec &file_spec,
-                                   uint32_t &file_permissions) {
+Status Platform::GetFilePermissions(const FileSpec &file_spec,
+                                    uint32_t &file_permissions) {
   if (IsHost()) {
     auto Value = llvm::sys::fs::getPermissions(file_spec.GetPath());
     if (Value)
       file_permissions = Value.get();
-    return Error(Value.getError());
+    return Status(Value.getError());
   } else {
-    Error error;
+    Status error;
     error.SetErrorStringWithFormat("remote platform %s doesn't support %s",
                                    GetPluginName().GetCString(),
                                    LLVM_PRETTY_FUNCTION);
@@ -785,13 +787,13 @@ Error Platform::GetFilePermissions(const
   }
 }
 
-Error Platform::SetFilePermissions(const FileSpec &file_spec,
-                                   uint32_t file_permissions) {
+Status Platform::SetFilePermissions(const FileSpec &file_spec,
+                                    uint32_t file_permissions) {
   if (IsHost()) {
     auto Perms = static_cast<llvm::sys::fs::perms>(file_permissions);
     return llvm::sys::fs::setPermissions(file_spec.GetPath(), Perms);
   } else {
-    Error error;
+    Status error;
     error.SetErrorStringWithFormat("remote platform %s doesn't support %s",
                                    GetPluginName().GetCString(),
                                    LLVM_PRETTY_FUNCTION);
@@ -877,10 +879,11 @@ bool Platform::SetOSVersion(uint32_t maj
   return false;
 }
 
-Error Platform::ResolveExecutable(const ModuleSpec &module_spec,
-                                  lldb::ModuleSP &exe_module_sp,
-                                  const FileSpecList *module_search_paths_ptr) {
-  Error error;
+Status
+Platform::ResolveExecutable(const ModuleSpec &module_spec,
+                            lldb::ModuleSP &exe_module_sp,
+                            const FileSpecList *module_search_paths_ptr) {
+  Status error;
   if (module_spec.GetFileSpec().Exists()) {
     if (module_spec.GetArchitecture().IsValid()) {
       error = ModuleList::GetSharedModule(module_spec, exe_module_sp,
@@ -909,9 +912,9 @@ Error Platform::ResolveExecutable(const
   return error;
 }
 
-Error Platform::ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
-                                  FileSpec &sym_file) {
-  Error error;
+Status Platform::ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
+                                   FileSpec &sym_file) {
+  Status error;
   if (sym_spec.GetSymbolFileSpec().Exists())
     sym_file = sym_spec.GetSymbolFileSpec();
   else
@@ -960,8 +963,8 @@ const ArchSpec &Platform::GetSystemArchi
   return m_system_arch;
 }
 
-Error Platform::ConnectRemote(Args &args) {
-  Error error;
+Status Platform::ConnectRemote(Args &args) {
+  Status error;
   if (IsHost())
     error.SetErrorStringWithFormat("The currently selected platform (%s) is "
                                    "the host platform and is always connected.",
@@ -973,8 +976,8 @@ Error Platform::ConnectRemote(Args &args
   return error;
 }
 
-Error Platform::DisconnectRemote() {
-  Error error;
+Status Platform::DisconnectRemote() {
+  Status error;
   if (IsHost())
     error.SetErrorStringWithFormat("The currently selected platform (%s) is "
                                    "the host platform and is always connected.",
@@ -1005,8 +1008,8 @@ uint32_t Platform::FindProcesses(const P
   return match_count;
 }
 
-Error Platform::LaunchProcess(ProcessLaunchInfo &launch_info) {
-  Error error;
+Status Platform::LaunchProcess(ProcessLaunchInfo &launch_info) {
+  Status error;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log)
     log->Printf("Platform::%s()", __FUNCTION__);
@@ -1057,13 +1060,13 @@ Error Platform::LaunchProcess(ProcessLau
   return error;
 }
 
-Error Platform::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
+Status Platform::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
   if (IsHost())
     return Host::ShellExpandArguments(launch_info);
-  return Error("base lldb_private::Platform class can't expand arguments");
+  return Status("base lldb_private::Platform class can't expand arguments");
 }
 
-Error Platform::KillProcess(const lldb::pid_t pid) {
+Status Platform::KillProcess(const lldb::pid_t pid) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log)
     log->Printf("Platform::%s, pid %" PRIu64, __FUNCTION__, pid);
@@ -1083,19 +1086,19 @@ Error Platform::KillProcess(const lldb::
   }
 
   if (!IsHost()) {
-    return Error(
+    return Status(
         "base lldb_private::Platform class can't kill remote processes unless "
         "they are controlled by a process plugin");
   }
   Host::Kill(pid, SIGTERM);
-  return Error();
+  return Status();
 }
 
 lldb::ProcessSP
 Platform::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
                        Target *target, // Can be nullptr, if nullptr create a
                                        // new target, else use existing one
-                       Error &error) {
+                       Status &error) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log)
     log->Printf("Platform::%s entered (target %p)", __FUNCTION__,
@@ -1186,7 +1189,7 @@ lldb::PlatformSP
 Platform::GetPlatformForArchitecture(const ArchSpec &arch,
                                      ArchSpec *platform_arch_ptr) {
   lldb::PlatformSP platform_sp;
-  Error error;
+  Status error;
   if (arch.IsValid())
     platform_sp = Platform::Create(arch, platform_arch_ptr, error);
   return platform_sp;
@@ -1230,8 +1233,8 @@ bool Platform::IsCompatibleArchitecture(
   return false;
 }
 
-Error Platform::PutFile(const FileSpec &source, const FileSpec &destination,
-                        uint32_t uid, uint32_t gid) {
+Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
+                         uint32_t uid, uint32_t gid) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log)
     log->Printf("[PutFile] Using block by block transfer....\n");
@@ -1243,13 +1246,13 @@ Error Platform::PutFile(const FileSpec &
     source_open_options |= File::eOpenOptionDontFollowSymlinks;
 
   File source_file(source, source_open_options, lldb::eFilePermissionsUserRW);
-  Error error;
+  Status error;
   uint32_t permissions = source_file.GetPermissions(error);
   if (permissions == 0)
     permissions = lldb::eFilePermissionsFileDefault;
 
   if (!source_file.IsValid())
-    return Error("PutFile: unable to open source file");
+    return Status("PutFile: unable to open source file");
   lldb::user_id_t dest_file = OpenFile(
       destination, File::eOpenOptionCanCreate | File::eOpenOptionWrite |
                        File::eOpenOptionTruncate | File::eOpenOptionCloseOnExec,
@@ -1260,7 +1263,7 @@ Error Platform::PutFile(const FileSpec &
   if (error.Fail())
     return error;
   if (dest_file == UINT64_MAX)
-    return Error("unable to open target file");
+    return Status("unable to open target file");
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(1024, 0));
   uint64_t offset = 0;
   for (;;) {
@@ -1291,16 +1294,16 @@ Error Platform::PutFile(const FileSpec &
   return error;
 }
 
-Error Platform::GetFile(const FileSpec &source, const FileSpec &destination) {
-  Error error("unimplemented");
+Status Platform::GetFile(const FileSpec &source, const FileSpec &destination) {
+  Status error("unimplemented");
   return error;
 }
 
-Error Platform::CreateSymlink(
-    const FileSpec &src, // The name of the link is in src
-    const FileSpec &dst) // The symlink points to dst
+Status
+Platform::CreateSymlink(const FileSpec &src, // The name of the link is in src
+                        const FileSpec &dst) // The symlink points to dst
 {
-  Error error("unimplemented");
+  Status error("unimplemented");
   return error;
 }
 
@@ -1308,8 +1311,8 @@ bool Platform::GetFileExists(const lldb_
   return false;
 }
 
-Error Platform::Unlink(const FileSpec &path) {
-  Error error("unimplemented");
+Status Platform::Unlink(const FileSpec &path) {
+  Status error("unimplemented");
   return error;
 }
 
@@ -1323,7 +1326,7 @@ uint64_t Platform::ConvertMmapFlagsToPla
   return flags_platform;
 }
 
-lldb_private::Error Platform::RunShellCommand(
+lldb_private::Status Platform::RunShellCommand(
     const char *command, // Shouldn't be nullptr
     const FileSpec &
         working_dir, // Pass empty FileSpec to use the current working directory
@@ -1339,7 +1342,7 @@ lldb_private::Error Platform::RunShellCo
     return Host::RunShellCommand(command, working_dir, status_ptr, signo_ptr,
                                  command_output, timeout_sec);
   else
-    return Error("unimplemented");
+    return Status("unimplemented");
 }
 
 bool Platform::CalculateMD5(const FileSpec &file_spec, uint64_t &low,
@@ -1402,11 +1405,11 @@ void OptionGroupPlatformRSync::OptionPar
   m_ignores_remote_hostname = false;
 }
 
-lldb_private::Error
+lldb_private::Status
 OptionGroupPlatformRSync::SetOptionValue(uint32_t option_idx,
                                          llvm::StringRef option_arg,
                                          ExecutionContext *execution_context) {
-  Error error;
+  Status error;
   char short_option = (char)GetDefinitions()[option_idx].short_option;
   switch (short_option) {
   case 'r':
@@ -1448,11 +1451,11 @@ void OptionGroupPlatformSSH::OptionParsi
   m_ssh_opts.clear();
 }
 
-lldb_private::Error
+lldb_private::Status
 OptionGroupPlatformSSH::SetOptionValue(uint32_t option_idx,
                                        llvm::StringRef option_arg,
                                        ExecutionContext *execution_context) {
-  Error error;
+  Status error;
   char short_option = (char)GetDefinitions()[option_idx].short_option;
   switch (short_option) {
   case 's':
@@ -1480,10 +1483,10 @@ void OptionGroupPlatformCaching::OptionP
   m_cache_dir.clear();
 }
 
-lldb_private::Error OptionGroupPlatformCaching::SetOptionValue(
+lldb_private::Status OptionGroupPlatformCaching::SetOptionValue(
     uint32_t option_idx, llvm::StringRef option_arg,
     ExecutionContext *execution_context) {
-  Error error;
+  Status error;
   char short_option = (char)GetDefinitions()[option_idx].short_option;
   switch (short_option) {
   case 'c':
@@ -1514,10 +1517,9 @@ const std::vector<ConstString> &Platform
   return m_trap_handlers;
 }
 
-Error Platform::GetCachedExecutable(ModuleSpec &module_spec,
-                                    lldb::ModuleSP &module_sp,
-                                    const FileSpecList *module_search_paths_ptr,
-                                    Platform &remote_platform) {
+Status Platform::GetCachedExecutable(
+    ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
+    const FileSpecList *module_search_paths_ptr, Platform &remote_platform) {
   const auto platform_spec = module_spec.GetFileSpec();
   const auto error = LoadCachedExecutable(
       module_spec, module_sp, module_search_paths_ptr, remote_platform);
@@ -1529,7 +1531,7 @@ Error Platform::GetCachedExecutable(Modu
   return error;
 }
 
-Error Platform::LoadCachedExecutable(
+Status Platform::LoadCachedExecutable(
     const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
     const FileSpecList *module_search_paths_ptr, Platform &remote_platform) {
   return GetRemoteSharedModule(module_spec, nullptr, module_sp,
@@ -1540,11 +1542,11 @@ Error Platform::LoadCachedExecutable(
                                nullptr);
 }
 
-Error Platform::GetRemoteSharedModule(const ModuleSpec &module_spec,
-                                      Process *process,
-                                      lldb::ModuleSP &module_sp,
-                                      const ModuleResolver &module_resolver,
-                                      bool *did_create_ptr) {
+Status Platform::GetRemoteSharedModule(const ModuleSpec &module_spec,
+                                       Process *process,
+                                       lldb::ModuleSP &module_sp,
+                                       const ModuleResolver &module_resolver,
+                                       bool *did_create_ptr) {
   // Get module information from a target.
   ModuleSpec resolved_module_spec;
   bool got_module_spec = false;
@@ -1561,7 +1563,7 @@ Error Platform::GetRemoteSharedModule(co
   }
 
   if (module_spec.GetArchitecture().IsValid() == false) {
-    Error error;
+    Status error;
     // No valid architecture was specified, ask the platform for
     // the architectures that we should be using (in the correct order)
     // and see if we can find a match that way
@@ -1600,7 +1602,7 @@ Error Platform::GetRemoteSharedModule(co
   const auto error = module_resolver(resolved_module_spec);
   if (error.Fail()) {
     if (GetCachedSharedModule(resolved_module_spec, module_sp, did_create_ptr))
-      return Error();
+      return Status();
   }
 
   return error;
@@ -1640,11 +1642,11 @@ bool Platform::GetCachedSharedModule(con
   return false;
 }
 
-Error Platform::DownloadModuleSlice(const FileSpec &src_file_spec,
-                                    const uint64_t src_offset,
-                                    const uint64_t src_size,
-                                    const FileSpec &dst_file_spec) {
-  Error error;
+Status Platform::DownloadModuleSlice(const FileSpec &src_file_spec,
+                                     const uint64_t src_offset,
+                                     const uint64_t src_size,
+                                     const FileSpec &dst_file_spec) {
+  Status error;
 
   std::error_code EC;
   llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::F_None);
@@ -1682,15 +1684,15 @@ Error Platform::DownloadModuleSlice(cons
     dst.write(&buffer[0], n_read);
   }
 
-  Error close_error;
+  Status close_error;
   CloseFile(src_fd, close_error); // Ignoring close error.
 
   return error;
 }
 
-Error Platform::DownloadSymbolFile(const lldb::ModuleSP &module_sp,
-                                   const FileSpec &dst_file_spec) {
-  return Error(
+Status Platform::DownloadSymbolFile(const lldb::ModuleSP &module_sp,
+                                    const FileSpec &dst_file_spec) {
+  return Status(
       "Symbol file downloading not supported by the default platform.");
 }
 
@@ -1716,7 +1718,7 @@ const UnixSignalsSP &Platform::GetUnixSi
 uint32_t Platform::LoadImage(lldb_private::Process *process,
                              const lldb_private::FileSpec &local_file,
                              const lldb_private::FileSpec &remote_file,
-                             lldb_private::Error &error) {
+                             lldb_private::Status &error) {
   if (local_file && remote_file) {
     // Both local and remote file was specified. Install the local file to the
     // given location.
@@ -1752,21 +1754,21 @@ uint32_t Platform::LoadImage(lldb_privat
 
 uint32_t Platform::DoLoadImage(lldb_private::Process *process,
                                const lldb_private::FileSpec &remote_file,
-                               lldb_private::Error &error) {
+                               lldb_private::Status &error) {
   error.SetErrorString("LoadImage is not supported on the current platform");
   return LLDB_INVALID_IMAGE_TOKEN;
 }
 
-Error Platform::UnloadImage(lldb_private::Process *process,
-                            uint32_t image_token) {
-  return Error("UnloadImage is not supported on the current platform");
+Status Platform::UnloadImage(lldb_private::Process *process,
+                             uint32_t image_token) {
+  return Status("UnloadImage is not supported on the current platform");
 }
 
 lldb::ProcessSP Platform::ConnectProcess(llvm::StringRef connect_url,
                                          llvm::StringRef plugin_name,
                                          lldb_private::Debugger &debugger,
                                          lldb_private::Target *target,
-                                         lldb_private::Error &error) {
+                                         lldb_private::Status &error) {
   error.Clear();
 
   if (!target) {
@@ -1795,7 +1797,7 @@ lldb::ProcessSP Platform::ConnectProcess
 }
 
 size_t Platform::ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
-                                           lldb_private::Error &error) {
+                                           lldb_private::Status &error) {
   error.Clear();
   return 0;
 }

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu May 11 23:51:55 2017
@@ -415,10 +415,10 @@ void ProcessInstanceInfo::DumpAsTableRow
   }
 }
 
-Error ProcessLaunchCommandOptions::SetOptionValue(
+Status ProcessLaunchCommandOptions::SetOptionValue(
     uint32_t option_idx, llvm::StringRef option_arg,
     ExecutionContext *execution_context) {
-  Error error;
+  Status error;
   const int short_option = m_getopt_table[option_idx].val;
 
   switch (short_option) {
@@ -1610,13 +1610,13 @@ void Process::SetPublicState(StateType n
   }
 }
 
-Error Process::Resume() {
+Status Process::Resume() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
   if (log)
     log->Printf("Process::Resume -- locking run lock");
   if (!m_public_run_lock.TrySetRunning()) {
-    Error error("Resume request failed - process still running.");
+    Status error("Resume request failed - process still running.");
     if (log)
       log->Printf("Process::Resume: -- TrySetRunning failed, not resuming.");
     return error;
@@ -1624,13 +1624,13 @@ Error Process::Resume() {
   return PrivateResume();
 }
 
-Error Process::ResumeSynchronous(Stream *stream) {
+Status Process::ResumeSynchronous(Stream *stream) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
   if (log)
     log->Printf("Process::ResumeSynchronous -- locking run lock");
   if (!m_public_run_lock.TrySetRunning()) {
-    Error error("Resume request failed - process still running.");
+    Status error("Resume request failed - process still running.");
     if (log)
       log->Printf("Process::Resume: -- TrySetRunning failed, not resuming.");
     return error;
@@ -1640,7 +1640,7 @@ Error Process::ResumeSynchronous(Stream
       Listener::MakeListener("lldb.Process.ResumeSynchronous.hijack"));
   HijackProcessEvents(listener_sp);
 
-  Error error = PrivateResume();
+  Status error = PrivateResume();
   if (error.Success()) {
     StateType state =
         WaitForProcessToStop(llvm::None, NULL, true, listener_sp, stream);
@@ -1813,8 +1813,8 @@ void Process::DisableAllBreakpointSites(
   });
 }
 
-Error Process::ClearBreakpointSiteByID(lldb::user_id_t break_id) {
-  Error error(DisableBreakpointSiteByID(break_id));
+Status Process::ClearBreakpointSiteByID(lldb::user_id_t break_id) {
+  Status error(DisableBreakpointSiteByID(break_id));
 
   if (error.Success())
     m_breakpoint_site_list.Remove(break_id);
@@ -1822,8 +1822,8 @@ Error Process::ClearBreakpointSiteByID(l
   return error;
 }
 
-Error Process::DisableBreakpointSiteByID(lldb::user_id_t break_id) {
-  Error error;
+Status Process::DisableBreakpointSiteByID(lldb::user_id_t break_id) {
+  Status error;
   BreakpointSiteSP bp_site_sp = m_breakpoint_site_list.FindByID(break_id);
   if (bp_site_sp) {
     if (bp_site_sp->IsEnabled())
@@ -1836,8 +1836,8 @@ Error Process::DisableBreakpointSiteByID
   return error;
 }
 
-Error Process::EnableBreakpointSiteByID(lldb::user_id_t break_id) {
-  Error error;
+Status Process::EnableBreakpointSiteByID(lldb::user_id_t break_id) {
+  Status error;
   BreakpointSiteSP bp_site_sp = m_breakpoint_site_list.FindByID(break_id);
   if (bp_site_sp) {
     if (!bp_site_sp->IsEnabled())
@@ -1882,7 +1882,7 @@ Process::CreateBreakpointSite(const Brea
   if (owner->ShouldResolveIndirectFunctions()) {
     Symbol *symbol = owner->GetAddress().CalculateSymbolContextSymbol();
     if (symbol && symbol->IsIndirect()) {
-      Error error;
+      Status error;
       Address symbol_address = symbol->GetAddress();
       load_addr = ResolveIndirectFunction(&symbol_address, error);
       if (!error.Success() && show_error) {
@@ -1919,7 +1919,7 @@ Process::CreateBreakpointSite(const Brea
       bp_site_sp.reset(new BreakpointSite(&m_breakpoint_site_list, owner,
                                           load_addr, use_hardware));
       if (bp_site_sp) {
-        Error error = EnableBreakpointSite(bp_site_sp.get());
+        Status error = EnableBreakpointSite(bp_site_sp.get());
         if (error.Success()) {
           owner->SetBreakpointSite(bp_site_sp);
           return m_breakpoint_site_list.Add(bp_site_sp);
@@ -1989,8 +1989,8 @@ size_t Process::GetSoftwareBreakpointTra
   return 0;
 }
 
-Error Process::EnableSoftwareBreakpoint(BreakpointSite *bp_site) {
-  Error error;
+Status Process::EnableSoftwareBreakpoint(BreakpointSite *bp_site) {
+  Status error;
   assert(bp_site != nullptr);
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
   const addr_t bp_addr = bp_site->GetLoadAddress();
@@ -2065,8 +2065,8 @@ Error Process::EnableSoftwareBreakpoint(
   return error;
 }
 
-Error Process::DisableSoftwareBreakpoint(BreakpointSite *bp_site) {
-  Error error;
+Status Process::DisableSoftwareBreakpoint(BreakpointSite *bp_site) {
+  Status error;
   assert(bp_site != nullptr);
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
   addr_t bp_addr = bp_site->GetLoadAddress();
@@ -2158,7 +2158,7 @@ Error Process::DisableSoftwareBreakpoint
 // Uncomment to verify memory caching works after making changes to caching code
 //#define VERIFY_MEMORY_READS
 
-size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Error &error) {
+size_t Process::ReadMemory(addr_t addr, void *buf, size_t size, Status &error) {
   error.Clear();
   if (!GetDisableMemoryCache()) {
 #if defined(VERIFY_MEMORY_READS)
@@ -2177,7 +2177,7 @@ size_t Process::ReadMemory(addr_t addr,
       assert(verify_buf.size() == size);
       const size_t cache_bytes_read =
           m_memory_cache.Read(this, addr, buf, size, error);
-      Error verify_error;
+      Status verify_error;
       const size_t verify_bytes_read =
           ReadMemoryFromInferior(addr, const_cast<char *>(verify_buf.data()),
                                  verify_buf.size(), verify_error);
@@ -2200,7 +2200,7 @@ size_t Process::ReadMemory(addr_t addr,
 }
 
 size_t Process::ReadCStringFromMemory(addr_t addr, std::string &out_str,
-                                      Error &error) {
+                                      Status &error) {
   char buf[256];
   out_str.clear();
   addr_t curr_addr = addr;
@@ -2220,7 +2220,7 @@ size_t Process::ReadCStringFromMemory(ad
 }
 
 size_t Process::ReadStringFromMemory(addr_t addr, char *dst, size_t max_bytes,
-                                     Error &error, size_t type_width) {
+                                     Status &error, size_t type_width) {
   size_t total_bytes_read = 0;
   if (dst && max_bytes && type_width && max_bytes >= type_width) {
     // Ensure a null terminator independent of the number of bytes that is read.
@@ -2273,13 +2273,14 @@ size_t Process::ReadStringFromMemory(add
 // correct code to find
 // null terminators.
 size_t Process::ReadCStringFromMemory(addr_t addr, char *dst,
-                                      size_t dst_max_len, Error &result_error) {
+                                      size_t dst_max_len,
+                                      Status &result_error) {
   size_t total_cstr_len = 0;
   if (dst && dst_max_len) {
     result_error.Clear();
     // NULL out everything just to be safe
     memset(dst, 0, dst_max_len);
-    Error error;
+    Status error;
     addr_t curr_addr = addr;
     const size_t cache_line_size = m_memory_cache.GetMemoryCacheLineSize();
     size_t bytes_left = dst_max_len - 1;
@@ -2318,7 +2319,7 @@ size_t Process::ReadCStringFromMemory(ad
 }
 
 size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size,
-                                       Error &error) {
+                                       Status &error) {
   if (buf == nullptr || size == 0)
     return 0;
 
@@ -2344,7 +2345,7 @@ size_t Process::ReadMemoryFromInferior(a
 uint64_t Process::ReadUnsignedIntegerFromMemory(lldb::addr_t vm_addr,
                                                 size_t integer_byte_size,
                                                 uint64_t fail_value,
-                                                Error &error) {
+                                                Status &error) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(vm_addr, integer_byte_size, false, scalar,
                                   error))
@@ -2354,7 +2355,8 @@ uint64_t Process::ReadUnsignedIntegerFro
 
 int64_t Process::ReadSignedIntegerFromMemory(lldb::addr_t vm_addr,
                                              size_t integer_byte_size,
-                                             int64_t fail_value, Error &error) {
+                                             int64_t fail_value,
+                                             Status &error) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(vm_addr, integer_byte_size, true, scalar,
                                   error))
@@ -2362,7 +2364,7 @@ int64_t Process::ReadSignedIntegerFromMe
   return fail_value;
 }
 
-addr_t Process::ReadPointerFromMemory(lldb::addr_t vm_addr, Error &error) {
+addr_t Process::ReadPointerFromMemory(lldb::addr_t vm_addr, Status &error) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(vm_addr, GetAddressByteSize(), false, scalar,
                                   error))
@@ -2371,7 +2373,7 @@ addr_t Process::ReadPointerFromMemory(ll
 }
 
 bool Process::WritePointerToMemory(lldb::addr_t vm_addr, lldb::addr_t ptr_value,
-                                   Error &error) {
+                                   Status &error) {
   Scalar scalar;
   const uint32_t addr_byte_size = GetAddressByteSize();
   if (addr_byte_size <= 4)
@@ -2383,7 +2385,7 @@ bool Process::WritePointerToMemory(lldb:
 }
 
 size_t Process::WriteMemoryPrivate(addr_t addr, const void *buf, size_t size,
-                                   Error &error) {
+                                   Status &error) {
   size_t bytes_written = 0;
   const uint8_t *bytes = (const uint8_t *)buf;
 
@@ -2399,7 +2401,7 @@ size_t Process::WriteMemoryPrivate(addr_
 }
 
 size_t Process::WriteMemory(addr_t addr, const void *buf, size_t size,
-                            Error &error) {
+                            Status &error) {
 #if defined(ENABLE_MEMORY_CACHING)
   m_memory_cache.Flush(addr, size);
 #endif
@@ -2478,7 +2480,7 @@ size_t Process::WriteMemory(addr_t addr,
 }
 
 size_t Process::WriteScalarToMemory(addr_t addr, const Scalar &scalar,
-                                    size_t byte_size, Error &error) {
+                                    size_t byte_size, Status &error) {
   if (byte_size == UINT32_MAX)
     byte_size = scalar.GetByteSize();
   if (byte_size > 0) {
@@ -2497,7 +2499,7 @@ size_t Process::WriteScalarToMemory(addr
 
 size_t Process::ReadScalarIntegerFromMemory(addr_t addr, uint32_t byte_size,
                                             bool is_signed, Scalar &scalar,
-                                            Error &error) {
+                                            Status &error) {
   uint64_t uval = 0;
   if (byte_size == 0) {
     error.SetErrorString("byte size is zero");
@@ -2527,7 +2529,7 @@ size_t Process::ReadScalarIntegerFromMem
 
 #define USE_ALLOCATE_MEMORY_CACHE 1
 addr_t Process::AllocateMemory(size_t size, uint32_t permissions,
-                               Error &error) {
+                               Status &error) {
   if (GetPrivateState() != eStateStopped)
     return LLDB_INVALID_ADDRESS;
 
@@ -2548,7 +2550,7 @@ addr_t Process::AllocateMemory(size_t si
 }
 
 addr_t Process::CallocateMemory(size_t size, uint32_t permissions,
-                                Error &error) {
+                                Status &error) {
   addr_t return_addr = AllocateMemory(size, permissions, error);
   if (error.Success()) {
     std::string buffer(size, 0);
@@ -2560,7 +2562,7 @@ addr_t Process::CallocateMemory(size_t s
 bool Process::CanJIT() {
   if (m_can_jit == eCanJITDontKnow) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    Error err;
+    Status err;
 
     uint64_t allocated_memory = AllocateMemory(
         8, ePermissionsReadable | ePermissionsWritable | ePermissionsExecutable,
@@ -2595,8 +2597,8 @@ void Process::SetCanRunCode(bool can_run
   m_can_interpret_function_calls = can_run_code;
 }
 
-Error Process::DeallocateMemory(addr_t ptr) {
-  Error error;
+Status Process::DeallocateMemory(addr_t ptr) {
+  Status error;
 #if defined(USE_ALLOCATE_MEMORY_CACHE)
   if (!m_allocated_memory_cache.DeallocateMemory(ptr)) {
     error.SetErrorStringWithFormat(
@@ -2625,7 +2627,7 @@ ModuleSP Process::ReadModuleFromMemory(c
   }
   ModuleSP module_sp(new Module(file_spec, ArchSpec()));
   if (module_sp) {
-    Error error;
+    Status error;
     ObjectFile *objfile = module_sp->GetMemoryObjectFile(
         shared_from_this(), header_addr, error, size_to_read);
     if (objfile)
@@ -2638,7 +2640,7 @@ bool Process::GetLoadAddressPermissions(
                                         uint32_t &permissions) {
   MemoryRegionInfo range_info;
   permissions = 0;
-  Error error(GetMemoryRegionInfo(load_addr, range_info));
+  Status error(GetMemoryRegionInfo(load_addr, range_info));
   if (!error.Success())
     return false;
   if (range_info.GetReadable() == MemoryRegionInfo::eDontKnow ||
@@ -2659,14 +2661,14 @@ bool Process::GetLoadAddressPermissions(
   return true;
 }
 
-Error Process::EnableWatchpoint(Watchpoint *watchpoint, bool notify) {
-  Error error;
+Status Process::EnableWatchpoint(Watchpoint *watchpoint, bool notify) {
+  Status error;
   error.SetErrorString("watchpoints are not supported");
   return error;
 }
 
-Error Process::DisableWatchpoint(Watchpoint *watchpoint, bool notify) {
-  Error error;
+Status Process::DisableWatchpoint(Watchpoint *watchpoint, bool notify) {
+  Status error;
   error.SetErrorString("watchpoints are not supported");
   return error;
 }
@@ -2702,8 +2704,8 @@ void Process::LoadOperatingSystemPlugin(
     Flush();
 }
 
-Error Process::Launch(ProcessLaunchInfo &launch_info) {
-  Error error;
+Status Process::Launch(ProcessLaunchInfo &launch_info) {
+  Status error;
   m_abi_sp.reset();
   m_dyld_ap.reset();
   m_jit_loaders_ap.reset();
@@ -2823,8 +2825,8 @@ Error Process::Launch(ProcessLaunchInfo
   return error;
 }
 
-Error Process::LoadCore() {
-  Error error = DoLoadCore();
+Status Process::LoadCore() {
+  Status error = DoLoadCore();
   if (error.Success()) {
     ListenerSP listener_sp(
         Listener::MakeListener("lldb.process.load_core_listener"));
@@ -2977,7 +2979,7 @@ ListenerSP ProcessAttachInfo::GetListene
     return debugger.GetListener();
 }
 
-Error Process::Attach(ProcessAttachInfo &attach_info) {
+Status Process::Attach(ProcessAttachInfo &attach_info) {
   m_abi_sp.reset();
   m_process_input_reader.reset();
   m_dyld_ap.reset();
@@ -2987,7 +2989,7 @@ Error Process::Attach(ProcessAttachInfo
   m_stop_info_override_callback = nullptr;
 
   lldb::pid_t attach_pid = attach_info.GetProcessID();
-  Error error;
+  Status error;
   if (attach_pid == LLDB_INVALID_PROCESS_ID) {
     char process_name[PATH_MAX];
 
@@ -3221,14 +3223,14 @@ void Process::CompleteAttach() {
   m_stop_info_override_callback = process_arch.GetStopInfoOverrideCallback();
 }
 
-Error Process::ConnectRemote(Stream *strm, llvm::StringRef remote_url) {
+Status Process::ConnectRemote(Stream *strm, llvm::StringRef remote_url) {
   m_abi_sp.reset();
   m_process_input_reader.reset();
 
   // Find the process and its architecture.  Make sure it matches the
   // architecture of the current Target, and if not adjust it.
 
-  Error error(DoConnectRemote(strm, remote_url));
+  Status error(DoConnectRemote(strm, remote_url));
   if (error.Success()) {
     if (GetID() != LLDB_INVALID_PROCESS_ID) {
       EventSP event_sp;
@@ -3253,7 +3255,7 @@ Error Process::ConnectRemote(Stream *str
   return error;
 }
 
-Error Process::PrivateResume() {
+Status Process::PrivateResume() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
                                                   LIBLLDB_LOG_STEP));
   if (log)
@@ -3266,7 +3268,7 @@ Error Process::PrivateResume() {
   // our signal filters before resuming.
   UpdateAutomaticSignalFiltering();
 
-  Error error(WillResume());
+  Status error(WillResume());
   // Tell the process it is about to resume before the thread list
   if (error.Success()) {
     // Now let the thread list know we are about to resume so it
@@ -3311,9 +3313,9 @@ Error Process::PrivateResume() {
   return error;
 }
 
-Error Process::Halt(bool clear_thread_plans, bool use_run_lock) {
+Status Process::Halt(bool clear_thread_plans, bool use_run_lock) {
   if (!StateIsRunningState(m_public_state.GetValue()))
-    return Error("Process is not running.");
+    return Status("Process is not running.");
 
   // Don't clear the m_clear_thread_plans_on_stop, only set it to true if
   // in case it was already set and some thread plan logic calls halt on its
@@ -3334,7 +3336,7 @@ Error Process::Halt(bool clear_thread_pl
     RestoreProcessEvents();
     SetExitStatus(SIGKILL, "Cancelled async attach.");
     Destroy(false);
-    return Error();
+    return Status();
   }
 
   // Wait for 10 second for the process to stop.
@@ -3344,16 +3346,16 @@ Error Process::Halt(bool clear_thread_pl
 
   if (state == eStateInvalid || !event_sp) {
     // We timed out and didn't get a stop event...
-    return Error("Halt timed out. State = %s", StateAsCString(GetState()));
+    return Status("Halt timed out. State = %s", StateAsCString(GetState()));
   }
 
   BroadcastEvent(event_sp);
 
-  return Error();
+  return Status();
 }
 
-Error Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp) {
-  Error error;
+Status Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp) {
+  Status error;
 
   // Check both the public & private states here.  If we're hung evaluating an
   // expression, for instance, then
@@ -3400,18 +3402,19 @@ Error Process::StopForDestroyOrDetach(ll
       // then continue on.
       StateType private_state = m_private_state.GetValue();
       if (private_state != eStateStopped) {
-        return Error("Attempt to stop the target in order to detach timed out. "
-                     "State = %s",
-                     StateAsCString(GetState()));
+        return Status(
+            "Attempt to stop the target in order to detach timed out. "
+            "State = %s",
+            StateAsCString(GetState()));
       }
     }
   }
   return error;
 }
 
-Error Process::Detach(bool keep_stopped) {
+Status Process::Detach(bool keep_stopped) {
   EventSP exit_event_sp;
-  Error error;
+  Status error;
   m_destroy_in_process = true;
 
   error = WillDetach();
@@ -3463,7 +3466,7 @@ Error Process::Detach(bool keep_stopped)
   return error;
 }
 
-Error Process::Destroy(bool force_kill) {
+Status Process::Destroy(bool force_kill) {
 
   // Tell ourselves we are in the process of destroying the process, so that we
   // don't do any unnecessary work
@@ -3483,7 +3486,7 @@ Error Process::Destroy(bool force_kill)
 
   m_destroy_in_process = true;
 
-  Error error(WillDestroy());
+  Status error(WillDestroy());
   if (error.Success()) {
     EventSP exit_event_sp;
     if (DestroyRequiresHalt()) {
@@ -3538,8 +3541,8 @@ Error Process::Destroy(bool force_kill)
   return error;
 }
 
-Error Process::Signal(int signal) {
-  Error error(WillSignal());
+Status Process::Signal(int signal) {
+  Status error(WillSignal());
   if (error.Success()) {
     error = DoSignal(signal);
     if (error.Success())
@@ -3967,9 +3970,9 @@ void Process::HandlePrivateEvent(EventSP
   }
 }
 
-Error Process::HaltPrivate() {
+Status Process::HaltPrivate() {
   EventSP event_sp;
-  Error error(WillHalt());
+  Status error(WillHalt());
   if (error.Fail())
     return error;
 
@@ -4037,7 +4040,7 @@ thread_result_t Process::RunPrivateState
           log->Printf("Process::%s (arg = %p, pid = %" PRIu64
                       ") woke up with an interrupt - Halting.",
                       __FUNCTION__, static_cast<void *>(this), GetID());
-        Error error = HaltPrivate();
+        Status error = HaltPrivate();
         if (error.Fail() && log)
           log->Printf("Process::%s (arg = %p, pid = %" PRIu64
                       ") failed to halt the process: %s",
@@ -4477,7 +4480,7 @@ Process::GetStructuredDataPlugin(const C
     return StructuredDataPluginSP();
 }
 
-size_t Process::GetAsyncProfileData(char *buf, size_t buf_size, Error &error) {
+size_t Process::GetAsyncProfileData(char *buf, size_t buf_size, Status &error) {
   std::lock_guard<std::recursive_mutex> guard(m_profile_data_comm_mutex);
   if (m_profile_data.empty())
     return 0;
@@ -4505,7 +4508,7 @@ size_t Process::GetAsyncProfileData(char
 // Process STDIO
 //------------------------------------------------------------------
 
-size_t Process::GetSTDOUT(char *buf, size_t buf_size, Error &error) {
+size_t Process::GetSTDOUT(char *buf, size_t buf_size, Status &error) {
   std::lock_guard<std::recursive_mutex> guard(m_stdio_communication_mutex);
   size_t bytes_available = m_stdout_data.size();
   if (bytes_available > 0) {
@@ -4525,7 +4528,7 @@ size_t Process::GetSTDOUT(char *buf, siz
   return bytes_available;
 }
 
-size_t Process::GetSTDERR(char *buf, size_t buf_size, Error &error) {
+size_t Process::GetSTDERR(char *buf, size_t buf_size, Status &error) {
   std::lock_guard<std::recursive_mutex> gaurd(m_stdio_communication_mutex);
   size_t bytes_available = m_stderr_data.size();
   if (bytes_available > 0) {
@@ -4588,7 +4591,7 @@ public:
       SelectHelper select_helper;
       select_helper.FDSetRead(read_fd);
       select_helper.FDSetRead(pipe_read_fd);
-      Error error = select_helper.Select();
+      Status error = select_helper.Select();
 
       if (error.Fail()) {
         SetIsDone(true);
@@ -4606,7 +4609,7 @@ public:
         if (select_helper.FDIsSetRead(pipe_read_fd)) {
           size_t bytes_read;
           // Consume the interrupt byte
-          Error error = m_pipe.Read(&ch, 1, bytes_read);
+          Status error = m_pipe.Read(&ch, 1, bytes_read);
           if (error.Success()) {
             switch (ch) {
             case 'q':
@@ -4657,7 +4660,7 @@ public:
     if (m_active) {
       char ch = 'i'; // Send 'i' for interrupt
       size_t bytes_written = 0;
-      Error result = m_pipe.Write(&ch, 1, bytes_written);
+      Status result = m_pipe.Write(&ch, 1, bytes_written);
       return result.Success();
     } else {
       // This IOHandler might be pushed on the stack, but not being run
@@ -5082,7 +5085,7 @@ Process::RunThreadPlan(ExecutionContext
 
         if (do_resume) {
           num_resumes++;
-          Error resume_error = PrivateResume();
+          Status resume_error = PrivateResume();
           if (!resume_error.Success()) {
             diagnostic_manager.Printf(
                 eDiagnosticSeverityError,
@@ -5361,7 +5364,7 @@ Process::RunThreadPlan(ExecutionContext
         bool do_halt = true;
         const uint32_t num_retries = 5;
         while (try_halt_again < num_retries) {
-          Error halt_error;
+          Status halt_error;
           if (do_halt) {
             if (log)
               log->Printf("Process::RunThreadPlan(): Running Halt.");
@@ -5473,7 +5476,7 @@ Process::RunThreadPlan(ExecutionContext
     // plan, shut it down now.
     if (backup_private_state_thread.IsJoinable()) {
       StopPrivateStateThread();
-      Error error;
+      Status error;
       m_private_state_thread = backup_private_state_thread;
       if (stopper_base_plan_sp) {
         thread->DiscardThreadPlansUpToPlan(stopper_base_plan_sp);
@@ -5862,7 +5865,7 @@ void Process::DidExec() {
   target.DidExec();
 }
 
-addr_t Process::ResolveIndirectFunction(const Address *address, Error &error) {
+addr_t Process::ResolveIndirectFunction(const Address *address, Status &error) {
   if (address == nullptr) {
     error.SetErrorString("Invalid address argument");
     return LLDB_INVALID_ADDRESS;
@@ -6090,10 +6093,10 @@ Process::AdvanceAddressToNextBranchInstr
   return retval;
 }
 
-Error Process::GetMemoryRegions(
-    std::vector<lldb::MemoryRegionInfoSP> &region_list) {
+Status
+Process::GetMemoryRegions(std::vector<lldb::MemoryRegionInfoSP> &region_list) {
 
-  Error error;
+  Status error;
 
   lldb::addr_t range_end = 0;
 
@@ -6116,12 +6119,13 @@ Error Process::GetMemoryRegions(
   return error;
 }
 
-Error Process::ConfigureStructuredData(
-    const ConstString &type_name, const StructuredData::ObjectSP &config_sp) {
+Status
+Process::ConfigureStructuredData(const ConstString &type_name,
+                                 const StructuredData::ObjectSP &config_sp) {
   // If you get this, the Process-derived class needs to implement a method
   // to enable an already-reported asynchronous structured data feature.
   // See ProcessGDBRemote for an example implementation over gdb-remote.
-  return Error("unimplemented");
+  return Status("unimplemented");
 }
 
 void Process::MapSupportedStructuredDataPlugins(
@@ -6229,8 +6233,8 @@ bool Process::RouteAsyncStructuredData(
   return true;
 }
 
-Error Process::UpdateAutomaticSignalFiltering() {
+Status Process::UpdateAutomaticSignalFiltering() {
   // Default implementation does nothign.
   // No automatic signal filtering to speak of.
-  return Error();
+  return Status();
 }

Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Thu May 11 23:51:55 2017
@@ -330,7 +330,7 @@ void ProcessLaunchInfo::FinalizeFileActi
 }
 
 bool ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell(
-    Error &error, bool localhost, bool will_debug,
+    Status &error, bool localhost, bool will_debug,
     bool first_arg_is_full_shell_command, int32_t num_resumes) {
   error.Clear();
 

Modified: lldb/trunk/source/Target/RegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/RegisterContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/RegisterContext.cpp (original)
+++ lldb/trunk/source/Target/RegisterContext.cpp Thu May 11 23:51:55 2017
@@ -91,7 +91,7 @@ RegisterContext::UpdateDynamicRegisterSi
   DWARFExpression dwarf_expr(opcode_ctx, dwarf_data, nullptr, 0,
                              dwarf_opcode_len);
   Value result;
-  Error error;
+  Status error;
   const lldb::offset_t offset = 0;
   if (dwarf_expr.Evaluate(&exe_ctx, nullptr, nullptr, this, opcode_ctx,
                           dwarf_data, nullptr, offset, dwarf_opcode_len,
@@ -299,11 +299,10 @@ bool RegisterContext::ClearHardwareWatch
 
 bool RegisterContext::HardwareSingleStep(bool enable) { return false; }
 
-Error RegisterContext::ReadRegisterValueFromMemory(const RegisterInfo *reg_info,
-                                                   lldb::addr_t src_addr,
-                                                   uint32_t src_len,
-                                                   RegisterValue &reg_value) {
-  Error error;
+Status RegisterContext::ReadRegisterValueFromMemory(
+    const RegisterInfo *reg_info, lldb::addr_t src_addr, uint32_t src_len,
+    RegisterValue &reg_value) {
+  Status error;
   if (reg_info == nullptr) {
     error.SetErrorString("invalid register info argument.");
     return error;
@@ -318,7 +317,7 @@ Error RegisterContext::ReadRegisterValue
   //
   // Case 2: src_len > dst_len
   //
-  //   Error!  (The register should always be big enough to hold the data)
+  //   Status!  (The register should always be big enough to hold the data)
   //
   // Case 3: src_len < dst_len
   //
@@ -371,12 +370,12 @@ Error RegisterContext::ReadRegisterValue
   return error;
 }
 
-Error RegisterContext::WriteRegisterValueToMemory(
+Status RegisterContext::WriteRegisterValueToMemory(
     const RegisterInfo *reg_info, lldb::addr_t dst_addr, uint32_t dst_len,
     const RegisterValue &reg_value) {
   uint8_t dst[RegisterValue::kMaxRegisterByteSize];
 
-  Error error;
+  Status error;
 
   ProcessSP process_sp(m_thread.GetProcess());
   if (process_sp) {

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Thu May 11 23:51:55 2017
@@ -488,7 +488,7 @@ StackFrame::GetInScopeVariableList(bool
 
 ValueObjectSP StackFrame::GetValueForVariableExpressionPath(
     llvm::StringRef var_expr, DynamicValueType use_dynamic, uint32_t options,
-    VariableSP &var_sp, Error &error) {
+    VariableSP &var_sp, Status &error) {
   llvm::StringRef original_var_expr = var_expr;
   // We can't fetch variable information for a history stack frame.
   if (m_is_history_frame)
@@ -631,7 +631,7 @@ ValueObjectSP StackFrame::GetValueForVar
       // If we have a non pointer type with a sythetic value then lets check if
       // we have an sythetic dereference specified.
       if (!valobj_sp->IsPointerType() && valobj_sp->HasSyntheticValue()) {
-        Error deref_error;
+        Status deref_error;
         if (valobj_sp->GetCompilerType().IsReferenceType()) {
           valobj_sp = valobj_sp->GetSyntheticValue()->Dereference(deref_error);
           if (error.Fail()) {
@@ -775,7 +775,7 @@ ValueObjectSP StackFrame::GetValueForVar
           // what we have is *ptr[low]. the most similar C++ syntax is to deref
           // ptr and extract bit low out of it. reading array item low would be
           // done by saying ptr[low], without a deref * sign
-          Error error;
+          Status error;
           ValueObjectSP temp(valobj_sp->Dereference(error));
           if (error.Fail()) {
             valobj_sp->GetExpressionPath(var_expr_path_strm, false);
@@ -794,7 +794,7 @@ ValueObjectSP StackFrame::GetValueForVar
           // (an operation that is equivalent to deref-ing arr)
           // and extract bit low out of it. reading array item low
           // would be done by saying arr[low], without a deref * sign
-          Error error;
+          Status error;
           ValueObjectSP temp(valobj_sp->GetChildAtIndex(0, true));
           if (error.Fail()) {
             valobj_sp->GetExpressionPath(var_expr_path_strm, false);
@@ -977,7 +977,7 @@ ValueObjectSP StackFrame::GetValueForVar
         // deref ptr and extract bits low thru high out of it. reading array
         // items low thru high would be done by saying ptr[low-high], without
         // a deref * sign
-        Error error;
+        Status error;
         ValueObjectSP temp(valobj_sp->Dereference(error));
         if (error.Fail()) {
           valobj_sp->GetExpressionPath(var_expr_path_strm, false);
@@ -994,7 +994,7 @@ ValueObjectSP StackFrame::GetValueForVar
         // arr[0] (an operation that is equivalent to deref-ing arr) and extract
         // bits low thru high out of it. reading array items low thru high would
         // be done by saying arr[low-high], without a deref * sign
-        Error error;
+        Status error;
         ValueObjectSP temp(valobj_sp->GetChildAtIndex(0, true));
         if (error.Fail()) {
           valobj_sp->GetExpressionPath(var_expr_path_strm, false);
@@ -1065,7 +1065,7 @@ ValueObjectSP StackFrame::GetValueForVar
   return valobj_sp;
 }
 
-bool StackFrame::GetFrameBaseValue(Scalar &frame_base, Error *error_ptr) {
+bool StackFrame::GetFrameBaseValue(Scalar &frame_base, Status *error_ptr) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   if (!m_cfa_is_valid) {
     m_frame_base_error.SetErrorString(
@@ -1111,7 +1111,7 @@ bool StackFrame::GetFrameBaseValue(Scala
   return m_frame_base_error.Success();
 }
 
-DWARFExpression *StackFrame::GetFrameBaseExpression(Error *error_ptr) {
+DWARFExpression *StackFrame::GetFrameBaseExpression(Status *error_ptr) {
   if (!m_sc.function) {
     if (error_ptr) {
       error_ptr->SetErrorString("No function in symbol context.");
@@ -1426,7 +1426,7 @@ ValueObjectSP GetValueForDereferincingOf
     return ValueObjectSP();
   }
 
-  Error error;
+  Status error;
   ValueObjectSP pointee = base->Dereference(error);
     
   if (!pointee) {

Modified: lldb/trunk/source/Target/StopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/StopInfo.cpp (original)
+++ lldb/trunk/source/Target/StopInfo.cpp Thu May 11 23:51:55 2017
@@ -435,7 +435,7 @@ protected:
             // shouldn't stop that will win.
 
             if (bp_loc_sp->GetConditionText() != nullptr) {
-              Error condition_error;
+              Status condition_error;
               bool condition_says_stop =
                   bp_loc_sp->ConditionSaysStop(exe_ctx, condition_error);
 
@@ -796,7 +796,7 @@ protected:
           expr_options.SetUnwindOnError(true);
           expr_options.SetIgnoreBreakpoints(true);
           ValueObjectSP result_value_sp;
-          Error error;
+          Status error;
           result_code = UserExpression::Evaluate(
               exe_ctx, expr_options, wp_sp->GetConditionText(),
               llvm::StringRef(), result_value_sp, error);

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu May 11 23:51:55 2017
@@ -182,7 +182,7 @@ const lldb::ProcessSP &Target::CreatePro
 
 const lldb::ProcessSP &Target::GetProcessSP() const { return m_process_sp; }
 
-lldb::REPLSP Target::GetREPL(Error &err, lldb::LanguageType language,
+lldb::REPLSP Target::GetREPL(Status &err, lldb::LanguageType language,
                              const char *repl_options, bool can_create) {
   if (language == eLanguageTypeUnknown) {
     std::set<LanguageType> repl_languages;
@@ -547,7 +547,7 @@ BreakpointSP Target::CreateFuncRegexBrea
 lldb::BreakpointSP
 Target::CreateExceptionBreakpoint(enum lldb::LanguageType language,
                                   bool catch_bp, bool throw_bp, bool internal,
-                                  Args *additional_args, Error *error) {
+                                  Args *additional_args, Status *error) {
   BreakpointSP exc_bkpt_sp = LanguageRuntime::CreateExceptionBreakpoint(
       *this, language, catch_bp, throw_bp, internal);
   if (exc_bkpt_sp && additional_args) {
@@ -604,9 +604,9 @@ bool Target::ProcessIsValid() {
   return (m_process_sp && m_process_sp->IsAlive());
 }
 
-static bool CheckIfWatchpointsExhausted(Target *target, Error &error) {
+static bool CheckIfWatchpointsExhausted(Target *target, Status &error) {
   uint32_t num_supported_hardware_watchpoints;
-  Error rc = target->GetProcessSP()->GetWatchpointSupportInfo(
+  Status rc = target->GetProcessSP()->GetWatchpointSupportInfo(
       num_supported_hardware_watchpoints);
   if (num_supported_hardware_watchpoints == 0) {
     error.SetErrorStringWithFormat(
@@ -621,7 +621,7 @@ static bool CheckIfWatchpointsExhausted(
 // the OptionGroupWatchpoint::WatchType enum type.
 WatchpointSP Target::CreateWatchpoint(lldb::addr_t addr, size_t size,
                                       const CompilerType *type, uint32_t kind,
-                                      Error &error) {
+                                      Status &error) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
   if (log)
     log->Printf("Target::%s (addr = 0x%8.8" PRIx64 " size = %" PRIu64
@@ -797,10 +797,10 @@ bool Target::EnableBreakpointByID(break_
   return false;
 }
 
-Error Target::SerializeBreakpointsToFile(const FileSpec &file,
-                                         const BreakpointIDList &bp_ids,
-                                         bool append) {
-  Error error;
+Status Target::SerializeBreakpointsToFile(const FileSpec &file,
+                                          const BreakpointIDList &bp_ids,
+                                          bool append) {
+  Status error;
 
   if (!file) {
     error.SetErrorString("Invalid FileSpec.");
@@ -891,19 +891,19 @@ Error Target::SerializeBreakpointsToFile
   return error;
 }
 
-Error Target::CreateBreakpointsFromFile(const FileSpec &file,
-                                        BreakpointIDList &new_bps) {
+Status Target::CreateBreakpointsFromFile(const FileSpec &file,
+                                         BreakpointIDList &new_bps) {
   std::vector<std::string> no_names;
   return CreateBreakpointsFromFile(file, no_names, new_bps);
 }
 
-Error Target::CreateBreakpointsFromFile(const FileSpec &file,
-                                        std::vector<std::string> &names,
-                                        BreakpointIDList &new_bps) {
+Status Target::CreateBreakpointsFromFile(const FileSpec &file,
+                                         std::vector<std::string> &names,
+                                         BreakpointIDList &new_bps) {
   std::unique_lock<std::recursive_mutex> lock;
   GetBreakpointList().GetListMutex(lock);
 
-  Error error;
+  Status error;
   StructuredData::ObjectSP input_data_sp =
       StructuredData::ParseJSONFromFile(file, error);
   if (!error.Success()) {
@@ -979,7 +979,7 @@ bool Target::RemoveAllWatchpoints(bool e
     if (!wp_sp)
       return false;
 
-    Error rc = m_process_sp->DisableWatchpoint(wp_sp.get());
+    Status rc = m_process_sp->DisableWatchpoint(wp_sp.get());
     if (rc.Fail())
       return false;
   }
@@ -1011,7 +1011,7 @@ bool Target::DisableAllWatchpoints(bool
     if (!wp_sp)
       return false;
 
-    Error rc = m_process_sp->DisableWatchpoint(wp_sp.get());
+    Status rc = m_process_sp->DisableWatchpoint(wp_sp.get());
     if (rc.Fail())
       return false;
   }
@@ -1041,7 +1041,7 @@ bool Target::EnableAllWatchpoints(bool e
     if (!wp_sp)
       return false;
 
-    Error rc = m_process_sp->EnableWatchpoint(wp_sp.get());
+    Status rc = m_process_sp->EnableWatchpoint(wp_sp.get());
     if (rc.Fail())
       return false;
   }
@@ -1114,7 +1114,7 @@ bool Target::DisableWatchpointByID(lldb:
 
   WatchpointSP wp_sp = m_watchpoint_list.FindByID(watch_id);
   if (wp_sp) {
-    Error rc = m_process_sp->DisableWatchpoint(wp_sp.get());
+    Status rc = m_process_sp->DisableWatchpoint(wp_sp.get());
     if (rc.Success())
       return true;
 
@@ -1134,7 +1134,7 @@ bool Target::EnableWatchpointByID(lldb::
 
   WatchpointSP wp_sp = m_watchpoint_list.FindByID(watch_id);
   if (wp_sp) {
-    Error rc = m_process_sp->EnableWatchpoint(wp_sp.get());
+    Status rc = m_process_sp->EnableWatchpoint(wp_sp.get());
     if (rc.Success())
       return true;
 
@@ -1198,7 +1198,7 @@ Module *Target::GetExecutableModulePoint
 
 static void LoadScriptingResourceForModule(const ModuleSP &module_sp,
                                            Target *target) {
-  Error error;
+  Status error;
   StreamString feedback_stream;
   if (module_sp &&
       !module_sp->LoadScriptingResourceInTarget(target, error,
@@ -1335,9 +1335,9 @@ bool Target::SetArchitecture(const ArchS
                   arch_spec.GetArchitectureName(),
                   arch_spec.GetTriple().getTriple().c_str());
     ModuleSpec module_spec(executable_sp->GetFileSpec(), other);
-    Error error = ModuleList::GetSharedModule(module_spec, executable_sp,
-                                              &GetExecutableSearchPaths(),
-                                              nullptr, nullptr);
+    Status error = ModuleList::GetSharedModule(module_spec, executable_sp,
+                                               &GetExecutableSearchPaths(),
+                                               nullptr, nullptr);
 
     if (!error.Fail() && executable_sp) {
       SetExecutableModule(executable_sp, true);
@@ -1474,7 +1474,7 @@ bool Target::ModuleIsExcludedForUnconstr
 }
 
 size_t Target::ReadMemoryFromFileCache(const Address &addr, void *dst,
-                                       size_t dst_len, Error &error) {
+                                       size_t dst_len, Status &error) {
   SectionSP section_sp(addr.GetSection());
   if (section_sp) {
     // If the contents of this section are encrypted, the on-disk file is
@@ -1506,7 +1506,7 @@ size_t Target::ReadMemoryFromFileCache(c
 }
 
 size_t Target::ReadMemory(const Address &addr, bool prefer_file_cache,
-                          void *dst, size_t dst_len, Error &error,
+                          void *dst, size_t dst_len, Status &error,
                           lldb::addr_t *load_addr_ptr) {
   error.Clear();
 
@@ -1598,7 +1598,7 @@ size_t Target::ReadMemory(const Address
 }
 
 size_t Target::ReadCStringFromMemory(const Address &addr, std::string &out_str,
-                                     Error &error) {
+                                     Status &error) {
   char buf[256];
   out_str.clear();
   addr_t curr_addr = addr.GetLoadAddress(this);
@@ -1620,13 +1620,13 @@ size_t Target::ReadCStringFromMemory(con
 }
 
 size_t Target::ReadCStringFromMemory(const Address &addr, char *dst,
-                                     size_t dst_max_len, Error &result_error) {
+                                     size_t dst_max_len, Status &result_error) {
   size_t total_cstr_len = 0;
   if (dst && dst_max_len) {
     result_error.Clear();
     // NULL out everything just to be safe
     memset(dst, 0, dst_max_len);
-    Error error;
+    Status error;
     addr_t curr_addr = addr.GetLoadAddress(this);
     Address address(addr);
 
@@ -1675,7 +1675,7 @@ size_t Target::ReadCStringFromMemory(con
 size_t Target::ReadScalarIntegerFromMemory(const Address &addr,
                                            bool prefer_file_cache,
                                            uint32_t byte_size, bool is_signed,
-                                           Scalar &scalar, Error &error) {
+                                           Scalar &scalar, Status &error) {
   uint64_t uval;
 
   if (byte_size <= sizeof(uval)) {
@@ -1705,7 +1705,7 @@ uint64_t Target::ReadUnsignedIntegerFrom
                                                bool prefer_file_cache,
                                                size_t integer_byte_size,
                                                uint64_t fail_value,
-                                               Error &error) {
+                                               Status &error) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(addr, prefer_file_cache, integer_byte_size,
                                   false, scalar, error))
@@ -1714,7 +1714,7 @@ uint64_t Target::ReadUnsignedIntegerFrom
 }
 
 bool Target::ReadPointerFromMemory(const Address &addr, bool prefer_file_cache,
-                                   Error &error, Address &pointer_addr) {
+                                   Status &error, Address &pointer_addr) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(addr, prefer_file_cache,
                                   m_arch.GetAddressByteSize(), false, scalar,
@@ -1744,10 +1744,10 @@ bool Target::ReadPointerFromMemory(const
 }
 
 ModuleSP Target::GetSharedModule(const ModuleSpec &module_spec,
-                                 Error *error_ptr) {
+                                 Status *error_ptr) {
   ModuleSP module_sp;
 
-  Error error;
+  Status error;
 
   // First see if we already have this module in our module list.  If we do,
   // then we're done, we don't need
@@ -1918,7 +1918,7 @@ void Target::ImageSearchPathsChanged(con
     target->SetExecutableModule(exe_module_sp, true);
 }
 
-TypeSystem *Target::GetScratchTypeSystemForLanguage(Error *error,
+TypeSystem *Target::GetScratchTypeSystemForLanguage(Status *error,
                                                     lldb::LanguageType language,
                                                     bool create_on_demand) {
   if (!m_valid)
@@ -1968,8 +1968,8 @@ Target::GetPersistentExpressionStateForL
 UserExpression *Target::GetUserExpressionForLanguage(
     llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
     Expression::ResultType desired_type,
-    const EvaluateExpressionOptions &options, Error &error) {
-  Error type_system_error;
+    const EvaluateExpressionOptions &options, Status &error) {
+  Status type_system_error;
 
   TypeSystem *type_system =
       GetScratchTypeSystemForLanguage(&type_system_error, language);
@@ -1996,8 +1996,8 @@ UserExpression *Target::GetUserExpressio
 FunctionCaller *Target::GetFunctionCallerForLanguage(
     lldb::LanguageType language, const CompilerType &return_type,
     const Address &function_address, const ValueList &arg_value_list,
-    const char *name, Error &error) {
-  Error type_system_error;
+    const char *name, Status &error) {
+  Status type_system_error;
   TypeSystem *type_system =
       GetScratchTypeSystemForLanguage(&type_system_error, language);
   FunctionCaller *persistent_fn = nullptr;
@@ -2023,8 +2023,8 @@ FunctionCaller *Target::GetFunctionCalle
 UtilityFunction *
 Target::GetUtilityFunctionForLanguage(const char *text,
                                       lldb::LanguageType language,
-                                      const char *name, Error &error) {
-  Error type_system_error;
+                                      const char *name, Status &error) {
+  Status type_system_error;
   TypeSystem *type_system =
       GetScratchTypeSystemForLanguage(&type_system_error, language);
   UtilityFunction *utility_fn = nullptr;
@@ -2162,7 +2162,7 @@ ExpressionResults Target::EvaluateExpres
     execution_results = eExpressionCompleted;
   } else {
     const char *prefix = GetExpressionPrefixContentsAsCString();
-    Error error;
+    Status error;
     execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix,
                                                  result_valobj_sp, error,
                                                  0, // Line Number
@@ -2653,8 +2653,8 @@ const TargetPropertiesSP &Target::GetGlo
   return *g_settings_sp_ptr;
 }
 
-Error Target::Install(ProcessLaunchInfo *launch_info) {
-  Error error;
+Status Target::Install(ProcessLaunchInfo *launch_info) {
+  Status error;
   PlatformSP platform_sp(GetPlatform());
   if (platform_sp) {
     if (platform_sp->IsRemote()) {
@@ -2784,8 +2784,8 @@ bool Target::SetSectionUnloaded(const ll
 
 void Target::ClearAllLoadedSections() { m_section_load_history.Clear(); }
 
-Error Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) {
-  Error error;
+Status Target::Launch(ProcessLaunchInfo &launch_info, Stream *stream) {
+  Status error;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET));
 
   if (log)
@@ -2933,7 +2933,7 @@ Error Target::Launch(ProcessLaunchInfo &
             error = m_process_sp->PrivateResume();
           }
           if (!error.Success()) {
-            Error error2;
+            Status error2;
             error2.SetErrorStringWithFormat(
                 "process resume at entry point failed: %s", error.AsCString());
             error = error2;
@@ -2971,7 +2971,7 @@ Error Target::Launch(ProcessLaunchInfo &
     }
     m_process_sp->RestoreProcessEvents();
   } else {
-    Error error2;
+    Status error2;
     error2.SetErrorStringWithFormat("process launch failed: %s",
                                     error.AsCString());
     error = error2;
@@ -2979,15 +2979,15 @@ Error Target::Launch(ProcessLaunchInfo &
   return error;
 }
 
-Error Target::Attach(ProcessAttachInfo &attach_info, Stream *stream) {
+Status Target::Attach(ProcessAttachInfo &attach_info, Stream *stream) {
   auto state = eStateInvalid;
   auto process_sp = GetProcessSP();
   if (process_sp) {
     state = process_sp->GetState();
     if (process_sp->IsAlive() && state != eStateConnected) {
       if (state == eStateAttaching)
-        return Error("process attach is in progress");
-      return Error("a process is already being debugged");
+        return Status("process attach is in progress");
+      return Status("a process is already being debugged");
     }
   }
 
@@ -3001,8 +3001,8 @@ Error Target::Attach(ProcessAttachInfo &
           old_exec_module_sp->GetPlatformFileSpec().GetFilename();
 
     if (!attach_info.ProcessInfoSpecified()) {
-      return Error("no process specified, create a target with a file, or "
-                   "specify the --pid or --name");
+      return Status("no process specified, create a target with a file, or "
+                    "specify the --pid or --name");
     }
   }
 
@@ -3016,7 +3016,7 @@ Error Target::Attach(ProcessAttachInfo &
     attach_info.SetHijackListener(hijack_listener_sp);
   }
 
-  Error error;
+  Status error;
   if (state != eStateConnected && platform_sp != nullptr &&
       platform_sp->CanDebugProcess()) {
     SetPlatform(platform_sp);

Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Thu May 11 23:51:55 2017
@@ -55,33 +55,33 @@ TargetList::~TargetList() {
   m_target_list.clear();
 }
 
-Error TargetList::CreateTarget(Debugger &debugger,
-                               llvm::StringRef user_exe_path,
-                               llvm::StringRef triple_str,
-                               bool get_dependent_files,
-                               const OptionGroupPlatform *platform_options,
-                               TargetSP &target_sp) {
+Status TargetList::CreateTarget(Debugger &debugger,
+                                llvm::StringRef user_exe_path,
+                                llvm::StringRef triple_str,
+                                bool get_dependent_files,
+                                const OptionGroupPlatform *platform_options,
+                                TargetSP &target_sp) {
   return CreateTargetInternal(debugger, user_exe_path, triple_str,
                               get_dependent_files, platform_options, target_sp,
                               false);
 }
 
-Error TargetList::CreateTarget(Debugger &debugger,
-                               llvm::StringRef user_exe_path,
-                               const ArchSpec &specified_arch,
-                               bool get_dependent_files,
-                               PlatformSP &platform_sp, TargetSP &target_sp) {
+Status TargetList::CreateTarget(Debugger &debugger,
+                                llvm::StringRef user_exe_path,
+                                const ArchSpec &specified_arch,
+                                bool get_dependent_files,
+                                PlatformSP &platform_sp, TargetSP &target_sp) {
   return CreateTargetInternal(debugger, user_exe_path, specified_arch,
                               get_dependent_files, platform_sp, target_sp,
                               false);
 }
 
-Error TargetList::CreateTargetInternal(
+Status TargetList::CreateTargetInternal(
     Debugger &debugger, llvm::StringRef user_exe_path,
     llvm::StringRef triple_str, bool get_dependent_files,
     const OptionGroupPlatform *platform_options, TargetSP &target_sp,
     bool is_dummy_target) {
-  Error error;
+  Status error;
   PlatformSP platform_sp;
 
   // This is purposely left empty unless it is specified by triple_cstr.
@@ -302,34 +302,34 @@ lldb::TargetSP TargetList::GetDummyTarge
     ArchSpec arch(Target::GetDefaultArchitecture());
     if (!arch.IsValid())
       arch = HostInfo::GetArchitecture();
-    Error err = CreateDummyTarget(
+    Status err = CreateDummyTarget(
         debugger, arch.GetTriple().getTriple().c_str(), m_dummy_target_sp);
   }
 
   return m_dummy_target_sp;
 }
 
-Error TargetList::CreateDummyTarget(Debugger &debugger,
-                                    llvm::StringRef specified_arch_name,
-                                    lldb::TargetSP &target_sp) {
+Status TargetList::CreateDummyTarget(Debugger &debugger,
+                                     llvm::StringRef specified_arch_name,
+                                     lldb::TargetSP &target_sp) {
   PlatformSP host_platform_sp(Platform::GetHostPlatform());
   return CreateTargetInternal(
       debugger, (const char *)nullptr, specified_arch_name, false,
       (const OptionGroupPlatform *)nullptr, target_sp, true);
 }
 
-Error TargetList::CreateTargetInternal(Debugger &debugger,
-                                       llvm::StringRef user_exe_path,
-                                       const ArchSpec &specified_arch,
-                                       bool get_dependent_files,
-                                       lldb::PlatformSP &platform_sp,
-                                       lldb::TargetSP &target_sp,
-                                       bool is_dummy_target) {
+Status TargetList::CreateTargetInternal(Debugger &debugger,
+                                        llvm::StringRef user_exe_path,
+                                        const ArchSpec &specified_arch,
+                                        bool get_dependent_files,
+                                        lldb::PlatformSP &platform_sp,
+                                        lldb::TargetSP &target_sp,
+                                        bool is_dummy_target) {
   Timer scoped_timer(LLVM_PRETTY_FUNCTION,
                      "TargetList::CreateTarget (file = '%s', arch = '%s')",
                      user_exe_path.str().c_str(),
                      specified_arch.GetArchitectureName());
-  Error error;
+  Status error;
 
   ArchSpec arch(specified_arch);
 

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Thu May 11 23:51:55 2017
@@ -1335,8 +1335,8 @@ bool Thread::PlanIsBasePlan(ThreadPlan *
     return m_plan_stack[0].get() == plan_ptr;
 }
 
-Error Thread::UnwindInnermostExpression() {
-  Error error;
+Status Thread::UnwindInnermostExpression() {
+  Status error;
   int stack_size = m_plan_stack.size();
 
   // If the input plan is nullptr, discard all plans.  Otherwise make sure this
@@ -1635,11 +1635,11 @@ lldb::StackFrameSP Thread::GetFrameWithC
   return GetStackFrameList()->GetFrameWithConcreteFrameIndex(unwind_idx);
 }
 
-Error Thread::ReturnFromFrameWithIndex(uint32_t frame_idx,
-                                       lldb::ValueObjectSP return_value_sp,
-                                       bool broadcast) {
+Status Thread::ReturnFromFrameWithIndex(uint32_t frame_idx,
+                                        lldb::ValueObjectSP return_value_sp,
+                                        bool broadcast) {
   StackFrameSP frame_sp = GetStackFrameAtIndex(frame_idx);
-  Error return_error;
+  Status return_error;
 
   if (!frame_sp) {
     return_error.SetErrorStringWithFormat(
@@ -1650,10 +1650,10 @@ Error Thread::ReturnFromFrameWithIndex(u
   return ReturnFromFrame(frame_sp, return_value_sp, broadcast);
 }
 
-Error Thread::ReturnFromFrame(lldb::StackFrameSP frame_sp,
-                              lldb::ValueObjectSP return_value_sp,
-                              bool broadcast) {
-  Error return_error;
+Status Thread::ReturnFromFrame(lldb::StackFrameSP frame_sp,
+                               lldb::ValueObjectSP return_value_sp,
+                               bool broadcast) {
+  Status return_error;
 
   if (!frame_sp) {
     return_error.SetErrorString("Can't return to a null frame.");
@@ -1740,8 +1740,8 @@ static void DumpAddressList(Stream &s, c
   }
 }
 
-Error Thread::JumpToLine(const FileSpec &file, uint32_t line,
-                         bool can_leave_function, std::string *warnings) {
+Status Thread::JumpToLine(const FileSpec &file, uint32_t line,
+                          bool can_leave_function, std::string *warnings) {
   ExecutionContext exe_ctx(GetStackFrameAtIndex(0));
   Target *target = exe_ctx.GetTargetPtr();
   TargetSP target_sp = exe_ctx.GetTargetSP();
@@ -1769,16 +1769,16 @@ Error Thread::JumpToLine(const FileSpec
   // Check if we got anything.
   if (candidates.empty()) {
     if (outside_function.empty()) {
-      return Error("Cannot locate an address for %s:%i.",
-                   file.GetFilename().AsCString(), line);
+      return Status("Cannot locate an address for %s:%i.",
+                    file.GetFilename().AsCString(), line);
     } else if (outside_function.size() == 1) {
-      return Error("%s:%i is outside the current function.",
-                   file.GetFilename().AsCString(), line);
+      return Status("%s:%i is outside the current function.",
+                    file.GetFilename().AsCString(), line);
     } else {
       StreamString sstr;
       DumpAddressList(sstr, outside_function, target);
-      return Error("%s:%i has multiple candidate locations:\n%s",
-                   file.GetFilename().AsCString(), line, sstr.GetData());
+      return Status("%s:%i has multiple candidate locations:\n%s",
+                    file.GetFilename().AsCString(), line, sstr.GetData());
     }
   }
 
@@ -1794,9 +1794,9 @@ Error Thread::JumpToLine(const FileSpec
   }
 
   if (!reg_ctx->SetPC(dest))
-    return Error("Cannot change PC to target address.");
+    return Status("Cannot change PC to target address.");
 
-  return Error();
+  return Status();
 }
 
 void Thread::DumpUsingSettingsFormat(Stream &strm, uint32_t frame_idx,
@@ -2117,12 +2117,12 @@ bool Thread::IsStillAtLastBreakpointHit(
   return false;
 }
 
-Error Thread::StepIn(bool source_step,
-                     LazyBool step_in_avoids_code_without_debug_info,
-                     LazyBool step_out_avoids_code_without_debug_info)
+Status Thread::StepIn(bool source_step,
+                      LazyBool step_in_avoids_code_without_debug_info,
+                      LazyBool step_out_avoids_code_without_debug_info)
 
 {
-  Error error;
+  Status error;
   Process *process = GetProcess().get();
   if (StateIsStoppedState(process->GetState(), true)) {
     StackFrameSP frame_sp = GetStackFrameAtIndex(0);
@@ -2153,9 +2153,9 @@ Error Thread::StepIn(bool source_step,
   return error;
 }
 
-Error Thread::StepOver(bool source_step,
-                       LazyBool step_out_avoids_code_without_debug_info) {
-  Error error;
+Status Thread::StepOver(bool source_step,
+                        LazyBool step_out_avoids_code_without_debug_info) {
+  Status error;
   Process *process = GetProcess().get();
   if (StateIsStoppedState(process->GetState(), true)) {
     StackFrameSP frame_sp = GetStackFrameAtIndex(0);
@@ -2186,8 +2186,8 @@ Error Thread::StepOver(bool source_step,
   return error;
 }
 
-Error Thread::StepOut() {
-  Error error;
+Status Thread::StepOut() {
+  Status error;
   Process *process = GetProcess().get();
   if (StateIsStoppedState(process->GetState(), true)) {
     const bool first_instruction = false;

Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Thu May 11 23:51:55 2017
@@ -58,7 +58,7 @@ bool ThreadPlanCallFunction::Constructor
   // If we can't read memory at the point of the process where we are planning
   // to put our function, we're
   // not going to get any further...
-  Error error;
+  Status error;
   process_sp->ReadUnsignedIntegerFromMemory(m_function_sp, 4, 0, error);
   if (!error.Success()) {
     m_constructor_errors.Printf(

Modified: lldb/trunk/source/Target/ThreadPlanTracer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanTracer.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanTracer.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanTracer.cpp Thu May 11 23:51:55 2017
@@ -145,7 +145,7 @@ void ThreadPlanAssemblyTracer::Log() {
 
   Disassembler *disassembler = GetDisassembler();
   if (disassembler) {
-    Error err;
+    Status err;
     process_sp->ReadMemory(pc, buffer, sizeof(buffer), err);
 
     if (err.Success()) {

Modified: lldb/trunk/source/Target/ThreadSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadSpec.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadSpec.cpp (original)
+++ lldb/trunk/source/Target/ThreadSpec.cpp Thu May 11 23:51:55 2017
@@ -39,7 +39,7 @@ const ThreadSpec &ThreadSpec::operator=(
 }
 
 std::unique_ptr<ThreadSpec> ThreadSpec::CreateFromStructuredData(
-    const StructuredData::Dictionary &spec_dict, Error &error) {
+    const StructuredData::Dictionary &spec_dict, Status &error) {
   uint32_t index = UINT32_MAX;
   lldb::tid_t tid = LLDB_INVALID_THREAD_ID;
   std::string name;

Modified: lldb/trunk/source/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/CMakeLists.txt?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Utility/CMakeLists.txt Thu May 11 23:51:55 2017
@@ -5,7 +5,6 @@ add_lldb_library(lldbUtility
   DataBufferLLVM.cpp
   DataEncoder.cpp
   DataExtractor.cpp
-  Error.cpp
   FastDemangle.cpp
   FileSpec.cpp
   History.cpp
@@ -18,6 +17,7 @@ add_lldb_library(lldbUtility
   RegularExpression.cpp
   SelectHelper.cpp
   SharingPtr.cpp
+  Status.cpp
   Stream.cpp
   StreamCallback.cpp
   StreamGDBRemote.cpp

Removed: lldb/trunk/source/Utility/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Error.cpp?rev=302871&view=auto
==============================================================================
--- lldb/trunk/source/Utility/Error.cpp (original)
+++ lldb/trunk/source/Utility/Error.cpp (removed)
@@ -1,274 +0,0 @@
-//===-- Error.cpp -----------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/Error.h"
-
-#include "lldb/Utility/VASPrintf.h"
-#include "lldb/lldb-defines.h"            // for LLDB_GENERIC_ERROR
-#include "lldb/lldb-enumerations.h"       // for ErrorType, ErrorType::eErr...
-#include "llvm/ADT/SmallString.h"         // for SmallString
-#include "llvm/ADT/StringRef.h"           // for StringRef
-#include "llvm/Support/FormatProviders.h" // for format_provider
-
-#include <cerrno>
-#include <cstdarg>
-#include <string> // for string
-#include <system_error>
-
-#ifdef __APPLE__
-#include <mach/mach.h>
-#endif
-
-#include <stdint.h> // for uint32_t
-#include <string.h> // for strerror
-
-namespace llvm {
-class raw_ostream;
-}
-
-using namespace lldb;
-using namespace lldb_private;
-
-Error::Error() : m_code(0), m_type(eErrorTypeInvalid), m_string() {}
-
-Error::Error(ValueType err, ErrorType type)
-    : m_code(err), m_type(type), m_string() {}
-
-Error::Error(std::error_code EC)
-    : m_code(EC.value()), m_type(ErrorType::eErrorTypeGeneric),
-      m_string(EC.message()) {}
-
-Error::Error(const Error &rhs) = default;
-
-Error::Error(const char *format, ...)
-    : m_code(0), m_type(eErrorTypeInvalid), m_string() {
-  va_list args;
-  va_start(args, format);
-  SetErrorToGenericError();
-  SetErrorStringWithVarArg(format, args);
-  va_end(args);
-}
-
-//----------------------------------------------------------------------
-// Assignment operator
-//----------------------------------------------------------------------
-const Error &Error::operator=(const Error &rhs) {
-  if (this != &rhs) {
-    m_code = rhs.m_code;
-    m_type = rhs.m_type;
-    m_string = rhs.m_string;
-  }
-  return *this;
-}
-
-//----------------------------------------------------------------------
-// Assignment operator
-//----------------------------------------------------------------------
-const Error &Error::operator=(uint32_t err) {
-  m_code = err;
-  m_type = eErrorTypeMachKernel;
-  m_string.clear();
-  return *this;
-}
-
-Error::~Error() = default;
-
-//----------------------------------------------------------------------
-// Get the error value as a NULL C string. The error string will be
-// fetched and cached on demand. The cached error string value will
-// remain until the error value is changed or cleared.
-//----------------------------------------------------------------------
-const char *Error::AsCString(const char *default_error_str) const {
-  if (Success())
-    return nullptr;
-
-  if (m_string.empty()) {
-    const char *s = nullptr;
-    switch (m_type) {
-    case eErrorTypeMachKernel:
-#if defined(__APPLE__)
-      s = ::mach_error_string(m_code);
-#endif
-      break;
-
-    case eErrorTypePOSIX:
-      s = ::strerror(m_code);
-      break;
-
-    default:
-      break;
-    }
-    if (s != nullptr)
-      m_string.assign(s);
-  }
-  if (m_string.empty()) {
-    if (default_error_str)
-      m_string.assign(default_error_str);
-    else
-      return nullptr; // User wanted a nullptr string back...
-  }
-  return m_string.c_str();
-}
-
-//----------------------------------------------------------------------
-// Clear the error and any cached error string that it might contain.
-//----------------------------------------------------------------------
-void Error::Clear() {
-  m_code = 0;
-  m_type = eErrorTypeInvalid;
-  m_string.clear();
-}
-
-//----------------------------------------------------------------------
-// Access the error value.
-//----------------------------------------------------------------------
-Error::ValueType Error::GetError() const { return m_code; }
-
-//----------------------------------------------------------------------
-// Access the error type.
-//----------------------------------------------------------------------
-ErrorType Error::GetType() const { return m_type; }
-
-//----------------------------------------------------------------------
-// Returns true if this object contains a value that describes an
-// error or otherwise non-success result.
-//----------------------------------------------------------------------
-bool Error::Fail() const { return m_code != 0; }
-
-//----------------------------------------------------------------------
-// Set accesssor for the error value to "err" and the type to
-// "eErrorTypeMachKernel"
-//----------------------------------------------------------------------
-void Error::SetMachError(uint32_t err) {
-  m_code = err;
-  m_type = eErrorTypeMachKernel;
-  m_string.clear();
-}
-
-void Error::SetExpressionError(lldb::ExpressionResults result,
-                               const char *mssg) {
-  m_code = result;
-  m_type = eErrorTypeExpression;
-  m_string = mssg;
-}
-
-int Error::SetExpressionErrorWithFormat(lldb::ExpressionResults result,
-                                        const char *format, ...) {
-  int length = 0;
-
-  if (format != nullptr && format[0]) {
-    va_list args;
-    va_start(args, format);
-    length = SetErrorStringWithVarArg(format, args);
-    va_end(args);
-  } else {
-    m_string.clear();
-  }
-  m_code = result;
-  m_type = eErrorTypeExpression;
-  return length;
-}
-
-//----------------------------------------------------------------------
-// Set accesssor for the error value and type.
-//----------------------------------------------------------------------
-void Error::SetError(ValueType err, ErrorType type) {
-  m_code = err;
-  m_type = type;
-  m_string.clear();
-}
-
-//----------------------------------------------------------------------
-// Update the error value to be "errno" and update the type to
-// be "POSIX".
-//----------------------------------------------------------------------
-void Error::SetErrorToErrno() {
-  m_code = errno;
-  m_type = eErrorTypePOSIX;
-  m_string.clear();
-}
-
-//----------------------------------------------------------------------
-// Update the error value to be LLDB_GENERIC_ERROR and update the type
-// to be "Generic".
-//----------------------------------------------------------------------
-void Error::SetErrorToGenericError() {
-  m_code = LLDB_GENERIC_ERROR;
-  m_type = eErrorTypeGeneric;
-  m_string.clear();
-}
-
-//----------------------------------------------------------------------
-// Set accessor for the error string value for a specific error.
-// This allows any string to be supplied as an error explanation.
-// The error string value will remain until the error value is
-// cleared or a new error value/type is assigned.
-//----------------------------------------------------------------------
-void Error::SetErrorString(llvm::StringRef err_str) {
-  if (!err_str.empty()) {
-    // If we have an error string, we should always at least have an error
-    // set to a generic value.
-    if (Success())
-      SetErrorToGenericError();
-  }
-  m_string = err_str;
-}
-
-//------------------------------------------------------------------
-/// Set the current error string to a formatted error string.
-///
-/// @param format
-///     A printf style format string
-//------------------------------------------------------------------
-int Error::SetErrorStringWithFormat(const char *format, ...) {
-  if (format != nullptr && format[0]) {
-    va_list args;
-    va_start(args, format);
-    int length = SetErrorStringWithVarArg(format, args);
-    va_end(args);
-    return length;
-  } else {
-    m_string.clear();
-  }
-  return 0;
-}
-
-int Error::SetErrorStringWithVarArg(const char *format, va_list args) {
-  if (format != nullptr && format[0]) {
-    // If we have an error string, we should always at least have
-    // an error set to a generic value.
-    if (Success())
-      SetErrorToGenericError();
-
-    llvm::SmallString<1024> buf;
-    VASprintf(buf, format, args);
-    m_string = buf.str();
-    return buf.size();
-  } else {
-    m_string.clear();
-  }
-  return 0;
-}
-
-//----------------------------------------------------------------------
-// Returns true if the error code in this object is considered a
-// successful return value.
-//----------------------------------------------------------------------
-bool Error::Success() const { return m_code == 0; }
-
-bool Error::WasInterrupted() const {
-  return (m_type == eErrorTypePOSIX && m_code == EINTR);
-}
-
-void llvm::format_provider<lldb_private::Error>::format(
-    const lldb_private::Error &error, llvm::raw_ostream &OS,
-    llvm::StringRef Options) {
-  llvm::format_provider<llvm::StringRef>::format(error.AsCString(), OS,
-                                                 Options);
-}

Modified: lldb/trunk/source/Utility/JSON.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/JSON.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Utility/JSON.cpp (original)
+++ lldb/trunk/source/Utility/JSON.cpp Thu May 11 23:51:55 2017
@@ -246,7 +246,7 @@ JSONParser::Token JSONParser::GetToken(s
             "error: an error occurred getting a character from offset %" PRIu64,
             start_index);
         value = std::move(error.GetString());
-        return Token::Error;
+        return Token::Status;
 
       } else {
         const bool is_end_quote = escaped_ch == '"';
@@ -259,13 +259,13 @@ JSONParser::Token JSONParser::GetToken(s
                          "character 0x%4.4x at offset %" PRIu64,
                          escaped_ch, start_index);
             value = std::move(error.GetString());
-            return Token::Error;
+            return Token::Status;
           }
         } else if (is_end_quote) {
           return Token::String;
         } else if (is_null) {
           value = "error: missing end quote for string";
-          return Token::Error;
+          return Token::Status;
         }
       }
     }
@@ -316,7 +316,7 @@ JSONParser::Token JSONParser::GetToken(s
           error.Printf("error: extra decimal point found at offset %" PRIu64,
                        start_index);
           value = std::move(error.GetString());
-          return Token::Error;
+          return Token::Status;
         } else {
           got_decimal_point = true;
           ++m_index; // Skip this character
@@ -330,7 +330,7 @@ JSONParser::Token JSONParser::GetToken(s
               "error: extra exponent character found at offset %" PRIu64,
               start_index);
           value = std::move(error.GetString());
-          return Token::Error;
+          return Token::Status;
         } else {
           exp_index = m_index;
           ++m_index; // Skip this character
@@ -346,7 +346,7 @@ JSONParser::Token JSONParser::GetToken(s
           error.Printf("error: unexpected %c character at offset %" PRIu64,
                        next_ch, start_index);
           value = std::move(error.GetString());
-          return Token::Error;
+          return Token::Status;
         }
         break;
 
@@ -368,7 +368,7 @@ JSONParser::Token JSONParser::GetToken(s
                          "at offset in float value \"%s\"",
                          value.c_str());
             value = std::move(error.GetString());
-            return Token::Error;
+            return Token::Status;
           }
         } else {
           // No exponent, but we need at least one decimal after the decimal
@@ -379,7 +379,7 @@ JSONParser::Token JSONParser::GetToken(s
             error.Printf("error: no digits after decimal point \"%s\"",
                          value.c_str());
             value = std::move(error.GetString());
-            return Token::Error;
+            return Token::Status;
           }
         }
       } else {
@@ -390,14 +390,14 @@ JSONParser::Token JSONParser::GetToken(s
         } else {
           error.Printf("error: no digits negate sign \"%s\"", value.c_str());
           value = std::move(error.GetString());
-          return Token::Error;
+          return Token::Status;
         }
       }
     } else {
       error.Printf("error: invalid number found at offset %" PRIu64,
                    start_index);
       value = std::move(error.GetString());
-      return Token::Error;
+      return Token::Status;
     }
   } break;
   default:
@@ -407,7 +407,7 @@ JSONParser::Token JSONParser::GetToken(s
                " (around character '%c')",
                start_index, ch);
   value = std::move(error.GetString());
-  return Token::Error;
+  return Token::Status;
 }
 
 int JSONParser::GetEscapedChar(bool &was_escaped) {

Modified: lldb/trunk/source/Utility/SelectHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/SelectHelper.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/source/Utility/SelectHelper.cpp (original)
+++ lldb/trunk/source/Utility/SelectHelper.cpp Thu May 11 23:51:55 2017
@@ -15,8 +15,8 @@
 #endif
 
 #include "lldb/Utility/SelectHelper.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/LLDBAssert.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/lldb-enumerations.h" // for ErrorType::eErrorTypePOSIX
 #include "lldb/lldb-types.h"        // for socket_t
 
@@ -90,14 +90,14 @@ static void updateMaxFd(llvm::Optional<l
     vold = std::max(*vold, vnew);
 }
 
-lldb_private::Error SelectHelper::Select() {
-  lldb_private::Error error;
+lldb_private::Status SelectHelper::Select() {
+  lldb_private::Status error;
 #ifdef _MSC_VER
   // On windows FD_SETSIZE limits the number of file descriptors, not their
   // numeric value.
   lldbassert(m_fd_map.size() <= FD_SETSIZE);
   if (m_fd_map.size() > FD_SETSIZE)
-    return lldb_private::Error("Too many file descriptors for select()");
+    return lldb_private::Status("Too many file descriptors for select()");
 #endif
 
   llvm::Optional<lldb::socket_t> max_read_fd;

Added: lldb/trunk/source/Utility/Status.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Status.cpp?rev=302872&view=auto
==============================================================================
--- lldb/trunk/source/Utility/Status.cpp (added)
+++ lldb/trunk/source/Utility/Status.cpp Thu May 11 23:51:55 2017
@@ -0,0 +1,275 @@
+//===-- Status.cpp -----------------------------------------------*- C++
+//-*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/Status.h"
+
+#include "lldb/Utility/VASPrintf.h"
+#include "lldb/lldb-defines.h"            // for LLDB_GENERIC_ERROR
+#include "lldb/lldb-enumerations.h"       // for ErrorType, ErrorType::eErr...
+#include "llvm/ADT/SmallString.h"         // for SmallString
+#include "llvm/ADT/StringRef.h"           // for StringRef
+#include "llvm/Support/FormatProviders.h" // for format_provider
+
+#include <cerrno>
+#include <cstdarg>
+#include <string> // for string
+#include <system_error>
+
+#ifdef __APPLE__
+#include <mach/mach.h>
+#endif
+
+#include <stdint.h> // for uint32_t
+#include <string.h> // for strerror
+
+namespace llvm {
+class raw_ostream;
+}
+
+using namespace lldb;
+using namespace lldb_private;
+
+Status::Status() : m_code(0), m_type(eErrorTypeInvalid), m_string() {}
+
+Status::Status(ValueType err, ErrorType type)
+    : m_code(err), m_type(type), m_string() {}
+
+Status::Status(std::error_code EC)
+    : m_code(EC.value()), m_type(ErrorType::eErrorTypeGeneric),
+      m_string(EC.message()) {}
+
+Status::Status(const Status &rhs) = default;
+
+Status::Status(const char *format, ...)
+    : m_code(0), m_type(eErrorTypeInvalid), m_string() {
+  va_list args;
+  va_start(args, format);
+  SetErrorToGenericError();
+  SetErrorStringWithVarArg(format, args);
+  va_end(args);
+}
+
+//----------------------------------------------------------------------
+// Assignment operator
+//----------------------------------------------------------------------
+const Status &Status::operator=(const Status &rhs) {
+  if (this != &rhs) {
+    m_code = rhs.m_code;
+    m_type = rhs.m_type;
+    m_string = rhs.m_string;
+  }
+  return *this;
+}
+
+//----------------------------------------------------------------------
+// Assignment operator
+//----------------------------------------------------------------------
+const Status &Status::operator=(uint32_t err) {
+  m_code = err;
+  m_type = eErrorTypeMachKernel;
+  m_string.clear();
+  return *this;
+}
+
+Status::~Status() = default;
+
+//----------------------------------------------------------------------
+// Get the error value as a NULL C string. The error string will be
+// fetched and cached on demand. The cached error string value will
+// remain until the error value is changed or cleared.
+//----------------------------------------------------------------------
+const char *Status::AsCString(const char *default_error_str) const {
+  if (Success())
+    return nullptr;
+
+  if (m_string.empty()) {
+    const char *s = nullptr;
+    switch (m_type) {
+    case eErrorTypeMachKernel:
+#if defined(__APPLE__)
+      s = ::mach_error_string(m_code);
+#endif
+      break;
+
+    case eErrorTypePOSIX:
+      s = ::strerror(m_code);
+      break;
+
+    default:
+      break;
+    }
+    if (s != nullptr)
+      m_string.assign(s);
+  }
+  if (m_string.empty()) {
+    if (default_error_str)
+      m_string.assign(default_error_str);
+    else
+      return nullptr; // User wanted a nullptr string back...
+  }
+  return m_string.c_str();
+}
+
+//----------------------------------------------------------------------
+// Clear the error and any cached error string that it might contain.
+//----------------------------------------------------------------------
+void Status::Clear() {
+  m_code = 0;
+  m_type = eErrorTypeInvalid;
+  m_string.clear();
+}
+
+//----------------------------------------------------------------------
+// Access the error value.
+//----------------------------------------------------------------------
+Status::ValueType Status::GetError() const { return m_code; }
+
+//----------------------------------------------------------------------
+// Access the error type.
+//----------------------------------------------------------------------
+ErrorType Status::GetType() const { return m_type; }
+
+//----------------------------------------------------------------------
+// Returns true if this object contains a value that describes an
+// error or otherwise non-success result.
+//----------------------------------------------------------------------
+bool Status::Fail() const { return m_code != 0; }
+
+//----------------------------------------------------------------------
+// Set accesssor for the error value to "err" and the type to
+// "eErrorTypeMachKernel"
+//----------------------------------------------------------------------
+void Status::SetMachError(uint32_t err) {
+  m_code = err;
+  m_type = eErrorTypeMachKernel;
+  m_string.clear();
+}
+
+void Status::SetExpressionError(lldb::ExpressionResults result,
+                                const char *mssg) {
+  m_code = result;
+  m_type = eErrorTypeExpression;
+  m_string = mssg;
+}
+
+int Status::SetExpressionErrorWithFormat(lldb::ExpressionResults result,
+                                         const char *format, ...) {
+  int length = 0;
+
+  if (format != nullptr && format[0]) {
+    va_list args;
+    va_start(args, format);
+    length = SetErrorStringWithVarArg(format, args);
+    va_end(args);
+  } else {
+    m_string.clear();
+  }
+  m_code = result;
+  m_type = eErrorTypeExpression;
+  return length;
+}
+
+//----------------------------------------------------------------------
+// Set accesssor for the error value and type.
+//----------------------------------------------------------------------
+void Status::SetError(ValueType err, ErrorType type) {
+  m_code = err;
+  m_type = type;
+  m_string.clear();
+}
+
+//----------------------------------------------------------------------
+// Update the error value to be "errno" and update the type to
+// be "POSIX".
+//----------------------------------------------------------------------
+void Status::SetErrorToErrno() {
+  m_code = errno;
+  m_type = eErrorTypePOSIX;
+  m_string.clear();
+}
+
+//----------------------------------------------------------------------
+// Update the error value to be LLDB_GENERIC_ERROR and update the type
+// to be "Generic".
+//----------------------------------------------------------------------
+void Status::SetErrorToGenericError() {
+  m_code = LLDB_GENERIC_ERROR;
+  m_type = eErrorTypeGeneric;
+  m_string.clear();
+}
+
+//----------------------------------------------------------------------
+// Set accessor for the error string value for a specific error.
+// This allows any string to be supplied as an error explanation.
+// The error string value will remain until the error value is
+// cleared or a new error value/type is assigned.
+//----------------------------------------------------------------------
+void Status::SetErrorString(llvm::StringRef err_str) {
+  if (!err_str.empty()) {
+    // If we have an error string, we should always at least have an error
+    // set to a generic value.
+    if (Success())
+      SetErrorToGenericError();
+  }
+  m_string = err_str;
+}
+
+//------------------------------------------------------------------
+/// Set the current error string to a formatted error string.
+///
+/// @param format
+///     A printf style format string
+//------------------------------------------------------------------
+int Status::SetErrorStringWithFormat(const char *format, ...) {
+  if (format != nullptr && format[0]) {
+    va_list args;
+    va_start(args, format);
+    int length = SetErrorStringWithVarArg(format, args);
+    va_end(args);
+    return length;
+  } else {
+    m_string.clear();
+  }
+  return 0;
+}
+
+int Status::SetErrorStringWithVarArg(const char *format, va_list args) {
+  if (format != nullptr && format[0]) {
+    // If we have an error string, we should always at least have
+    // an error set to a generic value.
+    if (Success())
+      SetErrorToGenericError();
+
+    llvm::SmallString<1024> buf;
+    VASprintf(buf, format, args);
+    m_string = buf.str();
+    return buf.size();
+  } else {
+    m_string.clear();
+  }
+  return 0;
+}
+
+//----------------------------------------------------------------------
+// Returns true if the error code in this object is considered a
+// successful return value.
+//----------------------------------------------------------------------
+bool Status::Success() const { return m_code == 0; }
+
+bool Status::WasInterrupted() const {
+  return (m_type == eErrorTypePOSIX && m_code == EINTR);
+}
+
+void llvm::format_provider<lldb_private::Status>::format(
+    const lldb_private::Status &error, llvm::raw_ostream &OS,
+    llvm::StringRef Options) {
+  llvm::format_provider<llvm::StringRef>::format(error.AsCString(), OS,
+                                                 Options);
+}

Modified: lldb/trunk/tools/debugserver/source/DNBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBError.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBError.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBError.h Thu May 11 23:51:55 2017
@@ -49,7 +49,7 @@ public:
     m_flavor = Generic;
     m_str.clear();
   }
-  ValueType Error() const { return m_err; }
+  ValueType Status() const { return m_err; }
   FlavorType Flavor() const { return m_flavor; }
 
   ValueType operator=(kern_return_t err) {

Modified: lldb/trunk/tools/debugserver/source/JSON.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/JSON.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/JSON.cpp (original)
+++ lldb/trunk/tools/debugserver/source/JSON.cpp Thu May 11 23:51:55 2017
@@ -282,7 +282,7 @@ JSONParser::Token JSONParser::GetToken(s
         error << "error: an error occurred getting a character from offset "
               << start_index;
         value = error.str();
-        return Token::Error;
+        return Token::Status;
 
       } else {
         const bool is_end_quote = escaped_ch == '"';
@@ -296,13 +296,13 @@ JSONParser::Token JSONParser::GetToken(s
                   << std::setprecision(4) << std::hex << escaped_ch;
             error << " at offset " << start_index;
             value = error.str();
-            return Token::Error;
+            return Token::Status;
           }
         } else if (is_end_quote) {
           return Token::String;
         } else if (is_null) {
           value = "error: missing end quote for string";
-          return Token::Error;
+          return Token::Status;
         }
       }
     }
@@ -352,7 +352,7 @@ JSONParser::Token JSONParser::GetToken(s
         if (got_decimal_point) {
           error << "error: extra decimal point found at offset " << start_index;
           value = error.str();
-          return Token::Error;
+          return Token::Status;
         } else {
           got_decimal_point = true;
           ++m_index; // Skip this character
@@ -365,7 +365,7 @@ JSONParser::Token JSONParser::GetToken(s
           error << "error: extra exponent character found at offset "
                 << start_index;
           value = error.str();
-          return Token::Error;
+          return Token::Status;
         } else {
           exp_index = m_index;
           ++m_index; // Skip this character
@@ -381,7 +381,7 @@ JSONParser::Token JSONParser::GetToken(s
           error << "error: unexpected " << next_ch << " character at offset "
                 << start_index;
           value = error.str();
-          return Token::Error;
+          return Token::Status;
         }
         break;
 
@@ -403,7 +403,7 @@ JSONParser::Token JSONParser::GetToken(s
                      "offset in float value \""
                   << value.c_str() << "\"";
             value = error.str();
-            return Token::Error;
+            return Token::Status;
           }
         } else {
           // No exponent, but we need at least one decimal after the decimal
@@ -414,7 +414,7 @@ JSONParser::Token JSONParser::GetToken(s
             error << "error: no digits after decimal point \"" << value.c_str()
                   << "\"";
             value = error.str();
-            return Token::Error;
+            return Token::Status;
           }
         }
       } else {
@@ -425,13 +425,13 @@ JSONParser::Token JSONParser::GetToken(s
         } else {
           error << "error: no digits negate sign \"" << value.c_str() << "\"";
           value = error.str();
-          return Token::Error;
+          return Token::Status;
         }
       }
     } else {
       error << "error: invalid number found at offset " << start_index;
       value = error.str();
-      return Token::Error;
+      return Token::Status;
     }
   } break;
   default:
@@ -440,7 +440,7 @@ JSONParser::Token JSONParser::GetToken(s
   error << "error: failed to parse token at offset " << start_index
         << " (around character '" << ch << "')";
   value = error.str();
-  return Token::Error;
+  return Token::Status;
 }
 
 int JSONParser::GetEscapedChar(bool &was_escaped) {

Modified: lldb/trunk/tools/debugserver/source/JSON.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/JSON.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/JSON.h (original)
+++ lldb/trunk/tools/debugserver/source/JSON.h Thu May 11 23:51:55 2017
@@ -270,7 +270,7 @@ class JSONParser : public StdStringExtra
 public:
   enum Token {
     Invalid,
-    Error,
+    Status,
     ObjectStart,
     ObjectEnd,
     ArrayStart,

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachException.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachException.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachException.cpp Thu May 11 23:51:55 2017
@@ -267,7 +267,7 @@ kern_return_t MachException::Message::Re
                     exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options, 0,
                     sizeof(exc_msg.data), port, mach_msg_timeout, notify_port);
   }
-  return err.Error();
+  return err.Status();
 }
 
 bool MachException::Message::CatchExceptionRaise(task_t task) {
@@ -349,7 +349,7 @@ kern_return_t MachException::Message::Re
                    MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
 
   if (err.Fail()) {
-    if (err.Error() == MACH_SEND_INTERRUPTED) {
+    if (err.Status() == MACH_SEND_INTERRUPTED) {
       if (DNBLogCheckLogBit(LOG_EXCEPTIONS))
         err.LogThreaded("::mach_msg() - send interrupted");
       // TODO: keep retrying to reply???
@@ -357,7 +357,7 @@ kern_return_t MachException::Message::Re
       if (state.task_port == process->Task().TaskPort()) {
         DNBLogThreaded("error: mach_msg() returned an error when replying to a "
                        "mach exception: error = %u",
-                       err.Error());
+                       err.Status());
       } else {
         if (DNBLogCheckLogBit(LOG_EXCEPTIONS))
           err.LogThreaded("::mach_msg() - failed (child of task)");
@@ -365,7 +365,7 @@ kern_return_t MachException::Message::Re
     }
   }
 
-  return err.Error();
+  return err.Status();
 }
 
 void MachException::Data::Dump() const {
@@ -430,7 +430,7 @@ kern_return_t MachException::PortInfo::S
                     "maskCnt => %u, ports, behaviors, flavors )",
                     task, mask, count);
 
-  if (err.Error() == KERN_INVALID_ARGUMENT && mask != PREV_EXC_MASK_ALL) {
+  if (err.Status() == KERN_INVALID_ARGUMENT && mask != PREV_EXC_MASK_ALL) {
     mask = PREV_EXC_MASK_ALL;
     count = (sizeof(ports) / sizeof(ports[0]));
     err = ::task_get_exception_ports(task, mask, masks, &count, ports,
@@ -444,7 +444,7 @@ kern_return_t MachException::PortInfo::S
     mask = 0;
     count = 0;
   }
-  return err.Error();
+  return err.Status();
 }
 
 kern_return_t MachException::PortInfo::Restore(task_t task) {
@@ -469,7 +469,7 @@ kern_return_t MachException::PortInfo::R
     }
   }
   count = 0;
-  return err.Error();
+  return err.Status();
 }
 
 const char *MachException::Name(exception_type_t exc_type) {

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Thu May 11 23:51:55 2017
@@ -1215,7 +1215,7 @@ bool MachProcess::Kill(const struct time
   err.SetErrorToErrno();
   DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill() DoSIGSTOP() ::ptrace "
                                 "(PT_KILL, pid=%u, 0, 0) => 0x%8.8x (%s)",
-                   m_pid, err.Error(), err.AsString());
+                   m_pid, err.Status(), err.AsString());
   m_thread_actions = DNBThreadResumeActions(eStateRunning, 0);
   PrivateResume();
 
@@ -2970,7 +2970,8 @@ pid_t MachProcess::LaunchForDebug(
         DNBError ptrace_err(errno, DNBError::POSIX);
         DNBLogThreadedIf(LOG_PROCESS, "error: failed to attach to spawned pid "
                                       "%d (err = %i, errno = %i (%s))",
-                         m_pid, err, ptrace_err.Error(), ptrace_err.AsString());
+                         m_pid, err, ptrace_err.Status(),
+                         ptrace_err.AsString());
         launch_err.SetError(NUB_GENERIC_ERROR, DNBError::Generic);
       }
     } else {
@@ -3181,7 +3182,7 @@ pid_t MachProcess::ForkChildForPTraceDeb
                                                char const *envp[],
                                                MachProcess *process,
                                                DNBError &launch_err) {
-  PseudoTerminal::Error pty_error = PseudoTerminal::success;
+  PseudoTerminal::Status pty_error = PseudoTerminal::success;
 
   // Use a fork that ties the child process's stdin/out/err to a pseudo
   // terminal so we can read it in our MachProcess::STDIOThread
@@ -3191,7 +3192,7 @@ pid_t MachProcess::ForkChildForPTraceDeb
 
   if (pid < 0) {
     //--------------------------------------------------------------
-    // Error during fork.
+    // Status during fork.
     //--------------------------------------------------------------
     return pid;
   } else if (pid == 0) {
@@ -3406,7 +3407,7 @@ pid_t MachProcess::SBForkChildForPTraceD
 
   PseudoTerminal pty;
   if (!no_stdio) {
-    PseudoTerminal::Error pty_err =
+    PseudoTerminal::Status pty_err =
         pty.OpenFirstAvailableMaster(O_RDWR | O_NOCTTY);
     if (pty_err == PseudoTerminal::success) {
       const char *slave_name = pty.SlaveName();
@@ -3607,7 +3608,7 @@ pid_t MachProcess::BoardServiceForkChild
 
   PseudoTerminal pty;
   if (!no_stdio) {
-    PseudoTerminal::Error pty_err =
+    PseudoTerminal::Status pty_err =
         pty.OpenFirstAvailableMaster(O_RDWR | O_NOCTTY);
     if (pty_err == PseudoTerminal::success) {
       const char *slave_name = pty.SlaveName();

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm Thu May 11 23:51:55 2017
@@ -88,7 +88,7 @@ kern_return_t MachTask::Suspend() {
   err = ::task_suspend(task);
   if (DNBLogCheckLogBit(LOG_TASK) || err.Fail())
     err.LogThreaded("::task_suspend ( target_task = 0x%4.4x )", task);
-  return err.Error();
+  return err.Status();
 }
 
 //----------------------------------------------------------------------
@@ -113,7 +113,7 @@ kern_return_t MachTask::Resume() {
         err.LogThreaded("::task_resume ( target_task = 0x%4.4x )", task);
     }
   }
-  return err.Error();
+  return err.Status();
 }
 
 //----------------------------------------------------------------------
@@ -531,7 +531,7 @@ task_t MachTask::TaskPortForProcessID(pi
         char str[1024];
         ::snprintf(str, sizeof(str), "::task_for_pid ( target_tport = 0x%4.4x, "
                                      "pid = %d, &task ) => err = 0x%8.8x (%s)",
-                   task_self, pid, err.Error(),
+                   task_self, pid, err.Status(),
                    err.AsString() ? err.AsString() : "success");
         if (err.Fail())
           err.SetErrorString(str);
@@ -583,7 +583,7 @@ kern_return_t MachTask::BasicInfo(task_t
                    info->suspend_count, (uint64_t)info->virtual_size,
                    (uint64_t)info->resident_size, user, system);
   }
-  return err.Error();
+  return err.Status();
 }
 
 //----------------------------------------------------------------------
@@ -687,7 +687,7 @@ kern_return_t MachTask::ShutDownExcecpti
     err.LogThreaded("::mach_port_deallocate ( task = 0x%4.4x, name = 0x%4.4x )",
                     task_self, exception_port);
 
-  return err.Error();
+  return err.Status();
 }
 
 void *MachTask::ExceptionThread(void *arg) {
@@ -805,7 +805,7 @@ void *MachTask::ExceptionThread(void *ar
                                       MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0);
     }
 
-    if (err.Error() == MACH_RCV_INTERRUPTED) {
+    if (err.Status() == MACH_RCV_INTERRUPTED) {
       // If we have no task port we should exit this thread
       if (!mach_task->ExceptionPortIsValid()) {
         DNBLogThreadedIf(LOG_EXCEPTIONS, "thread cancelled...");
@@ -824,7 +824,7 @@ void *MachTask::ExceptionThread(void *ar
         // Our task has died, exit the thread.
         break;
       }
-    } else if (err.Error() == MACH_RCV_TIMED_OUT) {
+    } else if (err.Status() == MACH_RCV_TIMED_OUT) {
       if (num_exceptions_received > 0) {
         // We were receiving all current exceptions with a timeout of zero
         // it is time to go back to our normal looping mode
@@ -860,7 +860,7 @@ void *MachTask::ExceptionThread(void *ar
         }
       }
 #endif
-    } else if (err.Error() != KERN_SUCCESS) {
+    } else if (err.Status() != KERN_SUCCESS) {
       DNBLogThreadedIf(LOG_EXCEPTIONS, "got some other error, do something "
                                        "about it??? nah, continuing for "
                                        "now...");
@@ -947,7 +947,7 @@ nub_addr_t MachTask::AllocateMemory(size
 
   DNBError err;
   err = ::mach_vm_allocate(task, &addr, size, TRUE);
-  if (err.Error() == KERN_SUCCESS) {
+  if (err.Status() == KERN_SUCCESS) {
     // Set the protections:
     vm_prot_t mach_prot = VM_PROT_NONE;
     if (permissions & eMemoryPermissionsReadable)
@@ -958,7 +958,7 @@ nub_addr_t MachTask::AllocateMemory(size
       mach_prot |= VM_PROT_EXECUTE;
 
     err = ::mach_vm_protect(task, addr, size, 0, mach_prot);
-    if (err.Error() == KERN_SUCCESS) {
+    if (err.Status() == KERN_SUCCESS) {
       m_allocations.insert(std::make_pair(addr, size));
       return addr;
     }

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp Thu May 11 23:51:55 2017
@@ -294,7 +294,7 @@ MachThreadList::UpdateThreadList(MachPro
                       "thread_list_count => %u )",
                       task, thread_list, thread_list_count);
 
-    if (err.Error() == KERN_SUCCESS && thread_list_count > 0) {
+    if (err.Status() == KERN_SUCCESS && thread_list_count > 0) {
       MachThreadList::collection currThreads;
       size_t idx;
       // Iterator through the current thread list and see which threads

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp Thu May 11 23:51:55 2017
@@ -501,7 +501,7 @@ nub_size_t MachVMMemory::Write(task_t ta
         nub_size_t bytes_written =
             WriteRegion(task, curr_addr, curr_data, curr_data_count);
         if (bytes_written <= 0) {
-          // Error should have already be posted by WriteRegion...
+          // Status should have already be posted by WriteRegion...
           break;
         } else {
           total_bytes_written += bytes_written;

Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp Thu May 11 23:51:55 2017
@@ -696,14 +696,14 @@ kern_return_t DNBArchMachARM::EnableHard
 
   if (err.Fail()) {
     err.LogThreaded("%s: failed to read the GPR registers", __FUNCTION__);
-    return err.Error();
+    return err.Status();
   }
 
   err = GetDBGState(false);
 
   if (err.Fail()) {
     err.LogThreaded("%s: failed to read the DBG registers", __FUNCTION__);
-    return err.Error();
+    return err.Status();
   }
 
 // The use of __arm64__ here is not ideal.  If debugserver is running on

Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp Thu May 11 23:51:55 2017
@@ -546,14 +546,14 @@ kern_return_t DNBArchMachARM64::EnableHa
 
   if (err.Fail()) {
     err.LogThreaded("%s: failed to read the GPR registers", __FUNCTION__);
-    return err.Error();
+    return err.Status();
   }
 
   err = GetDBGState(false);
 
   if (err.Fail()) {
     err.LogThreaded("%s: failed to read the DBG registers", __FUNCTION__);
-    return err.Error();
+    return err.Status();
   }
 
   if (enable) {

Modified: lldb/trunk/tools/debugserver/source/PseudoTerminal.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/PseudoTerminal.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/PseudoTerminal.cpp (original)
+++ lldb/trunk/tools/debugserver/source/PseudoTerminal.cpp Thu May 11 23:51:55 2017
@@ -65,7 +65,7 @@ void PseudoTerminal::CloseSlave() {
 // RETURNS:
 //  Zero when successful, non-zero indicating an error occurred.
 //----------------------------------------------------------------------
-PseudoTerminal::Error PseudoTerminal::OpenFirstAvailableMaster(int oflag) {
+PseudoTerminal::Status PseudoTerminal::OpenFirstAvailableMaster(int oflag) {
   // Open the master side of a pseudo terminal
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
@@ -97,7 +97,7 @@ PseudoTerminal::Error PseudoTerminal::Op
 // RETURNS:
 //  Zero when successful, non-zero indicating an error occurred.
 //----------------------------------------------------------------------
-PseudoTerminal::Error PseudoTerminal::OpenSlave(int oflag) {
+PseudoTerminal::Status PseudoTerminal::OpenSlave(int oflag) {
   CloseSlave();
 
   // Open the master side of a pseudo terminal
@@ -153,7 +153,7 @@ const char *PseudoTerminal::SlaveName()
 //  in the child process: zero
 //----------------------------------------------------------------------
 
-pid_t PseudoTerminal::Fork(PseudoTerminal::Error &error) {
+pid_t PseudoTerminal::Fork(PseudoTerminal::Status &error) {
   pid_t pid = invalid_pid;
   error = OpenFirstAvailableMaster(O_RDWR | O_NOCTTY);
 

Modified: lldb/trunk/tools/debugserver/source/PseudoTerminal.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/PseudoTerminal.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/PseudoTerminal.h (original)
+++ lldb/trunk/tools/debugserver/source/PseudoTerminal.h Thu May 11 23:51:55 2017
@@ -22,7 +22,7 @@ class PseudoTerminal {
 public:
   enum { invalid_fd = -1, invalid_pid = -1 };
 
-  enum Error {
+  enum Status {
     success = 0,
     err_posix_openpt_failed = -2,
     err_grantpt_failed = -3,
@@ -44,8 +44,8 @@ public:
 
   void CloseMaster();
   void CloseSlave();
-  Error OpenFirstAvailableMaster(int oflag);
-  Error OpenSlave(int oflag);
+  Status OpenFirstAvailableMaster(int oflag);
+  Status OpenSlave(int oflag);
   int MasterFD() const { return m_master_fd; }
   int SlaveFD() const { return m_slave_fd; }
   int ReleaseMasterFD() {
@@ -67,7 +67,7 @@ public:
 
   const char *SlaveName() const;
 
-  pid_t Fork(Error &error);
+  pid_t Fork(Status &error);
 
 protected:
   //------------------------------------------------------------------

Modified: lldb/trunk/tools/debugserver/source/RNBContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBContext.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBContext.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBContext.cpp Thu May 11 23:51:55 2017
@@ -266,7 +266,7 @@ const char *RNBContext::LaunchStatusAsSt
   else {
     char error_num_str[64];
     snprintf(error_num_str, sizeof(error_num_str), "%u",
-             m_launch_status.Error());
+             m_launch_status.Status());
     s = error_num_str;
   }
   return s.c_str();

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Thu May 11 23:51:55 2017
@@ -1628,7 +1628,7 @@ rnb_err_t RNBRemote::HandlePacket_H(cons
 }
 
 rnb_err_t RNBRemote::HandlePacket_qLaunchSuccess(const char *p) {
-  if (m_ctx.HasValidProcessID() || m_ctx.LaunchStatus().Error() == 0)
+  if (m_ctx.HasValidProcessID() || m_ctx.LaunchStatus().Status() == 0)
     return SendPacket("OK");
   std::ostringstream ret_str;
   std::string status_str;

Modified: lldb/trunk/tools/lldb-mi/MICmdBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdBase.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdBase.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdBase.cpp Thu May 11 23:51:55 2017
@@ -195,7 +195,7 @@ bool CMICmdBase::HasMIResultRecordExtra(
 // metadata
 //          object and set the command's error status.
 // Type:    Method.
-// Args:    rErrMsg - (R) Error description.
+// Args:    rErrMsg - (R) Status description.
 // Return:  None.
 // Throws:  None.
 //--

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdData.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdData.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdData.h Thu May 11 23:51:55 2017
@@ -77,7 +77,7 @@ private:
   bool m_bExpressionValid;     // True = yes is valid, false = not valid
   bool m_bEvaluatedExpression; // True = yes is expression evaluated, false =
                                // failed
-  lldb::SBError m_Error;       // Error object, which is examined when
+  lldb::SBError m_Error;       // Status object, which is examined when
                                // m_bEvaluatedExpression is false
   CMIUtilString m_strValue;
   CMICmnMIValueTuple m_miValueTuple;

Modified: lldb/trunk/tools/lldb-mi/MIDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIDriver.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIDriver.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIDriver.cpp Thu May 11 23:51:55 2017
@@ -710,7 +710,7 @@ const CMIUtilString &CMIDriver::GetDrive
 //          Check the error message if the function returns a failure.
 // Type:    Overridden.
 // Args:    vCmd        - (R) Command instruction to interpret.
-//          vwErrMsg    - (W) Error description on command failing.
+//          vwErrMsg    - (W) Status description on command failing.
 // Return:  MIstatus::success - Command succeeded.
 //          MIstatus::failure - Command failed.
 // Throws:  None.

Modified: lldb/trunk/tools/lldb-mi/MIDriverBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIDriverBase.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIDriverBase.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIDriverBase.cpp Thu May 11 23:51:55 2017
@@ -44,7 +44,7 @@ CMIDriverBase::~CMIDriverBase() { m_pDri
 //          Check the error message if the function returns a failure.
 // Type:    Overridden.
 // Args:    vCmd        - (R) Command instruction to interpret.
-//          vwErrMsg    - (W) Error description on command failing.
+//          vwErrMsg    - (W) Status description on command failing.
 // Return:  MIstatus::success - Command succeeded.
 //          MIstatus::failure - Command failed.
 // Throws:  None.

Modified: lldb/trunk/tools/lldb-server/Acceptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Acceptor.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/Acceptor.cpp (original)
+++ lldb/trunk/tools/lldb-server/Acceptor.cpp Thu May 11 23:51:55 2017
@@ -56,11 +56,11 @@ const char *FindSchemeByProtocol(const S
 }
 }
 
-Error Acceptor::Listen(int backlog) {
+Status Acceptor::Listen(int backlog) {
   return m_listener_socket_up->Listen(StringRef(m_name), backlog);
 }
 
-Error Acceptor::Accept(const bool child_processes_inherit, Connection *&conn) {
+Status Acceptor::Accept(const bool child_processes_inherit, Connection *&conn) {
   Socket *conn_socket = nullptr;
   auto error = m_listener_socket_up->Accept(conn_socket);
   if (error.Success())
@@ -81,7 +81,7 @@ std::string Acceptor::GetLocalSocketId()
 
 std::unique_ptr<Acceptor> Acceptor::Create(StringRef name,
                                            const bool child_processes_inherit,
-                                           Error &error) {
+                                           Status &error) {
   error.Clear();
 
   Socket::SocketProtocol socket_protocol = Socket::ProtocolUnixDomain;

Modified: lldb/trunk/tools/lldb-server/Acceptor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Acceptor.h?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/Acceptor.h (original)
+++ lldb/trunk/tools/lldb-server/Acceptor.h Thu May 11 23:51:55 2017
@@ -11,7 +11,7 @@
 
 #include "lldb/Core/Connection.h"
 #include "lldb/Host/Socket.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include <functional>
 #include <memory>
@@ -28,13 +28,13 @@ class Acceptor {
 public:
   virtual ~Acceptor() = default;
 
-  Error Listen(int backlog);
+  Status Listen(int backlog);
 
-  Error Accept(const bool child_processes_inherit, Connection *&conn);
+  Status Accept(const bool child_processes_inherit, Connection *&conn);
 
   static std::unique_ptr<Acceptor> Create(llvm::StringRef name,
                                           const bool child_processes_inherit,
-                                          Error &error);
+                                          Status &error);
 
   Socket::SocketProtocol GetSocketProtocol() const;
 

Modified: lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp Thu May 11 23:51:55 2017
@@ -35,7 +35,7 @@
 #include "lldb/Host/Pipe.h"
 #include "lldb/Host/Socket.h"
 #include "lldb/Host/StringConvert.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #ifndef LLGS_PROGRAM_NAME
 #define LLGS_PROGRAM_NAME "lldb-server"
@@ -112,7 +112,7 @@ static void display_usage(const char *pr
 
 void handle_attach_to_pid(GDBRemoteCommunicationServerLLGS &gdb_server,
                           lldb::pid_t pid) {
-  Error error = gdb_server.AttachToProcess(pid);
+  Status error = gdb_server.AttachToProcess(pid);
   if (error.Fail()) {
     fprintf(stderr, "error: failed to attach to pid %" PRIu64 ": %s\n", pid,
             error.AsCString());
@@ -145,7 +145,7 @@ void handle_attach(GDBRemoteCommunicatio
 
 void handle_launch(GDBRemoteCommunicationServerLLGS &gdb_server, int argc,
                    const char *const argv[]) {
-  Error error;
+  Status error;
   error = gdb_server.SetLaunchArguments(argv, argc);
   if (error.Fail()) {
     fprintf(stderr, "error: failed to set launch args for '%s': %s\n", argv[0],
@@ -170,15 +170,15 @@ void handle_launch(GDBRemoteCommunicatio
   }
 }
 
-Error writeSocketIdToPipe(Pipe &port_pipe, const std::string &socket_id) {
+Status writeSocketIdToPipe(Pipe &port_pipe, const std::string &socket_id) {
   size_t bytes_written = 0;
   // Write the port number as a C string with the NULL terminator.
   return port_pipe.Write(socket_id.c_str(), socket_id.size() + 1,
                          bytes_written);
 }
 
-Error writeSocketIdToPipe(const char *const named_pipe_path,
-                          const std::string &socket_id) {
+Status writeSocketIdToPipe(const char *const named_pipe_path,
+                           const std::string &socket_id) {
   Pipe port_name_pipe;
   // Wait for 10 seconds for pipe to be opened.
   auto error = port_name_pipe.OpenAsWriterWithTimeout(named_pipe_path, false,
@@ -188,9 +188,9 @@ Error writeSocketIdToPipe(const char *co
   return writeSocketIdToPipe(port_name_pipe, socket_id);
 }
 
-Error writeSocketIdToPipe(int unnamed_pipe_fd, const std::string &socket_id) {
+Status writeSocketIdToPipe(int unnamed_pipe_fd, const std::string &socket_id) {
 #if defined(_WIN32)
-  return Error("Unnamed pipes are not supported on Windows.");
+  return Status("Unnamed pipes are not supported on Windows.");
 #else
   Pipe port_pipe{Pipe::kInvalidDescriptor, unnamed_pipe_fd};
   return writeSocketIdToPipe(port_pipe, socket_id);
@@ -202,7 +202,7 @@ void ConnectToRemote(MainLoop &mainloop,
                      bool reverse_connect, const char *const host_and_port,
                      const char *const progname, const char *const subcommand,
                      const char *const named_pipe_path, int unnamed_pipe_fd) {
-  Error error;
+  Status error;
 
   if (host_and_port && host_and_port[0]) {
     // Parse out host and port.
@@ -311,7 +311,7 @@ void ConnectToRemote(MainLoop &mainloop,
 // main
 //----------------------------------------------------------------------
 int main_gdbserver(int argc, char *argv[]) {
-  Error error;
+  Status error;
   MainLoop mainloop;
 #ifndef _WIN32
   // Setup signal handlers first thing.

Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Thu May 11 23:51:55 2017
@@ -34,8 +34,8 @@
 #include "lldb/Host/HostGetOpt.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Host/common/TCPSocket.h"
-#include "lldb/Utility/Error.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -98,13 +98,13 @@ static void display_usage(const char *pr
   exit(0);
 }
 
-static Error save_socket_id_to_file(const std::string &socket_id,
-                                    const FileSpec &file_spec) {
+static Status save_socket_id_to_file(const std::string &socket_id,
+                                     const FileSpec &file_spec) {
   FileSpec temp_file_spec(file_spec.GetDirectory().AsCString(), false);
-  Error error(llvm::sys::fs::create_directory(temp_file_spec.GetPath()));
+  Status error(llvm::sys::fs::create_directory(temp_file_spec.GetPath()));
   if (error.Fail())
-    return Error("Failed to create directory %s: %s",
-                 temp_file_spec.GetCString(), error.AsCString());
+    return Status("Failed to create directory %s: %s",
+                  temp_file_spec.GetCString(), error.AsCString());
 
   llvm::SmallString<64> temp_file_path;
   temp_file_spec.AppendPathComponent("port-file.%%%%%%");
@@ -112,7 +112,7 @@ static Error save_socket_id_to_file(cons
   auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetPath(), FD,
                                                   temp_file_path);
   if (err_code)
-    return Error("Failed to create temp file: %s", err_code.message().c_str());
+    return Status("Failed to create temp file: %s", err_code.message().c_str());
 
   llvm::FileRemover tmp_file_remover(temp_file_path);
 
@@ -121,16 +121,16 @@ static Error save_socket_id_to_file(cons
     temp_file << socket_id;
     temp_file.close();
     if (temp_file.has_error())
-      return Error("Failed to write to port file.");
+      return Status("Failed to write to port file.");
   }
 
   err_code = llvm::sys::fs::rename(temp_file_path, file_spec.GetPath());
   if (err_code)
-    return Error("Failed to rename file %s to %s: %s", temp_file_path.c_str(),
-                 file_spec.GetPath().c_str(), err_code.message().c_str());
+    return Status("Failed to rename file %s to %s: %s", temp_file_path.c_str(),
+                  file_spec.GetPath().c_str(), err_code.message().c_str());
 
   tmp_file_remover.releaseFile();
-  return Error();
+  return Status();
 }
 
 //----------------------------------------------------------------------
@@ -144,7 +144,7 @@ int main_platform(int argc, char *argv[]
   signal(SIGPIPE, SIG_IGN);
   signal(SIGHUP, signal_handler);
   int long_option_index = 0;
-  Error error;
+  Status error;
   std::string listen_host_port;
   int ch;
 
@@ -350,9 +350,9 @@ int main_platform(int argc, char *argv[]
         lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
         uint16_t port = 0;
         std::string socket_name;
-        Error error = platform.LaunchGDBServer(inferior_arguments,
-                                               "", // hostname
-                                               pid, port, socket_name);
+        Status error = platform.LaunchGDBServer(inferior_arguments,
+                                                "", // hostname
+                                                pid, port, socket_name);
         if (error.Success())
           platform.SetPendingGdbServer(pid, port, socket_name);
         else

Modified: lldb/trunk/unittests/Breakpoint/BreakpointIDTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Breakpoint/BreakpointIDTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Breakpoint/BreakpointIDTest.cpp (original)
+++ lldb/trunk/unittests/Breakpoint/BreakpointIDTest.cpp Thu May 11 23:51:55 2017
@@ -10,7 +10,7 @@
 #include "gtest/gtest.h"
 
 #include "lldb/Breakpoint/BreakpointID.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/StringRef.h"
 
@@ -18,7 +18,7 @@ using namespace lldb;
 using namespace lldb_private;
 
 TEST(BreakpointIDTest, StringIsBreakpointName) {
-  Error E;
+  Status E;
   EXPECT_FALSE(BreakpointID::StringIsBreakpointName("1breakpoint", E));
   EXPECT_FALSE(BreakpointID::StringIsBreakpointName("-", E));
   EXPECT_FALSE(BreakpointID::StringIsBreakpointName("", E));

Modified: lldb/trunk/unittests/Core/ScalarTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ScalarTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/ScalarTest.cpp (original)
+++ lldb/trunk/unittests/Core/ScalarTest.cpp Thu May 11 23:51:55 2017
@@ -12,7 +12,7 @@
 #include "lldb/Core/Scalar.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb_private;
@@ -44,11 +44,11 @@ TEST(ScalarTest, GetBytes) {
   Scalar f_scalar;
   DataExtractor e_data(e, sizeof(e), endian::InlHostByteOrder(),
                        sizeof(void *));
-  Error e_error =
+  Status e_error =
       e_scalar.SetValueFromData(e_data, lldb::eEncodingUint, sizeof(e));
   DataExtractor f_data(f, sizeof(f), endian::InlHostByteOrder(),
                        sizeof(void *));
-  Error f_error =
+  Status f_error =
       f_scalar.SetValueFromData(f_data, lldb::eEncodingUint, sizeof(f));
   ASSERT_EQ(0, memcmp(&a, a_scalar.GetBytes(), sizeof(a)));
   ASSERT_EQ(0, memcmp(&b, b_scalar.GetBytes(), sizeof(b)));

Modified: lldb/trunk/unittests/Editline/EditlineTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Editline/EditlineTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Editline/EditlineTest.cpp (original)
+++ lldb/trunk/unittests/Editline/EditlineTest.cpp Thu May 11 23:51:55 2017
@@ -22,7 +22,7 @@
 #include "lldb/Host/Editline.h"
 #include "lldb/Host/Pipe.h"
 #include "lldb/Host/PseudoTerminal.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 #include "lldb/Utility/StringList.h"
 
 namespace {
@@ -91,7 +91,7 @@ private:
 EditlineAdapter::EditlineAdapter()
     : _editline_sp(), _pty(), _pty_master_fd(-1), _pty_slave_fd(-1),
       _el_slave_file() {
-  lldb_private::Error error;
+  lldb_private::Status error;
 
   // Open the first master pty available.
   char error_string[256];

Modified: lldb/trunk/unittests/Expression/GoParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Expression/GoParserTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Expression/GoParserTest.cpp (original)
+++ lldb/trunk/unittests/Expression/GoParserTest.cpp Thu May 11 23:51:55 2017
@@ -13,7 +13,7 @@
 #include "gtest/gtest.h"
 
 #include "Plugins/ExpressionParser/Go/GoParser.h"
-#include "lldb/Utility/Error.h"
+#include "lldb/Utility/Status.h"
 
 using namespace lldb_private;
 
@@ -64,7 +64,7 @@ testing::AssertionResult CheckStatement(
   GoParser parser(code);
   std::unique_ptr<GoASTStmt> stmt(parser.Statement());
   if (parser.Failed() || !stmt) {
-    Error err;
+    Status err;
     parser.GetError(err);
     return testing::AssertionFailure() << "Error parsing " << c_expr << "\n\t"
                                        << err.AsCString();

Modified: lldb/trunk/unittests/Host/MainLoopTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/MainLoopTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/MainLoopTest.cpp (original)
+++ lldb/trunk/unittests/Host/MainLoopTest.cpp Thu May 11 23:51:55 2017
@@ -32,7 +32,7 @@ public:
 
   void SetUp() override {
     bool child_processes_inherit = false;
-    Error error;
+    Status error;
     std::unique_ptr<TCPSocket> listen_socket_up(
         new TCPSocket(true, child_processes_inherit));
     ASSERT_TRUE(error.Success());
@@ -40,7 +40,7 @@ public:
     ASSERT_TRUE(error.Success());
 
     Socket *accept_socket;
-    std::future<Error> accept_error = std::async(std::launch::async, [&] {
+    std::future<Status> accept_error = std::async(std::launch::async, [&] {
       return listen_socket_up->Accept(accept_socket);
     });
 
@@ -81,7 +81,7 @@ TEST_F(MainLoopTest, ReadObject) {
 
   MainLoop loop;
 
-  Error error;
+  Status error;
   auto handle = loop.RegisterReadObject(socketpair[1], make_callback(), error);
   ASSERT_TRUE(error.Success());
   ASSERT_TRUE(handle);
@@ -96,7 +96,7 @@ TEST_F(MainLoopTest, TerminatesImmediate
   ASSERT_TRUE(socketpair[1]->Write(&X, len).Success());
 
   MainLoop loop;
-  Error error;
+  Status error;
   auto handle0 = loop.RegisterReadObject(socketpair[0], make_callback(), error);
   ASSERT_TRUE(error.Success());
   auto handle1 = loop.RegisterReadObject(socketpair[1], make_callback(), error);
@@ -109,7 +109,7 @@ TEST_F(MainLoopTest, TerminatesImmediate
 #ifdef LLVM_ON_UNIX
 TEST_F(MainLoopTest, Signal) {
   MainLoop loop;
-  Error error;
+  Status error;
 
   auto handle = loop.RegisterSignal(SIGUSR1, make_callback(), error);
   ASSERT_TRUE(error.Success());

Modified: lldb/trunk/unittests/Host/SocketTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/SocketTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/SocketTest.cpp (original)
+++ lldb/trunk/unittests/Host/SocketTest.cpp Thu May 11 23:51:55 2017
@@ -43,7 +43,7 @@ protected:
   static void AcceptThread(Socket *listen_socket,
                            const char *listen_remote_address,
                            bool child_processes_inherit, Socket **accept_socket,
-                           Error *error) {
+                           Status *error) {
     *error = listen_socket->Accept(*accept_socket);
   }
 
@@ -53,7 +53,7 @@ protected:
       const std::function<std::string(const SocketType &)> &get_connect_addr,
       std::unique_ptr<SocketType> *a_up, std::unique_ptr<SocketType> *b_up) {
     bool child_processes_inherit = false;
-    Error error;
+    Status error;
     std::unique_ptr<SocketType> listen_socket_up(
         new SocketType(true, child_processes_inherit));
     EXPECT_FALSE(error.Fail());
@@ -61,7 +61,7 @@ protected:
     EXPECT_FALSE(error.Fail());
     EXPECT_TRUE(listen_socket_up->IsValid());
 
-    Error accept_error;
+    Status accept_error;
     Socket *accept_socket;
     std::thread accept_thread(AcceptThread, listen_socket_up.get(),
                               listen_remote_address, child_processes_inherit,
@@ -94,7 +94,7 @@ TEST_F(SocketTest, DecodeHostAndPort) {
   std::string host_str;
   std::string port_str;
   int32_t port;
-  Error error;
+  Status error;
   EXPECT_TRUE(Socket::DecodeHostAndPort("localhost:1138", host_str, port_str,
                                         port, &error));
   EXPECT_STREQ("localhost", host_str.c_str());

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp Thu May 11 23:51:55 2017
@@ -318,7 +318,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
 
   const lldb::tid_t tid = 0x47;
   const uint32_t reg_num = 4;
-  std::future<Error> result = std::async(std::launch::async, [&] {
+  std::future<Status> result = std::async(std::launch::async, [&] {
     return client.SendSignalsToIgnore({2, 3, 5, 7, 0xB, 0xD, 0x11});
   });
 
@@ -342,7 +342,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
 
   const lldb::addr_t addr = 0xa000;
   MemoryRegionInfo region_info;
-  std::future<Error> result = std::async(std::launch::async, [&] {
+  std::future<Status> result = std::async(std::launch::async, [&] {
     return client.GetMemoryRegionInfo(addr, region_info);
   });
 
@@ -363,7 +363,7 @@ TEST_F(GDBRemoteCommunicationClientTest,
 
   const lldb::addr_t addr = 0x4000;
   MemoryRegionInfo region_info;
-  std::future<Error> result = std::async(std::launch::async, [&] {
+  std::future<Status> result = std::async(std::launch::async, [&] {
     return client.GetMemoryRegionInfo(addr, region_info);
   });
 

Modified: lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp (original)
+++ lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp Thu May 11 23:51:55 2017
@@ -32,16 +32,15 @@ void GDBRemoteTest::TearDownTestCase() {
 
 void Connect(GDBRemoteCommunication &client, GDBRemoteCommunication &server) {
   bool child_processes_inherit = false;
-  Error error;
+  Status error;
   TCPSocket listen_socket(true, child_processes_inherit);
   ASSERT_FALSE(error.Fail());
   error = listen_socket.Listen("127.0.0.1:0", 5);
   ASSERT_FALSE(error.Fail());
 
   Socket *accept_socket;
-  std::future<Error> accept_error = std::async(std::launch::async, [&] {
-    return listen_socket.Accept(accept_socket);
-  });
+  std::future<Status> accept_error = std::async(
+      std::launch::async, [&] { return listen_socket.Accept(accept_socket); });
 
   char connect_remote_address[64];
   snprintf(connect_remote_address, sizeof(connect_remote_address),

Modified: lldb/trunk/unittests/Target/ModuleCacheTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Target/ModuleCacheTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Target/ModuleCacheTest.cpp (original)
+++ lldb/trunk/unittests/Target/ModuleCacheTest.cpp Thu May 11 23:51:55 2017
@@ -104,7 +104,7 @@ void ModuleCacheTest::TryGetAndPut(const
   bool did_create;
   bool download_called = false;
 
-  Error error = mc.GetAndPut(
+  Status error = mc.GetAndPut(
       cache_dir, hostname, module_spec,
       [this, &download_called](const ModuleSpec &module_spec,
                                const FileSpec &tmp_download_file_spec) {
@@ -114,10 +114,10 @@ void ModuleCacheTest::TryGetAndPut(const
         std::error_code ec = llvm::sys::fs::copy_file(
             s_test_executable, tmp_download_file_spec.GetCString());
         EXPECT_FALSE(ec);
-        return Error();
+        return Status();
       },
       [](const ModuleSP &module_sp, const FileSpec &tmp_download_file_spec) {
-        return Error("Not supported.");
+        return Status("Not supported.");
       },
       module_sp, &did_create);
   EXPECT_EQ(expect_download, download_called);

Modified: lldb/trunk/unittests/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/CMakeLists.txt?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Utility/CMakeLists.txt Thu May 11 23:51:55 2017
@@ -2,9 +2,9 @@ add_subdirectory(Mocks)
 
 add_lldb_unittest(UtilityTests
   ConstStringTest.cpp
-  ErrorTest.cpp
   LogTest.cpp
   NameMatchesTest.cpp
+  StatusTest.cpp
   StringExtractorTest.cpp
   TaskPoolTest.cpp
   TildeExpressionResolverTest.cpp

Removed: lldb/trunk/unittests/Utility/ErrorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ErrorTest.cpp?rev=302871&view=auto
==============================================================================
--- lldb/trunk/unittests/Utility/ErrorTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ErrorTest.cpp (removed)
@@ -1,19 +0,0 @@
-//===-- ErrorTest.cpp -------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/Error.h"
-#include "gtest/gtest.h"
-
-using namespace lldb_private;
-
-TEST(ErrorTest, Formatv) {
-  EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
-  EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
-  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());
-}

Added: lldb/trunk/unittests/Utility/StatusTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/StatusTest.cpp?rev=302872&view=auto
==============================================================================
--- lldb/trunk/unittests/Utility/StatusTest.cpp (added)
+++ lldb/trunk/unittests/Utility/StatusTest.cpp Thu May 11 23:51:55 2017
@@ -0,0 +1,19 @@
+//===-- StatusTest.cpp ------------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/Status.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+TEST(StatusTest, Formatv) {
+  EXPECT_EQ("", llvm::formatv("{0}", Status()).str());
+  EXPECT_EQ("Hello Status", llvm::formatv("{0}", Status("Hello Status")).str());
+  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Status("Hello Error")).str());
+}

Modified: lldb/trunk/unittests/debugserver/RNBSocketTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/debugserver/RNBSocketTest.cpp?rev=302872&r1=302871&r2=302872&view=diff
==============================================================================
--- lldb/trunk/unittests/debugserver/RNBSocketTest.cpp (original)
+++ lldb/trunk/unittests/debugserver/RNBSocketTest.cpp Thu May 11 23:51:55 2017
@@ -30,7 +30,7 @@ static void ServerCallbackv4(const void
     Socket *client_socket;
     char addr_buffer[256];
     sprintf(addr_buffer, "%s:%d", baton, port);
-    Error err = Socket::TcpConnect(addr_buffer, false, client_socket);
+    Status err = Socket::TcpConnect(addr_buffer, false, client_socket);
     if (err.Fail())
       abort();
     char buffer[32];
@@ -101,7 +101,7 @@ void TestSocketConnect(const char *addr)
   Socket *server_socket;
   Predicate<uint16_t> port_predicate;
   port_predicate.SetValue(0, eBroadcastNever);
-  Error err =
+  Status err =
       Socket::TcpListen(addr_wrap, false, server_socket, &port_predicate);
   ASSERT_FALSE(err.Fail());
 




More information about the lldb-commits mailing list