]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Host/common/NativeWatchpointList.h
Import LLDB as of upstream SVN 228549 (git 39760838)
[FreeBSD/FreeBSD.git] / include / lldb / Host / common / NativeWatchpointList.h
1 //===-- NativeWatchpointList.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_NativeWatchpointList_h_
11 #define liblldb_NativeWatchpointList_h_
12
13 #include "lldb/lldb-private-forward.h"
14 #include "lldb/Core/Error.h"
15
16 #include <map>
17
18 namespace lldb_private
19 {
20     struct NativeWatchpoint
21     {
22         lldb::addr_t m_addr;
23         size_t m_size;
24         uint32_t m_watch_flags;
25         bool m_hardware;
26     };
27
28     class NativeWatchpointList
29     {
30     public:
31         Error
32         Add (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware);
33
34         Error
35         Remove (lldb::addr_t addr);
36
37         using WatchpointMap = std::map<lldb::addr_t, NativeWatchpoint>;
38
39         const WatchpointMap&
40         GetWatchpointMap () const;
41
42     private:
43         WatchpointMap m_watchpoints;
44     };
45 }
46
47 #endif // ifndef liblldb_NativeWatchpointList_h_