diff options
Diffstat (limited to 'lldb/source/Plugins/Process/elf-core')
5 files changed, 33 insertions, 33 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index 6561d2a0582..5a459e80348 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -84,8 +84,8 @@ bool ProcessElfCore::CanDebug(lldb::TargetSP target_sp, // 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::AddAddressRangeFromLoadSegment( //---------------------------------------------------------------------- // 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(ThreadList &old_thread_list, void ProcessElfCore::RefreshStateAfterStop() {} -Error ProcessElfCore::DoDestroy() { return Error(); } +Status ProcessElfCore::DoDestroy() { return Status(); } //------------------------------------------------------------------ // Process Queries @@ -301,14 +301,14 @@ bool ProcessElfCore::IsAlive() { return true; } // 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 ®ion_info) { +Status ProcessElfCore::GetMemoryRegionInfo(lldb::addr_t load_addr, + MemoryRegionInfo ®ion_info) { region_info.Clear(); const VMRangeToPermissions::Entry *permission_entry = m_core_range_infos.FindEntryThatContainsOrFollows(load_addr); @@ -335,7 +335,7 @@ Error ProcessElfCore::GetMemoryRegionInfo(lldb::addr_t load_addr, 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::GetMemoryRegionInfo(lldb::addr_t load_addr, 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(ThreadData &thread_data, DataExtractor &data) { /// 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::ParseThreadContextsFromNoteSegment( 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) { diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h index cb2f31bde4c..dbf7f926f85 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h @@ -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 ®ion_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); diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp index 260ae15d7a5..5766923186d 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp @@ -71,7 +71,7 @@ bool RegisterContextCorePOSIX_x86_64::ReadRegister(const RegisterInfo *reg_info, return false; } - Error error; + Status error; value.SetFromMemoryData(reg_info, src + offset, reg_info->byte_size, lldb::eByteOrderLittle, error); diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp index 13ad82d92c5..096c20363c7 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -274,8 +274,8 @@ size_t ELFLinuxPrStatus::GetSize(lldb_private::ArchSpec &arch) { } } -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_private::ArchSpec &arch) { } } -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 lldb_private::ArchSpec &arch) { } } -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, diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h index 38c52658a23..52187541371 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h @@ -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 |