diff options
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp index 11d0457a783..c08417a80ae 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -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::GetSDKDirectory(lldb_private::Target &target) { 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::GetSDKDirectory(lldb_private::Target &target) { 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(const FileSpec &platform_file, // 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 lldb_private::FileSpec &platform_file, 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 lldb_private::FileSpec &platform_file, 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 lldb_private::FileSpec &platform_file, 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::GetSupportedArchitectureAtIndex(uint32_t idx, #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::GetSharedModule( 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()) { |