Author: omjavaid Date: Mon Oct 19 09:54:33 2015 New Revision: 250700 URL: http://llvm.org/viewvc/llvm-project?rev=250700&view=rev Log: 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 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=250700&r1=250699&r2=250700&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Mon Oct 19 09:54:33 2015 @@ -807,11 +807,12 @@ NativeRegisterContextLinux_arm64::WriteH 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::WriteH 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++) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits