LLDB mainline
ExecutionContextScope.h
Go to the documentation of this file.
1//===-- ExecutionContextScope.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_EXECUTIONCONTEXTSCOPE_H
10#define LLDB_TARGET_EXECUTIONCONTEXTSCOPE_H
11
12#include "lldb/lldb-private.h"
13
14namespace lldb_private {
15
16/// @class ExecutionContextScope ExecutionContextScope.h
17/// "lldb/Target/ExecutionContextScope.h" Inherit from this if your object can
18/// reconstruct its
19/// execution context.
20///
21/// Many objects that have pointers back to parent execution context objects
22/// can inherit from this pure virtual class can reconstruct their execution
23/// context without having to keep a complete ExecutionContext object in the
24/// object state. Examples of these objects include: Process, Thread,
25/// RegisterContext and StackFrame.
26///
27/// Objects can contain a valid pointer to an instance of this so they can
28/// reconstruct the execution context.
29///
30/// Objects that adhere to this protocol can reconstruct enough of a execution
31/// context to allow functions that take a execution contexts to be called.
33public:
34 virtual ~ExecutionContextScope() = default;
35
37
39
41
43
44 /// Reconstruct the object's execution context into \a sc.
45 ///
46 /// The object should fill in as much of the ExecutionContextScope as it can
47 /// so function calls that require a execution context can be made for the
48 /// given object.
49 ///
50 /// \param[out] exe_ctx
51 /// A reference to an execution context object that gets filled
52 /// in.
53 virtual void CalculateExecutionContext(ExecutionContext &exe_ctx) = 0;
54};
55
56} // namespace lldb_private
57
58#endif // LLDB_TARGET_EXECUTIONCONTEXTSCOPE_H
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual lldb::StackFrameSP CalculateStackFrame()=0
virtual void CalculateExecutionContext(ExecutionContext &exe_ctx)=0
Reconstruct the object's execution context into sc.
virtual ~ExecutionContextScope()=default
virtual lldb::ThreadSP CalculateThread()=0
virtual lldb::ProcessSP CalculateProcess()=0
virtual lldb::TargetSP CalculateTarget()=0
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition: lldb-forward.h:420
std::shared_ptr< lldb_private::Thread > ThreadSP
Definition: lldb-forward.h:446
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:444