aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/TraceCursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/TraceCursor.cpp')
-rw-r--r--lldb/source/Target/TraceCursor.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/lldb/source/Target/TraceCursor.cpp b/lldb/source/Target/TraceCursor.cpp
new file mode 100644
index 000000000000..d0f69642cb90
--- /dev/null
+++ b/lldb/source/Target/TraceCursor.cpp
@@ -0,0 +1,35 @@
+//===-- TraceCursor.cpp -----------------------------------------*- C++ -*-===//
+//
+// 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/Target/TraceCursor.h"
+
+#include "lldb/Target/ExecutionContext.h"
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace llvm;
+
+TraceCursor::TraceCursor(lldb::ThreadSP thread_sp)
+ : m_exe_ctx_ref(ExecutionContext(thread_sp)) {}
+
+ExecutionContextRef &TraceCursor::GetExecutionContextRef() {
+ return m_exe_ctx_ref;
+}
+
+void TraceCursor::SetGranularity(
+ lldb::TraceInstructionControlFlowType granularity) {
+ m_granularity = granularity;
+}
+
+void TraceCursor::SetIgnoreErrors(bool ignore_errors) {
+ m_ignore_errors = ignore_errors;
+}
+
+void TraceCursor::SetForwards(bool forwards) { m_forwards = forwards; }
+
+bool TraceCursor::IsForwards() const { return m_forwards; }