diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
commit | e81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch) | |
tree | 9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp | |
parent | 85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff) |
Notes
Diffstat (limited to 'source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp')
-rw-r--r-- | source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp b/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp index 4d58b85b5665..1b2281004d26 100644 --- a/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp +++ b/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp @@ -10,7 +10,7 @@ #include <vector> #include <stddef.h> -// For GDB, GCC and DWARF Register numbers +// For eh_frame and DWARF Register numbers #include "RegisterContextLinux_mips.h" // Internal codes for mips registers @@ -29,8 +29,17 @@ using namespace lldb; #include "RegisterInfos_mips.h" #undef DECLARE_REGISTER_INFOS_MIPS_STRUCT -RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch) : - RegisterInfoInterface(target_arch) +uint32_t +GetUserRegisterInfoCount (bool msa_present) +{ + if (msa_present) + return static_cast<uint32_t> (k_num_user_registers_mips); + return static_cast<uint32_t> (k_num_user_registers_mips - k_num_msa_registers_mips); +} + +RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch, bool msa_present) : + RegisterInfoInterface(target_arch), + m_user_register_count (GetUserRegisterInfoCount (msa_present)) { } @@ -63,5 +72,5 @@ RegisterContextLinux_mips::GetRegisterCount () const uint32_t RegisterContextLinux_mips::GetUserRegisterCount () const { - return static_cast<uint32_t> (k_num_user_registers_mips); + return static_cast<uint32_t> (m_user_register_count); } |