Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.h
39642 views
//===-- ThreadPostMortemTrace.h ---------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLDB_TARGET_THREADPOSTMORTEMTRACE_H9#define LLDB_TARGET_THREADPOSTMORTEMTRACE_H1011#include "lldb/Target/Thread.h"12#include <optional>1314namespace lldb_private {1516/// \class ThreadPostMortemTrace ThreadPostMortemTrace.h17///18/// Thread implementation used for representing threads gotten from trace19/// session files, which are similar to threads from core files.20///21class ThreadPostMortemTrace : public Thread {22public:23/// \param[in] process24/// The process who owns this thread.25///26/// \param[in] tid27/// The tid of this thread.28///29/// \param[in] trace_file30/// The file that contains the list of instructions that were traced when31/// this thread was being executed.32ThreadPostMortemTrace(Process &process, lldb::tid_t tid,33const std::optional<FileSpec> &trace_file)34: Thread(process, tid), m_trace_file(trace_file) {}3536void RefreshStateAfterStop() override;3738lldb::RegisterContextSP GetRegisterContext() override;3940lldb::RegisterContextSP41CreateRegisterContextForFrame(StackFrame *frame) override;4243/// \return44/// The trace file of this thread.45const std::optional<FileSpec> &GetTraceFile() const;4647protected:48bool CalculateStopInfo() override;4950lldb::RegisterContextSP m_thread_reg_ctx_sp;5152private:53std::optional<FileSpec> m_trace_file;54};5556} // namespace lldb_private5758#endif // LLDB_TARGET_THREADPOSTMORTEMTRACE_H596061