]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/API/SBExecutionContext.h
Move all sources from the llvm project into contrib/llvm-project.
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / API / SBExecutionContext.h
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_SBExecutionContext_h_
11 #define LLDB_SBExecutionContext_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 #include <stdio.h>
16 #include <vector>
17
18 namespace lldb {
19
20 class LLDB_API SBExecutionContext {
21   friend class SBCommandInterpreter;
22
23 public:
24   SBExecutionContext();
25
26   SBExecutionContext(const lldb::SBExecutionContext &rhs);
27
28   SBExecutionContext(lldb::ExecutionContextRefSP exe_ctx_ref_sp);
29
30   SBExecutionContext(const lldb::SBTarget &target);
31
32   SBExecutionContext(const lldb::SBProcess &process);
33
34   SBExecutionContext(lldb::SBThread thread); // can't be a const& because
35                                              // SBThread::get() isn't itself a
36                                              // const function
37
38   SBExecutionContext(const lldb::SBFrame &frame);
39
40   ~SBExecutionContext();
41
42   const SBExecutionContext &operator=(const lldb::SBExecutionContext &rhs);
43
44   SBTarget GetTarget() const;
45
46   SBProcess GetProcess() const;
47
48   SBThread GetThread() const;
49
50   SBFrame GetFrame() const;
51
52 protected:
53   void reset(lldb::ExecutionContextRefSP &event_sp);
54
55   lldb_private::ExecutionContextRef *get() const;
56
57 private:
58   mutable lldb::ExecutionContextRefSP m_exe_ctx_sp;
59 };
60
61 } // namespace lldb
62
63 #endif // LLDB_SBExecutionContext_h_