LLDB  mainline
ThreadPostMortemTrace.h
Go to the documentation of this file.
1 //===-- ThreadPostMortemTrace.h ---------------------------------*- 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 #ifndef LLDB_TARGET_THREADPOSTMORTEMTRACE_H
10 #define LLDB_TARGET_THREADPOSTMORTEMTRACE_H
11 
12 #include "lldb/Target/Thread.h"
13 
14 namespace lldb_private {
15 
16 /// \class ThreadPostMortemTrace ThreadPostMortemTrace.h
17 ///
18 /// Thread implementation used for representing threads gotten from trace
19 /// session files, which are similar to threads from core files.
20 ///
21 /// See \a TraceSessionFileParser for more information regarding trace session
22 /// files.
23 class ThreadPostMortemTrace : public Thread {
24 public:
25  /// \param[in] process
26  /// The process who owns this thread.
27  ///
28  /// \param[in] tid
29  /// The tid of this thread.
30  ///
31  /// \param[in] trace_file
32  /// The file that contains the list of instructions that were traced when
33  /// this thread was being executed.
35  const FileSpec &trace_file)
36  : Thread(process, tid), m_trace_file(trace_file) {}
37 
38  void RefreshStateAfterStop() override;
39 
40  lldb::RegisterContextSP GetRegisterContext() override;
41 
42  lldb::RegisterContextSP
44 
45  /// \return
46  /// The trace file of this thread.
47  const FileSpec &GetTraceFile() const;
48 
49 protected:
50  bool CalculateStopInfo() override;
51 
52  lldb::RegisterContextSP m_thread_reg_ctx_sp;
53 
54 private:
56 };
57 
58 } // namespace lldb_private
59 
60 #endif // LLDB_TARGET_THREADPOSTMORTEMTRACE_H
lldb_private::ThreadPostMortemTrace::ThreadPostMortemTrace
ThreadPostMortemTrace(Process &process, lldb::tid_t tid, const FileSpec &trace_file)
Definition: ThreadPostMortemTrace.h:34
lldb_private::Process
Definition: Process.h:338
lldb_private::ThreadPostMortemTrace
Definition: ThreadPostMortemTrace.h:23
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::Thread
Definition: Thread.h:60
lldb_private::ThreadPostMortemTrace::CalculateStopInfo
bool CalculateStopInfo() override
Definition: ThreadPostMortemTrace.cpp:37
lldb_private::ThreadPostMortemTrace::m_trace_file
FileSpec m_trace_file
Definition: ThreadPostMortemTrace.h:55
Thread.h
lldb_private::ThreadPostMortemTrace::RefreshStateAfterStop
void RefreshStateAfterStop() override
Definition: ThreadPostMortemTrace.cpp:20
lldb_private::ThreadPostMortemTrace::GetTraceFile
const FileSpec & GetTraceFile() const
Definition: ThreadPostMortemTrace.cpp:39
lldb_private::ThreadPostMortemTrace::m_thread_reg_ctx_sp
lldb::RegisterContextSP m_thread_reg_ctx_sp
Definition: ThreadPostMortemTrace.h:52
lldb_private::ThreadPostMortemTrace::CreateRegisterContextForFrame
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame) override
Definition: ThreadPostMortemTrace.cpp:30
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::StackFrame
Definition: StackFrame.h:40
lldb_private::ThreadPostMortemTrace::GetRegisterContext
lldb::RegisterContextSP GetRegisterContext() override
Definition: ThreadPostMortemTrace.cpp:22
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86