]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Breakpoint/StoppointCallbackContext.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Breakpoint / StoppointCallbackContext.h
1 //===-- StoppointCallbackContext.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_StoppointCallbackContext_h_
11 #define liblldb_StoppointCallbackContext_h_
12
13 #include "lldb/Target/ExecutionContext.h"
14 #include "lldb/lldb-private.h"
15
16 namespace lldb_private {
17
18 //----------------------------------------------------------------------
19 /// @class StoppointCallbackContext StoppointCallbackContext.h
20 /// "lldb/Breakpoint/StoppointCallbackContext.h"
21 /// @brief Class holds the information that a breakpoint callback needs to
22 /// evaluate this stop.
23 //----------------------------------------------------------------------
24
25 //----------------------------------------------------------------------
26 /// General Outline:
27 /// When we hit a breakpoint we need to package up whatever information is
28 /// needed
29 /// to evaluate breakpoint commands and conditions.  This class is the container
30 /// of
31 /// that information.
32 //----------------------------------------------------------------------
33
34 class StoppointCallbackContext {
35 public:
36   StoppointCallbackContext();
37
38   StoppointCallbackContext(Event *event, const ExecutionContext &exe_ctx,
39                            bool synchronously = false);
40
41   //------------------------------------------------------------------
42   /// Clear the object's state.
43   ///
44   /// Sets the event, process and thread to NULL, and the frame index to an
45   /// invalid value.
46   //------------------------------------------------------------------
47   void Clear();
48
49   //------------------------------------------------------------------
50   // Member variables
51   //------------------------------------------------------------------
52   Event *event; // This is the event, the callback can modify this to indicate
53                 // the meaning of the breakpoint hit
54   ExecutionContextRef
55       exe_ctx_ref;     // This tells us where we have stopped, what thread.
56   bool is_synchronous; // Is the callback being executed synchronously with the
57                        // breakpoint,
58                        // or asynchronously as the event is retrieved?
59 };
60
61 } // namespace lldb_private
62
63 #endif // liblldb_StoppointCallbackContext_h_