]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanCallUserExpression.h
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.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/Expression/ClangUserExpression.h"
19 #include "lldb/Target/Thread.h"
20 #include "lldb/Target/ThreadPlan.h"
21 #include "lldb/Target/ThreadPlanCallFunction.h"
22
23 namespace lldb_private {
24
25 class ThreadPlanCallUserExpression : public ThreadPlanCallFunction
26 {
27 public:
28     ThreadPlanCallUserExpression (Thread &thread,
29                                   Address &function,
30                                   lldb::addr_t arg,
31                                   bool stop_other_threads,
32                                   bool unwind_on_error,
33                                   bool ignore_breakpoints,
34                                   lldb::addr_t *this_arg,
35                                   lldb::addr_t *cmd_arg,
36                                   ClangUserExpression::ClangUserExpressionSP &user_expression_sp);
37     
38     virtual
39     ~ThreadPlanCallUserExpression ();
40
41     virtual void
42     GetDescription (Stream *s, lldb::DescriptionLevel level);
43     
44     virtual void
45     WillPop ()
46     {
47         ThreadPlanCallFunction::WillPop();
48         if (m_user_expression_sp)
49             m_user_expression_sp.reset();
50     }
51
52     virtual lldb::StopInfoSP
53     GetRealStopInfo();
54     
55 protected:
56 private:
57     ClangUserExpression::ClangUserExpressionSP m_user_expression_sp;    // This is currently just used to ensure the
58                                                                         // User expression the initiated this ThreadPlan
59                                                                         // lives as long as the thread plan does.
60     DISALLOW_COPY_AND_ASSIGN (ThreadPlanCallUserExpression);
61 };
62
63 } // namespace lldb_private
64
65 #endif  // liblldb_ThreadPlanCallUserExpression_h_