1 //===-- SBBreakpointOptionCommon.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 LLDB_SBBreakpointOptionCommons_h_
11 #define LLDB_SBBreakpointOptionCommons_h_
12 
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/Utility/Baton.h"
15 
16 namespace lldb
17 {
18 struct CallbackData {
19   SBBreakpointHitCallback callback;
20   void *callback_baton;
21 };
22 
23 class SBBreakpointCallbackBaton : public lldb_private::TypedBaton<CallbackData> {
24 public:
25   SBBreakpointCallbackBaton(SBBreakpointHitCallback callback,
26                             void *baton);
27 
28   ~SBBreakpointCallbackBaton();
29 
30   static bool PrivateBreakpointHitCallback(void *baton,
31                                            lldb_private::StoppointCallbackContext *ctx,
32                                            lldb::user_id_t break_id,
33                                            lldb::user_id_t break_loc_id);
34 };
35 
36 } // namespace lldb
37 #endif // LLDB_SBBreakpointOptionCommons_h_
38