Lines Matching refs:wp_index

469   uint32_t control_value = 0, wp_index = 0, addr_word_offset = 0, byte_mask = 0;  in SetHardwareWatchpoint()  local
532 wp_index = LLDB_INVALID_INDEX32; in SetHardwareWatchpoint()
535 wp_index = i; // Mark last free slot in SetHardwareWatchpoint()
541 if (wp_index == LLDB_INVALID_INDEX32) in SetHardwareWatchpoint()
545 m_hwp_regs[wp_index].real_addr = real_addr; in SetHardwareWatchpoint()
546 m_hwp_regs[wp_index].address = addr; in SetHardwareWatchpoint()
547 m_hwp_regs[wp_index].control = control_value; in SetHardwareWatchpoint()
550 error = WriteHardwareDebugRegs(eDREGTypeWATCH, wp_index); in SetHardwareWatchpoint()
553 m_hwp_regs[wp_index].address = 0; in SetHardwareWatchpoint()
554 m_hwp_regs[wp_index].control &= ~1; in SetHardwareWatchpoint()
559 return wp_index; in SetHardwareWatchpoint()
563 uint32_t wp_index) { in ClearHardwareWatchpoint() argument
565 LLDB_LOG(log, "wp_index: {0}", wp_index); in ClearHardwareWatchpoint()
573 if (wp_index >= m_max_hwp_supported) in ClearHardwareWatchpoint()
577 lldb::addr_t tempAddr = m_hwp_regs[wp_index].address; in ClearHardwareWatchpoint()
578 uint32_t tempControl = m_hwp_regs[wp_index].control; in ClearHardwareWatchpoint()
581 m_hwp_regs[wp_index].control &= ~1; in ClearHardwareWatchpoint()
582 m_hwp_regs[wp_index].address = 0; in ClearHardwareWatchpoint()
585 error = WriteHardwareDebugRegs(eDREGTypeWATCH, wp_index); in ClearHardwareWatchpoint()
588 m_hwp_regs[wp_index].control = tempControl; in ClearHardwareWatchpoint()
589 m_hwp_regs[wp_index].address = tempAddr; in ClearHardwareWatchpoint()
632 uint32_t NativeRegisterContextLinux_arm::GetWatchpointSize(uint32_t wp_index) { in GetWatchpointSize() argument
634 LLDB_LOG(log, "wp_index: {0}", wp_index); in GetWatchpointSize()
636 switch ((m_hwp_regs[wp_index].control >> 5) & 0x0f) { in GetWatchpointSize()
649 bool NativeRegisterContextLinux_arm::WatchpointIsEnabled(uint32_t wp_index) { in WatchpointIsEnabled() argument
651 LLDB_LOG(log, "wp_index: {0}", wp_index); in WatchpointIsEnabled()
653 if ((m_hwp_regs[wp_index].control & 0x1) == 0x1) in WatchpointIsEnabled()
660 NativeRegisterContextLinux_arm::GetWatchpointHitIndex(uint32_t &wp_index, in GetWatchpointHitIndex() argument
663 LLDB_LOG(log, "wp_index: {0}, trap_addr: {1:x}", wp_index, trap_addr); in GetWatchpointHitIndex()
668 for (wp_index = 0; wp_index < m_max_hwp_supported; ++wp_index) { in GetWatchpointHitIndex()
669 watch_size = GetWatchpointSize(wp_index); in GetWatchpointHitIndex()
670 watch_addr = m_hwp_regs[wp_index].address; in GetWatchpointHitIndex()
672 if (WatchpointIsEnabled(wp_index) && trap_addr >= watch_addr && in GetWatchpointHitIndex()
674 m_hwp_regs[wp_index].hit_addr = trap_addr; in GetWatchpointHitIndex()
679 wp_index = LLDB_INVALID_INDEX32; in GetWatchpointHitIndex()
684 NativeRegisterContextLinux_arm::GetWatchpointAddress(uint32_t wp_index) { in GetWatchpointAddress() argument
686 LLDB_LOG(log, "wp_index: {0}", wp_index); in GetWatchpointAddress()
688 if (wp_index >= m_max_hwp_supported) in GetWatchpointAddress()
691 if (WatchpointIsEnabled(wp_index)) in GetWatchpointAddress()
692 return m_hwp_regs[wp_index].real_addr; in GetWatchpointAddress()
698 NativeRegisterContextLinux_arm::GetWatchpointHitAddress(uint32_t wp_index) { in GetWatchpointHitAddress() argument
700 LLDB_LOG(log, "wp_index: {0}", wp_index); in GetWatchpointHitAddress()
702 if (wp_index >= m_max_hwp_supported) in GetWatchpointHitAddress()
705 if (WatchpointIsEnabled(wp_index)) in GetWatchpointHitAddress()
706 return m_hwp_regs[wp_index].hit_addr; in GetWatchpointHitAddress()