[Lldb-commits] [PATCH] Report the actual user register count from NativeRegisterContextLinux_x86_64
Tamas Berghammer
tberghammer at google.com
Mon Mar 9 03:51:01 PDT 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D8111
Files:
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
@@ -408,6 +408,19 @@
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
{
Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
===================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
@@ -30,6 +30,9 @@
const RegisterSet *
GetRegisterSet (uint32_t set_index) const override;
+ uint32_t
+ GetUserRegisterCount() const override;
+
Error
ReadRegister (const RegisterInfo *reg_info, RegisterValue ®_value) override;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8111.21477.patch
Type: text/x-patch
Size: 1428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150309/f8661a7a/attachment.bin>
More information about the lldb-commits
mailing list