summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorOmair Javaid <omair.javaid@linaro.org>2015-10-19 14:54:33 +0000
committerOmair Javaid <omair.javaid@linaro.org>2015-10-19 14:54:33 +0000
commit5cf948d299b3e6658f7c581b95f2469a899e530d (patch)
tree290a1661b7cec950208bf20ffe3e7f51439297ac /lldb/source/Plugins/Process
parent91a88bba0ee55edb50d9f3b396da90bc8a917627 (diff)
downloadbcm5719-llvm-5cf948d299b3e6658f7c581b95f2469a899e530d.tar.gz
bcm5719-llvm-5cf948d299b3e6658f7c581b95f2469a899e530d.zip
Fix for random watchpoint testsuite failures on AArch64 targets.
This patch corrects the number of bytes of debug register resources which are written while installing or removing a breakpoint using ptrace interface on arm64 targets. Differential revision: http://reviews.llvm.org/D12522 llvm-svn: 250700
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index 82d17c1a0b6..d5d3791524c 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -807,11 +807,12 @@ NativeRegisterContextLinux_arm64::WriteHardwareDebugRegs(int hwbType)
memset (&dreg_state, 0, sizeof (dreg_state));
ioVec.iov_base = &dreg_state;
- ioVec.iov_len = sizeof (dreg_state);
if (hwbType == eDREGTypeWATCH)
{
hwbType = NT_ARM_HW_WATCH;
+ ioVec.iov_len = sizeof (dreg_state.dbg_info) + sizeof (dreg_state.pad)
+ + (sizeof (dreg_state.dbg_regs [0]) * m_max_hwp_supported);
for (uint32_t i = 0; i < m_max_hwp_supported; i++)
{
@@ -822,6 +823,8 @@ NativeRegisterContextLinux_arm64::WriteHardwareDebugRegs(int hwbType)
else
{
hwbType = NT_ARM_HW_BREAK;
+ ioVec.iov_len = sizeof (dreg_state.dbg_info) + sizeof (dreg_state.pad)
+ + (sizeof (dreg_state.dbg_regs [0]) * m_max_hbp_supported);
for (uint32_t i = 0; i < m_max_hbp_supported; i++)
{
OpenPOWER on IntegriCloud