Skip to content

Commit

Permalink
Fix for random watchpoint testsuite failures on AArch64 targets.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
omjavaid committed Oct 19, 2015
1 parent 91a88bb commit 5cf948d
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -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++)
{
Expand All @@ -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++)
{
Expand Down

0 comments on commit 5cf948d

Please sign in to comment.