diff options
author | 2021-02-13 21:33:54 +0000 | |
---|---|---|
committer | 2021-02-13 21:33:54 +0000 | |
commit | a119297bd5e44b38d77070a02315a6e337fde1cb (patch) | |
tree | c3589abbcf03400118af5a3e89d2fc35a41ad457 /gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp | |
parent | distrib: remove .comment section systematically (diff) | |
download | wireguard-openbsd-a119297bd5e44b38d77070a02315a6e337fde1cb.tar.xz wireguard-openbsd-a119297bd5e44b38d77070a02315a6e337fde1cb.zip |
Cleanup lldb amd64 support.
- Remove watchpoint support since we do not support hardware watchpoints.
- Support floating point regsisters in the ReadAll/WriteAll interface.
- Standardize the sizes used in GerGPRSize() and GetFPRSize() to correspond
to the sizes we get from ptrace.
- Fix the r/w of the mmx registers to map onto the st fp registers instead
of xmm registers.
- Normalize some variable names to be architecture neutral.
ok patrick@
Diffstat (limited to 'gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp')
-rw-r--r-- | gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp | 68 |
1 files changed, 6 insertions, 62 deletions
diff --git a/gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp b/gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp index 30a5ae0fff7..f16beee474e 100644 --- a/gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp +++ b/gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeThreadOpenBSD.cpp @@ -73,23 +73,6 @@ void NativeThreadOpenBSD::SetStoppedByExec() { m_stop_info.details.signal.signo = SIGTRAP; } -void NativeThreadOpenBSD::SetStoppedByWatchpoint(uint32_t wp_index) { - SetStopped(); - - lldbassert(wp_index != LLDB_INVALID_INDEX32 && "wp_index cannot be invalid"); - - std::ostringstream ostr; - ostr << GetRegisterContext().GetWatchpointAddress(wp_index) << " "; - ostr << wp_index; - - ostr << " " << GetRegisterContext().GetWatchpointHitAddress(wp_index); - - m_stop_description = ostr.str(); - - m_stop_info.reason = StopReason::eStopReasonWatchpoint; - m_stop_info.details.signal.signo = SIGTRAP; -} - void NativeThreadOpenBSD::SetStopped() { const StateType new_state = StateType::eStateStopped; m_state = new_state; @@ -148,59 +131,20 @@ return *m_reg_context_up; Status NativeThreadOpenBSD::SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) { - if (!hardware) - return Status("not implemented"); - if (m_state == eStateLaunching) - return Status(); - Status error = RemoveWatchpoint(addr); - if (error.Fail()) - return error; - uint32_t wp_index = GetRegisterContext().SetHardwareWatchpoint(addr, size, watch_flags); - if (wp_index == LLDB_INVALID_INDEX32) - return Status("Setting hardware watchpoint failed."); - m_watchpoint_index_map.insert({addr, wp_index}); - return Status(); + if (hardware) + return Status("Not Aailable"); + return Status("Software watchpoints not implemented"); } Status NativeThreadOpenBSD::RemoveWatchpoint(lldb::addr_t addr) { - auto wp = m_watchpoint_index_map.find(addr); - if (wp == m_watchpoint_index_map.end()) - return Status(); - uint32_t wp_index = wp->second; - m_watchpoint_index_map.erase(wp); - if (GetRegisterContext().ClearHardwareWatchpoint(wp_index)) - return Status(); - return Status("Clearing hardware watchpoint failed."); + return Status("Software watchpoints not implemented"); } Status NativeThreadOpenBSD::SetHardwareBreakpoint(lldb::addr_t addr, size_t size) { - if (m_state == eStateLaunching) - return Status(); - - Status error = RemoveHardwareBreakpoint(addr); - if (error.Fail()) - return error; - - uint32_t bp_index = GetRegisterContext().SetHardwareBreakpoint(addr, size); - - if (bp_index == LLDB_INVALID_INDEX32) - return Status("Setting hardware breakpoint failed."); - - m_hw_break_index_map.insert({addr, bp_index}); - return Status(); + return Status("Not Available"); } Status NativeThreadOpenBSD::RemoveHardwareBreakpoint(lldb::addr_t addr) { - auto bp = m_hw_break_index_map.find(addr); - if (bp == m_hw_break_index_map.end()) - return Status(); - - uint32_t bp_index = bp->second; - if (GetRegisterContext().ClearHardwareBreakpoint(bp_index)) { - m_hw_break_index_map.erase(bp); - return Status(); - } - - return Status("Clearing hardware breakpoint failed."); + return Status("Not Available"); } |