diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp @@ -68,7 +68,7 @@ size_t RegisterContextFreeBSD_i386::GetGPRSize() const { return sizeof(GPR); } const RegisterInfo *RegisterContextFreeBSD_i386::GetRegisterInfo() const { - switch (m_target_arch.GetMachine()) { + switch (GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: return g_register_infos_i386; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp @@ -169,7 +169,7 @@ } const RegisterInfo *RegisterContextFreeBSD_mips64::GetRegisterInfo() const { - assert(m_target_arch.GetCore() == ArchSpec::eCore_mips64); + assert(GetTargetArchitecture().GetCore() == ArchSpec::eCore_mips64); return g_register_infos_mips64; } diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp @@ -225,7 +225,7 @@ const RegisterInfo *RegisterContextFreeBSD_powerpc64::GetRegisterInfo() const { // assert (m_target_arch.GetCore() == ArchSpec::eCore_powerpc); - if (m_target_arch.GetMachine() == llvm::Triple::ppc) + if (GetTargetArchitecture().GetMachine() == llvm::Triple::ppc) return g_register_infos_powerpc64_32; return g_register_infos_powerpc64; } diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp @@ -107,7 +107,7 @@ size_t RegisterContextLinux_i386::GetGPRSizeStatic() { return sizeof(GPR); } const RegisterInfo *RegisterContextLinux_i386::GetRegisterInfo() const { - switch (m_target_arch.GetMachine()) { + switch (GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: case llvm::Triple::x86_64: return g_register_infos_i386; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp @@ -80,7 +80,7 @@ size_t RegisterContextNetBSD_i386::GetGPRSize() const { return sizeof(GPR); } const RegisterInfo *RegisterContextNetBSD_i386::GetRegisterInfo() const { - switch (m_target_arch.GetMachine()) { + switch (GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: case llvm::Triple::x86_64: return g_register_infos_i386; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp @@ -62,7 +62,7 @@ size_t RegisterContextOpenBSD_i386::GetGPRSize() const { return sizeof(GPR); } const RegisterInfo *RegisterContextOpenBSD_i386::GetRegisterInfo() const { - switch (m_target_arch.GetMachine()) { + switch (GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: return g_register_infos_i386; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp @@ -83,7 +83,7 @@ : RegisterContext(thread, concrete_frame_idx) { m_register_info_up.reset(register_info); - switch (register_info->m_target_arch.GetMachine()) { + switch (register_info->GetTargetArchitecture().GetMachine()) { case llvm::Triple::systemz: m_reg_info.num_registers = k_num_registers_s390x; m_reg_info.num_gpr_registers = k_num_gpr_registers_s390x; @@ -151,7 +151,7 @@ const RegisterSet *RegisterContextPOSIX_s390x::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_up->m_target_arch.GetMachine()) { + switch (m_register_info_up->GetTargetArchitecture().GetMachine()) { case llvm::Triple::systemz: return &g_reg_sets_s390x[set]; default: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp @@ -399,7 +399,7 @@ : RegisterContext(thread, concrete_frame_idx) { m_register_info_up.reset(register_info); - switch (register_info->m_target_arch.GetMachine()) { + switch (register_info->GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: m_reg_info.num_registers = k_num_registers_i386; m_reg_info.num_gpr_registers = k_num_gpr_registers_i386; @@ -518,7 +518,7 @@ const RegisterSet *RegisterContextPOSIX_x86::GetRegisterSet(size_t set) { if (IsRegisterSetAvailable(set)) { - switch (m_register_info_up->m_target_arch.GetMachine()) { + switch (m_register_info_up->GetTargetArchitecture().GetMachine()) { case llvm::Triple::x86: return &g_reg_sets_i386[set]; case llvm::Triple::x86_64: diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h b/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h --- a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h @@ -61,9 +61,9 @@ return nullptr; } - // FIXME make private. +private: lldb_private::ArchSpec m_target_arch; }; -} +} // namespace lldb_private #endif