1 | //===-- SBExecutionContext.h -----------------------------------------*- C++ |
2 | //-*-===// |
3 | // |
4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | // See https://llvm.org/LICENSE.txt for license information. |
6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | // |
8 | //===----------------------------------------------------------------------===// |
9 | |
10 | #ifndef LLDB_API_SBEXECUTIONCONTEXT_H |
11 | #define LLDB_API_SBEXECUTIONCONTEXT_H |
12 | |
13 | #include "lldb/API/SBDefines.h" |
14 | |
15 | #include <cstdio> |
16 | #include <vector> |
17 | |
18 | namespace lldb_private { |
19 | namespace python { |
20 | class SWIGBridge; |
21 | } |
22 | } // namespace lldb_private |
23 | |
24 | namespace lldb { |
25 | |
26 | class LLDB_API SBExecutionContext { |
27 | friend class SBCommandInterpreter; |
28 | |
29 | public: |
30 | SBExecutionContext(); |
31 | |
32 | SBExecutionContext(const lldb::SBExecutionContext &rhs); |
33 | |
34 | SBExecutionContext(const lldb::SBTarget &target); |
35 | |
36 | SBExecutionContext(const lldb::SBProcess &process); |
37 | |
38 | SBExecutionContext(lldb::SBThread thread); // can't be a const& because |
39 | // SBThread::get() isn't itself a |
40 | // const function |
41 | |
42 | SBExecutionContext(const lldb::SBFrame &frame); |
43 | |
44 | ~SBExecutionContext(); |
45 | |
46 | const SBExecutionContext &operator=(const lldb::SBExecutionContext &rhs); |
47 | |
48 | SBTarget GetTarget() const; |
49 | |
50 | SBProcess GetProcess() const; |
51 | |
52 | SBThread GetThread() const; |
53 | |
54 | SBFrame GetFrame() const; |
55 | |
56 | protected: |
57 | friend class lldb_private::python::SWIGBridge; |
58 | |
59 | lldb_private::ExecutionContextRef *get() const; |
60 | |
61 | SBExecutionContext(lldb::ExecutionContextRefSP exe_ctx_ref_sp); |
62 | |
63 | private: |
64 | mutable lldb::ExecutionContextRefSP m_exe_ctx_sp; |
65 | }; |
66 | |
67 | } // namespace lldb |
68 | |
69 | #endif // LLDB_API_SBEXECUTIONCONTEXT_H |
70 | |