summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Utility/HistoryThread.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
commit5f29bb8a675e8f96452b632e7129113f7dec850e (patch)
tree3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Plugins/Process/Utility/HistoryThread.cpp
parent88c643b6fec27eec436c8d138fee6346e92337d6 (diff)
Notes
Diffstat (limited to 'source/Plugins/Process/Utility/HistoryThread.cpp')
-rw-r--r--source/Plugins/Process/Utility/HistoryThread.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/Plugins/Process/Utility/HistoryThread.cpp b/source/Plugins/Process/Utility/HistoryThread.cpp
index 4983dcdb5142..3cb583172623 100644
--- a/source/Plugins/Process/Utility/HistoryThread.cpp
+++ b/source/Plugins/Process/Utility/HistoryThread.cpp
@@ -1,15 +1,15 @@
//===-- HistoryThread.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
//
//===----------------------------------------------------------------------===//
#include "lldb/lldb-private.h"
#include "Plugins/Process/Utility/HistoryThread.h"
+
#include "Plugins/Process/Utility/HistoryUnwind.h"
#include "Plugins/Process/Utility/RegisterContextHistory.h"
@@ -17,20 +17,20 @@
#include "lldb/Target/StackFrameList.h"
#include "lldb/Utility/Log.h"
+#include <memory>
+
using namespace lldb;
using namespace lldb_private;
// Constructor
HistoryThread::HistoryThread(lldb_private::Process &process, lldb::tid_t tid,
- std::vector<lldb::addr_t> pcs, uint32_t stop_id,
- bool stop_id_is_valid)
+ std::vector<lldb::addr_t> pcs)
: Thread(process, tid, true), m_framelist_mutex(), m_framelist(),
- m_pcs(pcs), m_stop_id(stop_id), m_stop_id_is_valid(stop_id_is_valid),
- m_extended_unwind_token(LLDB_INVALID_ADDRESS), m_queue_name(),
+ m_pcs(pcs), m_extended_unwind_token(LLDB_INVALID_ADDRESS), m_queue_name(),
m_thread_name(), m_originating_unique_thread_id(tid),
m_queue_id(LLDB_INVALID_QUEUE_ID) {
- m_unwinder_ap.reset(new HistoryUnwind(*this, pcs, stop_id_is_valid));
+ m_unwinder_up.reset(new HistoryUnwind(*this, pcs));
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
if (log)
log->Printf("%p HistoryThread::HistoryThread", static_cast<void *>(this));
@@ -49,23 +49,24 @@ HistoryThread::~HistoryThread() {
lldb::RegisterContextSP HistoryThread::GetRegisterContext() {
RegisterContextSP rctx;
if (m_pcs.size() > 0) {
- rctx.reset(new RegisterContextHistory(
- *this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]));
+ rctx = std::make_shared<RegisterContextHistory>(
+ *this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]);
}
return rctx;
}
lldb::RegisterContextSP
HistoryThread::CreateRegisterContextForFrame(StackFrame *frame) {
- return m_unwinder_ap->CreateRegisterContextForFrame(frame);
+ return m_unwinder_up->CreateRegisterContextForFrame(frame);
}
lldb::StackFrameListSP HistoryThread::GetStackFrameList() {
// FIXME do not throw away the lock after we acquire it..
std::unique_lock<std::mutex> lock(m_framelist_mutex);
lock.unlock();
- if (m_framelist.get() == NULL) {
- m_framelist.reset(new StackFrameList(*this, StackFrameListSP(), true));
+ if (m_framelist.get() == nullptr) {
+ m_framelist =
+ std::make_shared<StackFrameList>(*this, StackFrameListSP(), true);
}
return m_framelist;