1 //===-- ThreadPlanCallUserExpression.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ThreadPlanCallUserExpression_h_
11 #define liblldb_ThreadPlanCallUserExpression_h_
15 // Other libraries and framework 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"
22 #include "llvm/ADT/ArrayRef.h"
24 namespace lldb_private {
26 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction
29 ThreadPlanCallUserExpression (Thread &thread,
31 llvm::ArrayRef<lldb::addr_t> args,
32 const EvaluateExpressionOptions &options,
33 lldb::UserExpressionSP &user_expression_sp);
35 ~ThreadPlanCallUserExpression() override;
38 GetDescription(Stream *s, lldb::DescriptionLevel level) override;
44 GetRealStopInfo() override;
47 MischiefManaged() override;
50 TransferExpressionOwnership ()
52 m_manage_materialization = true;
55 lldb::ExpressionVariableSP
56 GetExpressionVariable() override
58 return m_result_var_sp;
63 lldb::UserExpressionSP m_user_expression_sp; // This is currently just used to ensure the
64 // User expression the initiated this ThreadPlan
65 // lives as long as the thread plan does.
66 bool m_manage_materialization = false;
67 lldb::ExpressionVariableSP m_result_var_sp; // If we are left to manage the materialization,
68 // then stuff the result expression variable here.
70 DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
73 } // namespace lldb_private
75 #endif // liblldb_ThreadPlanCallUserExpression_h_