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::ClangUserExpressionSP &user_expression_sp);
36 ~ThreadPlanCallUserExpression ();
39 GetDescription (Stream *s, lldb::DescriptionLevel level);
44 virtual lldb::StopInfoSP
51 TransferExpressionOwnership ()
53 m_manage_materialization = true;
56 virtual lldb::ClangExpressionVariableSP
57 GetExpressionVariable ()
59 return m_result_var_sp;
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.
71 DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
74 } // namespace lldb_private
76 #endif // liblldb_ThreadPlanCallUserExpression_h_