diff options
| author | Pavel Labath <labath@google.com> | 2017-11-09 10:43:16 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2017-11-09 10:43:16 +0000 |
| commit | 578a42589020f1b0ab5e4be458d55309d8a4add7 (patch) | |
| tree | 0117309e03531db4cd9104c022895f0a619465cf /lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp | |
| parent | 3a7044ef78632b1d225f450b50aec23606e76257 (diff) | |
| download | llvm-578a42589020f1b0ab5e4be458d55309d8a4add7.tar.gz llvm-578a42589020f1b0ab5e4be458d55309d8a4add7.tar.bz2 llvm-578a42589020f1b0ab5e4be458d55309d8a4add7.zip | |
Simplify NativeProcessProtocol::GetArchitecture/GetByteOrder
Summary:
These functions used to return bool to signify whether they were able to
retrieve the data. This is redundant because the ArchSpec and ByteOrder
already have their own "invalid" states, *and* because both of the
current implementations (linux, netbsd) can always provide a valid
result.
This allows us to simplify bits of the code handling these values.
Reviewers: eugene, krytarowski
Subscribers: javed.absar, lldb-commits
Differential Revision: https://reviews.llvm.org/D39733
llvm-svn: 317779
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp index 30f09f0c3a3f..91fbd22ce8c8 100644 --- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp @@ -26,15 +26,7 @@ NativeRegisterContextLinux::NativeRegisterContextLinux( reg_info_interface_p) {} lldb::ByteOrder NativeRegisterContextLinux::GetByteOrder() const { - // Get the target process whose privileged thread was used for the register - // read. - lldb::ByteOrder byte_order = lldb::eByteOrderInvalid; - - if (!m_thread.GetProcess().GetByteOrder(byte_order)) { - // FIXME log here - } - - return byte_order; + return m_thread.GetProcess().GetByteOrder(); } Status NativeRegisterContextLinux::ReadRegisterRaw(uint32_t reg_index, |
