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 
14 #include "lldb/Target/Process.h"
16 
17 using namespace lldb;
18 using namespace lldb_private;
19 
20 void ThreadPostMortemTrace::RefreshStateAfterStop() {}
21 
22 RegisterContextSP ThreadPostMortemTrace::GetRegisterContext() {
23  if (!m_reg_context_sp)
24  m_reg_context_sp = CreateRegisterContextForFrame(nullptr);
25 
26  return m_reg_context_sp;
27 }
28 
29 RegisterContextSP
30 ThreadPostMortemTrace::CreateRegisterContextForFrame(StackFrame *frame) {
31  // Eventually this will calculate the register context based on the current
32  // trace position.
33  return std::make_shared<RegisterContextHistory>(
34  *this, 0, GetProcess()->GetAddressByteSize(), LLDB_INVALID_ADDRESS);
35 }
36 
37 bool ThreadPostMortemTrace::CalculateStopInfo() { return false; }
38 
39 const FileSpec &ThreadPostMortemTrace::GetTraceFile() const {
40  return m_trace_file;
41 }
ThreadPostMortemTrace.h
Process.h
lldb_private::FileSpec
Definition: FileSpec.h:56
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:74
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
Definition: SBAddress.h:15
RegisterContext.h
RegisterContextHistory.h