[Lldb-commits] [lldb] r237111 - Return the correct user register count for arm from NativeRegisterContext
Tamas Berghammer
tberghammer at google.com
Tue May 12 03:27:45 PDT 2015
Author: tberghammer
Date: Tue May 12 05:27:45 2015
New Revision: 237111
URL: http://llvm.org/viewvc/llvm-project?rev=237111&view=rev
Log:
Return the correct user register count for arm from NativeRegisterContext
The defult implementation falls back to GetRegisterCount what
includes the debug registers also what shouldn't be displayed to
the user.
Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp?rev=237111&r1=237110&r2=237111&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp Tue May 12 05:27:45 2015
@@ -139,6 +139,15 @@ NativeRegisterContextLinux_arm::GetRegis
return k_num_register_sets;
}
+uint32_t
+NativeRegisterContextLinux_arm::GetUserRegisterCount() const
+{
+ uint32_t count = 0;
+ for (uint32_t set_index = 0; set_index < k_num_register_sets; ++set_index)
+ count += g_reg_sets_arm[set_index].num_registers;
+ return count;
+}
+
const RegisterSet *
NativeRegisterContextLinux_arm::GetRegisterSet (uint32_t set_index) const
{
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h?rev=237111&r1=237110&r2=237111&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h Tue May 12 05:27:45 2015
@@ -30,6 +30,9 @@ namespace process_linux {
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