summaryrefslogtreecommitdiff
path: root/source/Breakpoint/WatchpointOptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Breakpoint/WatchpointOptions.cpp')
-rw-r--r--source/Breakpoint/WatchpointOptions.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/source/Breakpoint/WatchpointOptions.cpp b/source/Breakpoint/WatchpointOptions.cpp
index 033eb66014b93..7dd130a3072c7 100644
--- a/source/Breakpoint/WatchpointOptions.cpp
+++ b/source/Breakpoint/WatchpointOptions.cpp
@@ -1,9 +1,8 @@
//===-- WatchpointOptions.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
//
//===----------------------------------------------------------------------===//
@@ -26,34 +25,28 @@ bool WatchpointOptions::NullCallback(void *baton,
return true;
}
-//----------------------------------------------------------------------
// WatchpointOptions constructor
-//----------------------------------------------------------------------
WatchpointOptions::WatchpointOptions()
: m_callback(WatchpointOptions::NullCallback), m_callback_baton_sp(),
- m_callback_is_synchronous(false), m_thread_spec_ap() {}
+ m_callback_is_synchronous(false), m_thread_spec_up() {}
-//----------------------------------------------------------------------
// WatchpointOptions copy constructor
-//----------------------------------------------------------------------
WatchpointOptions::WatchpointOptions(const WatchpointOptions &rhs)
: m_callback(rhs.m_callback), m_callback_baton_sp(rhs.m_callback_baton_sp),
m_callback_is_synchronous(rhs.m_callback_is_synchronous),
- m_thread_spec_ap() {
- if (rhs.m_thread_spec_ap.get() != nullptr)
- m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get()));
+ m_thread_spec_up() {
+ if (rhs.m_thread_spec_up != nullptr)
+ m_thread_spec_up.reset(new ThreadSpec(*rhs.m_thread_spec_up));
}
-//----------------------------------------------------------------------
// WatchpointOptions assignment operator
-//----------------------------------------------------------------------
const WatchpointOptions &WatchpointOptions::
operator=(const WatchpointOptions &rhs) {
m_callback = rhs.m_callback;
m_callback_baton_sp = rhs.m_callback_baton_sp;
m_callback_is_synchronous = rhs.m_callback_is_synchronous;
- if (rhs.m_thread_spec_ap.get() != nullptr)
- m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get()));
+ if (rhs.m_thread_spec_up != nullptr)
+ m_thread_spec_up.reset(new ThreadSpec(*rhs.m_thread_spec_up));
return *this;
}
@@ -71,14 +64,10 @@ WatchpointOptions::CopyOptionsNoCallback(WatchpointOptions &orig) {
return ret_val;
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
WatchpointOptions::~WatchpointOptions() = default;
-//------------------------------------------------------------------
// Callbacks
-//------------------------------------------------------------------
void WatchpointOptions::SetCallback(WatchpointHitCallback callback,
const BatonSP &callback_baton_sp,
bool callback_is_synchronous) {
@@ -114,14 +103,14 @@ bool WatchpointOptions::HasCallback() {
}
const ThreadSpec *WatchpointOptions::GetThreadSpecNoCreate() const {
- return m_thread_spec_ap.get();
+ return m_thread_spec_up.get();
}
ThreadSpec *WatchpointOptions::GetThreadSpec() {
- if (m_thread_spec_ap.get() == nullptr)
- m_thread_spec_ap.reset(new ThreadSpec());
+ if (m_thread_spec_up == nullptr)
+ m_thread_spec_up.reset(new ThreadSpec());
- return m_thread_spec_ap.get();
+ return m_thread_spec_up.get();
}
void WatchpointOptions::SetThreadID(lldb::tid_t thread_id) {
@@ -153,8 +142,8 @@ void WatchpointOptions::GetDescription(Stream *s,
} else
s->PutCString(" Options: ");
- if (m_thread_spec_ap.get())
- m_thread_spec_ap->GetDescription(s, level);
+ if (m_thread_spec_up)
+ m_thread_spec_up->GetDescription(s, level);
else if (level == eDescriptionLevelBrief)
s->PutCString("thread spec: no ");
if (level == lldb::eDescriptionLevelFull) {