Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.cpp
39644 views
//===-- ThreadPostMortemTrace.cpp -----------------------------------------===//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#include "ThreadPostMortemTrace.h"910#include <memory>11#include <optional>1213#include "Plugins/Process/Utility/RegisterContextHistory.h"14#include "lldb/Target/Process.h"15#include "lldb/Target/RegisterContext.h"1617using namespace lldb;18using namespace lldb_private;19using namespace llvm;2021void ThreadPostMortemTrace::RefreshStateAfterStop() {}2223RegisterContextSP ThreadPostMortemTrace::GetRegisterContext() {24if (!m_reg_context_sp)25m_reg_context_sp = CreateRegisterContextForFrame(nullptr);2627return m_reg_context_sp;28}2930RegisterContextSP31ThreadPostMortemTrace::CreateRegisterContextForFrame(StackFrame *frame) {32// Eventually this will calculate the register context based on the current33// trace position.34return std::make_shared<RegisterContextHistory>(35*this, 0, GetProcess()->GetAddressByteSize(), LLDB_INVALID_ADDRESS);36}3738bool ThreadPostMortemTrace::CalculateStopInfo() { return false; }3940const std::optional<FileSpec> &ThreadPostMortemTrace::GetTraceFile() const {41return m_trace_file;42}434445