diff options
Diffstat (limited to 'source/Plugins/Process/Utility/HistoryUnwind.cpp')
| -rw-r--r-- | source/Plugins/Process/Utility/HistoryUnwind.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/Plugins/Process/Utility/HistoryUnwind.cpp b/source/Plugins/Process/Utility/HistoryUnwind.cpp index 4f0ecba613bf..7d473bff8200 100644 --- a/source/Plugins/Process/Utility/HistoryUnwind.cpp +++ b/source/Plugins/Process/Utility/HistoryUnwind.cpp @@ -1,9 +1,8 @@ //===-- HistoryUnwind.cpp ---------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -17,14 +16,15 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include <memory> + using namespace lldb; using namespace lldb_private; // Constructor -HistoryUnwind::HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs, - bool stop_id_is_valid) - : Unwind(thread), m_pcs(pcs), m_stop_id_is_valid(stop_id_is_valid) {} +HistoryUnwind::HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs) + : Unwind(thread), m_pcs(pcs) {} // Destructor @@ -33,7 +33,6 @@ HistoryUnwind::~HistoryUnwind() {} void HistoryUnwind::DoClear() { std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex); m_pcs.clear(); - m_stop_id_is_valid = false; } lldb::RegisterContextSP @@ -43,9 +42,9 @@ HistoryUnwind::DoCreateRegisterContextForFrame(StackFrame *frame) { addr_t pc = frame->GetFrameCodeAddress().GetLoadAddress( &frame->GetThread()->GetProcess()->GetTarget()); if (pc != LLDB_INVALID_ADDRESS) { - rctx.reset(new RegisterContextHistory( + rctx = std::make_shared<RegisterContextHistory>( *frame->GetThread().get(), frame->GetConcreteFrameIndex(), - frame->GetThread()->GetProcess()->GetAddressByteSize(), pc)); + frame->GetThread()->GetProcess()->GetAddressByteSize(), pc); } } return rctx; |
