]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBExecutionContext.h
MFV r322240: 8491 uberblock on-disk padding to reserve space for smoothly merging...
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBExecutionContext.h
1 //===-- SBExecutionContext.h -----------------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef LLDB_SBExecutionContext_h_
12 #define LLDB_SBExecutionContext_h_
13
14 #include "lldb/API/SBDefines.h"
15
16 #include <stdio.h>
17 #include <vector>
18
19 namespace lldb {
20
21 class LLDB_API SBExecutionContext {
22   friend class SBCommandInterpreter;
23
24 public:
25   SBExecutionContext();
26
27   SBExecutionContext(const lldb::SBExecutionContext &rhs);
28
29   SBExecutionContext(lldb::ExecutionContextRefSP exe_ctx_ref_sp);
30
31   SBExecutionContext(const lldb::SBTarget &target);
32
33   SBExecutionContext(const lldb::SBProcess &process);
34
35   SBExecutionContext(lldb::SBThread thread); // can't be a const& because
36                                              // SBThread::get() isn't itself a
37                                              // const function
38
39   SBExecutionContext(const lldb::SBFrame &frame);
40
41   ~SBExecutionContext();
42
43   const SBExecutionContext &operator=(const lldb::SBExecutionContext &rhs);
44
45   SBTarget GetTarget() const;
46
47   SBProcess GetProcess() const;
48
49   SBThread GetThread() const;
50
51   SBFrame GetFrame() const;
52
53 protected:
54   ExecutionContextRefSP &GetSP() const;
55
56   void reset(lldb::ExecutionContextRefSP &event_sp);
57
58   lldb_private::ExecutionContextRef *get() const;
59
60 private:
61   mutable lldb::ExecutionContextRefSP m_exe_ctx_sp;
62 };
63
64 } // namespace lldb
65
66 #endif // LLDB_SBExecutionContext_h_