[Lldb-commits] [lldb] r231638 - Report the actual user register count from NativeRegisterContextLinux_x86_64
Tamas Berghammer
tberghammer at google.com
Mon Mar 9 03:48:24 PDT 2015
Author: tberghammer
Date: Mon Mar 9 05:48:23 2015
New Revision: 231638
URL: http://llvm.org/viewvc/llvm-project?rev=231638&view=rev
Log:
Report the actual user register count from NativeRegisterContextLinux_x86_64
Thic change have effect wehn the AVX registers aren't available with
reporting the count of user registers without them.
Differential revision: http://reviews.llvm.org/D8111
Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp?rev=231638&r1=231637&r2=231638&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Mon Mar 9 05:48:23 2015
@@ -408,6 +408,19 @@ NativeRegisterContextLinux_x86_64::GetRe
return sets;
}
+uint32_t
+NativeRegisterContextLinux_x86_64::GetUserRegisterCount() const
+{
+ uint32_t count = 0;
+ for (uint32_t set_index = 0; set_index < k_num_register_sets; ++set_index)
+ {
+ const lldb_private::RegisterSet* set = GetRegisterSet(set_index);
+ if (set)
+ count += set->num_registers;
+ }
+ return count;
+}
+
const lldb_private::RegisterSet *
NativeRegisterContextLinux_x86_64::GetRegisterSet (uint32_t set_index) const
{
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h?rev=231638&r1=231637&r2=231638&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Mon Mar 9 05:48:23 2015
@@ -30,6 +30,9 @@ namespace lldb_private
const RegisterSet *
GetRegisterSet (uint32_t set_index) const override;
+ uint32_t
+ GetUserRegisterCount() const override;
+
Error
ReadRegister (const RegisterInfo *reg_info, RegisterValue ®_value) override;
More information about the lldb-commits
mailing list