diff options
Diffstat (limited to 'lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp index 0a49f96f54a1..48dbddb86cca 100644 --- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp @@ -1,4 +1,4 @@ -//===-- FreeBSDThread.cpp ---------------------------------------*- C++ -*-===// +//===-- FreeBSDThread.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -14,9 +14,6 @@ #include <sys/types.h> #include <sys/user.h> -#include "lldb/Target/UnixSignals.h" -#include "lldb/Utility/State.h" - #include "FreeBSDThread.h" #include "POSIXStopInfo.h" #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" @@ -26,7 +23,6 @@ #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h" #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h" #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h" -#include "Plugins/Process/Utility/UnwindLLDB.h" #include "ProcessFreeBSD.h" #include "ProcessMonitor.h" #include "RegisterContextPOSIXProcessMonitor_arm.h" @@ -44,6 +40,8 @@ #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Target/UnixSignals.h" +#include "lldb/Target/Unwind.h" #include "lldb/Utility/State.h" #include "llvm/ADT/SmallString.h" @@ -166,7 +164,6 @@ lldb::RegisterContextSP FreeBSDThread::GetRegisterContext() { assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD); switch (target_arch.GetMachine()) { case llvm::Triple::aarch64: - reg_interface = new RegisterInfoPOSIX_arm64(target_arch); break; case llvm::Triple::arm: reg_interface = new RegisterInfoPOSIX_arm(target_arch); @@ -195,7 +192,8 @@ lldb::RegisterContextSP FreeBSDThread::GetRegisterContext() { switch (target_arch.GetMachine()) { case llvm::Triple::aarch64: { RegisterContextPOSIXProcessMonitor_arm64 *reg_ctx = - new RegisterContextPOSIXProcessMonitor_arm64(*this, 0, reg_interface); + new RegisterContextPOSIXProcessMonitor_arm64( + *this, std::make_unique<RegisterInfoPOSIX_arm64>(target_arch)); m_posix_thread = reg_ctx; m_reg_context_sp.reset(reg_ctx); break; @@ -254,8 +252,7 @@ FreeBSDThread::CreateRegisterContextForFrame(lldb_private::StackFrame *frame) { if (concrete_frame_idx == 0) reg_ctx_sp = GetRegisterContext(); else { - assert(GetUnwinder()); - reg_ctx_sp = GetUnwinder()->CreateRegisterContextForFrame(frame); + reg_ctx_sp = GetUnwinder().CreateRegisterContextForFrame(frame); } return reg_ctx_sp; @@ -275,13 +272,6 @@ bool FreeBSDThread::CalculateStopInfo() { return true; } -Unwind *FreeBSDThread::GetUnwinder() { - if (!m_unwinder_up) - m_unwinder_up.reset(new UnwindLLDB(*this)); - - return m_unwinder_up.get(); -} - void FreeBSDThread::DidStop() { // Don't set the thread state to stopped unless we really stopped. } |