blob: d8447aeb1a2f7847b57f30cd5bfff6509bdd54c9 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- 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
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020010#ifndef LLDB_API_SBEXECUTIONCONTEXT_H
11#define LLDB_API_SBEXECUTIONCONTEXT_H
Andrew Walbran3d2c1972020-04-07 12:24:26 +010012
13#include "lldb/API/SBDefines.h"
14
15#include <stdio.h>
16#include <vector>
17
18namespace lldb {
19
20class LLDB_API SBExecutionContext {
21 friend class SBCommandInterpreter;
22
23public:
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
52protected:
53 void reset(lldb::ExecutionContextRefSP &event_sp);
54
55 lldb_private::ExecutionContextRef *get() const;
56
57private:
58 mutable lldb::ExecutionContextRefSP m_exe_ctx_sp;
59};
60
61} // namespace lldb
62
Olivier Deprezf4ef2d02021-04-20 13:36:24 +020063#endif // LLDB_API_SBEXECUTIONCONTEXT_H