summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-11-09 10:43:16 +0000
committerPavel Labath <labath@google.com>2017-11-09 10:43:16 +0000
commit578a42589020f1b0ab5e4be458d55309d8a4add7 (patch)
tree0117309e03531db4cd9104c022895f0a619465cf /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
parent3a7044ef78632b1d225f450b50aec23606e76257 (diff)
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/NativeThreadLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 5cd40941dcf8..71324a4e0180 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -144,14 +144,10 @@ NativeRegisterContextSP NativeThreadLinux::GetRegisterContext() {
if (m_reg_context_sp)
return m_reg_context_sp;
- ArchSpec target_arch;
- if (!m_process.GetArchitecture(target_arch))
- return NativeRegisterContextSP();
-
const uint32_t concrete_frame_idx = 0;
m_reg_context_sp.reset(
NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
- target_arch, *this, concrete_frame_idx));
+ m_process.GetArchitecture(), *this, concrete_frame_idx));
return m_reg_context_sp;
}