1 //===-- TraceCursor.cpp -----------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "lldb/Target/TraceCursor.h" 10 11 #include "lldb/Target/ExecutionContext.h" 12 13 using namespace lldb; 14 using namespace lldb_private; 15 using namespace llvm; 16 17 TraceCursor::TraceCursor(lldb::ThreadSP thread_sp) 18 : m_exe_ctx_ref(ExecutionContext(thread_sp)) {} 19 20 ExecutionContextRef &TraceCursor::GetExecutionContextRef() { 21 return m_exe_ctx_ref; 22 } 23 24 void TraceCursor::SetGranularity( 25 lldb::TraceInstructionControlFlowType granularity) { 26 m_granularity = granularity; 27 } 28 29 void TraceCursor::SetIgnoreErrors(bool ignore_errors) { 30 m_ignore_errors = ignore_errors; 31 } 32 33 void TraceCursor::SetForwards(bool forwards) { m_forwards = forwards; } 34 35 bool TraceCursor::IsForwards() const { return m_forwards; } 36