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 liblldb_ExecutionContextScope_h_
10 #define liblldb_ExecutionContextScope_h_
11 
12 #include "lldb/lldb-private.h"
13 
14 namespace 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.
33 public:
35 
36  virtual lldb::TargetSP CalculateTarget() = 0;
37 
38  virtual lldb::ProcessSP CalculateProcess() = 0;
39 
40  virtual lldb::ThreadSP CalculateThread() = 0;
41 
42  virtual lldb::StackFrameSP CalculateStackFrame() = 0;
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 // liblldb_ExecutionContextScope_h_
virtual lldb::ThreadSP CalculateThread()=0
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
virtual void CalculateExecutionContext(ExecutionContext &exe_ctx)=0
Reconstruct the object's execution context into sc.
virtual lldb::ProcessSP CalculateProcess()=0
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual lldb::TargetSP CalculateTarget()=0
virtual lldb::StackFrameSP CalculateStackFrame()=0
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...