1 //===-- ThreadPlanCallUserExpression.h --------------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef liblldb_ThreadPlanCallUserExpression_h_
12 #define liblldb_ThreadPlanCallUserExpression_h_
16 // Other libraries and framework 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"
23 #include "llvm/ADT/ArrayRef.h"
25 namespace lldb_private {
27 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction {
29 ThreadPlanCallUserExpression(Thread &thread, Address &function,
30 llvm::ArrayRef<lldb::addr_t> args,
31 const EvaluateExpressionOptions &options,
32 lldb::UserExpressionSP &user_expression_sp);
34 ~ThreadPlanCallUserExpression() override;
36 void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
38 void WillPop() override;
40 lldb::StopInfoSP GetRealStopInfo() override;
42 bool MischiefManaged() override;
44 void TransferExpressionOwnership() { m_manage_materialization = true; }
46 lldb::ExpressionVariableSP GetExpressionVariable() override {
47 return m_result_var_sp;
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.
61 DISALLOW_COPY_AND_ASSIGN(ThreadPlanCallUserExpression);
64 } // namespace lldb_private
66 #endif // liblldb_ThreadPlanCallUserExpression_h_