]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Target/ThreadPlanCallUserExpression.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Target / ThreadPlanCallUserExpression.h
1 //===-- ThreadPlanCallUserExpression.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 liblldb_ThreadPlanCallUserExpression_h_
12 #define liblldb_ThreadPlanCallUserExpression_h_
13
14 // C Includes
15 // C++ Includes
16 // Other libraries and framework includes
17 // Project includes
18 #include "lldb/Target/Thread.h"
19 #include "lldb/Target/ThreadPlan.h"
20 #include "lldb/Target/ThreadPlanCallFunction.h"
21 #include "lldb/lldb-private.h"
22
23 #include "llvm/ADT/ArrayRef.h"
24
25 namespace lldb_private {
26
27 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction {
28 public:
29   ThreadPlanCallUserExpression(Thread &thread, Address &function,
30                                llvm::ArrayRef<lldb::addr_t> args,
31                                const EvaluateExpressionOptions &options,
32                                lldb::UserExpressionSP &user_expression_sp);
33
34   ~ThreadPlanCallUserExpression() override;
35
36   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
37
38   void WillPop() override;
39
40   lldb::StopInfoSP GetRealStopInfo() override;
41
42   bool MischiefManaged() override;
43
44   void TransferExpressionOwnership() { m_manage_materialization = true; }
45
46   lldb::ExpressionVariableSP GetExpressionVariable() override {
47     return m_result_var_sp;
48   }
49
50 protected:
51 private:
52   lldb::UserExpressionSP
53       m_user_expression_sp; // This is currently just used to ensure the
54                             // User expression the initiated this ThreadPlan
55                             // lives as long as the thread plan does.
56   bool m_manage_materialization = false;
57   lldb::ExpressionVariableSP
58       m_result_var_sp; // If we are left to manage the materialization,
59                        // then stuff the result expression variable here.
60
61   DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallUserExpression);
62 };
63
64 } // namespace lldb_private
65
66 #endif // liblldb_ThreadPlanCallUserExpression_h_