LLVM: SBListener.h Source File
Description: C++ source code API documentation for LLDB.
Keywords: LLDB,C++,doxygen,API,documentation

LLDB API Documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

SBListener.h
Go to the documentation of this file.
1 //===-- SBListener.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_SBListener_h_
11 #define LLDB_SBListener_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 namespace lldb {
16
17 class LLDB_API SBListener {
18 public:
19 SBListener();
20
21 SBListener(const char *name);
22
23 SBListener(const SBListener &rhs);
24
25 ~SBListener();
26
27 const lldb::SBListener &operator=(const lldb::SBListener &rhs);
28
29 void AddEvent(const lldb::SBEvent &event);
30
31 void Clear();
32
33 bool IsValid() const;
34
35 uint32_t StartListeningForEventClass(SBDebugger &debugger,
36 const char *broadcaster_class,
37 uint32_t event_mask);
38
39 bool StopListeningForEventClass(SBDebugger &debugger,
40 const char *broadcaster_class,
41 uint32_t event_mask);
42
43 uint32_t StartListeningForEvents(const lldb::SBBroadcaster &broadcaster,
44 uint32_t event_mask);
45
46 bool StopListeningForEvents(const lldb::SBBroadcaster &broadcaster,
47 uint32_t event_mask);
48
49 // Returns true if an event was received, false if we timed out.
50 bool WaitForEvent(uint32_t num_seconds, lldb::SBEvent &event);
51
52 bool WaitForEventForBroadcaster(uint32_t num_seconds,
53 const lldb::SBBroadcaster &broadcaster,
54 lldb::SBEvent &sb_event);
55
56 bool WaitForEventForBroadcasterWithType(
57 uint32_t num_seconds, const lldb::SBBroadcaster &broadcaster,
58 uint32_t event_type_mask, lldb::SBEvent &sb_event);
59
60 bool PeekAtNextEvent(lldb::SBEvent &sb_event);
61
62 bool PeekAtNextEventForBroadcaster(const lldb::SBBroadcaster &broadcaster,
63 lldb::SBEvent &sb_event);
64
65 bool
66 PeekAtNextEventForBroadcasterWithType(const lldb::SBBroadcaster &broadcaster,
67 uint32_t event_type_mask,
68 lldb::SBEvent &sb_event);
69
70 bool GetNextEvent(lldb::SBEvent &sb_event);
71
72 bool GetNextEventForBroadcaster(const lldb::SBBroadcaster &broadcaster,
73 lldb::SBEvent &sb_event);
74
75 bool
76 GetNextEventForBroadcasterWithType(const lldb::SBBroadcaster &broadcaster,
77 uint32_t event_type_mask,
78 lldb::SBEvent &sb_event);
79
80 bool HandleBroadcastEvent(const lldb::SBEvent &event);
81
82 protected:
83 friend class SBAttachInfo;
84 friend class SBBroadcaster;
85 friend class SBCommandInterpreter;
86 friend class SBDebugger;
87 friend class SBLaunchInfo;
88 friend class SBTarget;
89
90 SBListener(const lldb::ListenerSP &listener_sp);
91
92 lldb::ListenerSP GetSP() { return m_opaque_sp; }
93
94 private:
95 lldb_private::Listener *operator->() const;
96
97 lldb_private::Listener *get() const;
98
99 void reset(lldb::ListenerSP listener_sp);
100
101 lldb::ListenerSP m_opaque_sp;
102 lldb_private::Listener *m_unused_ptr;
103 };
104
105 } // namespace lldb
106
107 #endif // LLDB_SBListener_h_
lldb::SBBroadcaster
Definition: SBBroadcaster.h:17
lldb::SBAttachInfo
Definition: SBAttachInfo.h:19
SBDefines.h
lldb::SBCommandInterpreter
Definition: SBCommandInterpreter.h:66
lldb::SBListener
class LLDB_API SBListener
Definition: SBDefines.h:61
lldb::SBDebugger
Definition: SBDebugger.h:35
lldb::SBListener
Definition: SBListener.h:17
lldb::SBListener::GetSP
lldb::ListenerSP GetSP()
Definition: SBListener.h:92
lldb::SBEvent
Definition: SBEvent.h:22
lldb::SBLaunchInfo
Definition: SBLaunchInfo.h:20
lldb::SBTarget
Definition: SBTarget.h:34