LLDB mainline
ThreadPostMortemTrace.cpp
Go to the documentation of this file.
1//===-- ThreadPostMortemTrace.cpp -----------------------------------------===//
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
10
11#include <memory>
12#include <optional>
13
15#include "lldb/Target/Process.h"
17
18using namespace lldb;
19using namespace lldb_private;
20using namespace llvm;
21
23
27
28 return m_reg_context_sp;
29}
30
33 // Eventually this will calculate the register context based on the current
34 // trace position.
35 return std::make_shared<RegisterContextHistory>(
36 *this, 0, GetProcess()->GetAddressByteSize(), LLDB_INVALID_ADDRESS);
37}
38
40
41const std::optional<FileSpec> &ThreadPostMortemTrace::GetTraceFile() const {
42 return m_trace_file;
43}
This base class provides an interface to stack frames.
Definition: StackFrame.h:43
bool CalculateStopInfo() override
Ask the thread subclass to set its stop info.
lldb::RegisterContextSP GetRegisterContext() override
lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame) override
const std::optional< FileSpec > & GetTraceFile() const
std::optional< FileSpec > m_trace_file
lldb::ProcessSP GetProcess() const
Definition: Thread.h:157
lldb::RegisterContextSP m_reg_context_sp
The register context for this thread's current register state.
Definition: Thread.h:1319
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:82
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:392
Definition: Debugger.h:54