]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h
Update LLDB snapshot to upstream r241361
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Target / ThreadPlanCallUserExpression.h
1 //===-- ThreadPlanCallUserExpression.h --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_ThreadPlanCallUserExpression_h_
11 #define liblldb_ThreadPlanCallUserExpression_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/lldb-private.h"
18 #include "lldb/Target/Thread.h"
19 #include "lldb/Target/ThreadPlan.h"
20 #include "lldb/Target/ThreadPlanCallFunction.h"
21
22 #include "llvm/ADT/ArrayRef.h"
23
24 namespace lldb_private {
25
26 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction
27 {
28 public:
29     ThreadPlanCallUserExpression (Thread &thread,
30                                   Address &function,
31                                   llvm::ArrayRef<lldb::addr_t> args,
32                                   const EvaluateExpressionOptions &options,
33                                   lldb::ClangUserExpressionSP &user_expression_sp);
34     
35     virtual
36     ~ThreadPlanCallUserExpression ();
37
38     virtual void
39     GetDescription (Stream *s, lldb::DescriptionLevel level);
40     
41     virtual void
42     WillPop ();
43
44     virtual lldb::StopInfoSP
45     GetRealStopInfo();
46     
47     virtual bool
48     MischiefManaged ();
49     
50     void
51     TransferExpressionOwnership ()
52     {
53         m_manage_materialization = true;
54     }
55     
56     virtual lldb::ClangExpressionVariableSP
57     GetExpressionVariable ()
58     {
59         return m_result_var_sp;
60     }
61     
62 protected:
63 private:
64     lldb::ClangUserExpressionSP m_user_expression_sp;    // This is currently just used to ensure the
65                                                          // User expression the initiated this ThreadPlan
66                                                          // lives as long as the thread plan does.
67     bool m_manage_materialization = false;
68     lldb::ClangExpressionVariableSP m_result_var_sp;     // If we are left to manage the materialization,
69                                                          // then stuff the result expression variable here.
70
71     DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
72 };
73
74 } // namespace lldb_private
75
76 #endif  // liblldb_ThreadPlanCallUserExpression_h_