1 //===-- SBMemoryRegionInfo.h ------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBMemoryRegionInfo_h_
11 #define LLDB_SBMemoryRegionInfo_h_
13 #include "lldb/API/SBData.h"
14 #include "lldb/API/SBDefines.h"
18 class LLDB_API SBMemoryRegionInfo {
22 SBMemoryRegionInfo(const lldb::SBMemoryRegionInfo &rhs);
24 ~SBMemoryRegionInfo();
26 const lldb::SBMemoryRegionInfo &
27 operator=(const lldb::SBMemoryRegionInfo &rhs);
31 //------------------------------------------------------------------
32 /// Get the base address of this memory range.
35 /// The base address of this memory range.
36 //------------------------------------------------------------------
37 lldb::addr_t GetRegionBase();
39 //------------------------------------------------------------------
40 /// Get the end address of this memory range.
43 /// The base address of this memory range.
44 //------------------------------------------------------------------
45 lldb::addr_t GetRegionEnd();
47 //------------------------------------------------------------------
48 /// Check if this memory address is marked readable to the process.
51 /// true if this memory address is marked readable
52 //------------------------------------------------------------------
55 //------------------------------------------------------------------
56 /// Check if this memory address is marked writable to the process.
59 /// true if this memory address is marked writable
60 //------------------------------------------------------------------
63 //------------------------------------------------------------------
64 /// Check if this memory address is marked executable to the process.
67 /// true if this memory address is marked executable
68 //------------------------------------------------------------------
71 //------------------------------------------------------------------
72 /// Check if this memory address is mapped into the process address
76 /// true if this memory address is in the process address space.
77 //------------------------------------------------------------------
80 //------------------------------------------------------------------
81 /// Returns the name of the memory region mapped at the given
85 /// In case of memory mapped files it is the absolute path of
86 /// the file otherwise it is a name associated with the memory
87 /// region. If no name can be determined the returns nullptr.
88 //------------------------------------------------------------------
89 const char *GetName();
91 bool operator==(const lldb::SBMemoryRegionInfo &rhs) const;
93 bool operator!=(const lldb::SBMemoryRegionInfo &rhs) const;
95 bool GetDescription(lldb::SBStream &description);
98 friend class SBProcess;
99 friend class SBMemoryRegionInfoList;
101 lldb_private::MemoryRegionInfo &ref();
103 const lldb_private::MemoryRegionInfo &ref() const;
105 SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr);
107 lldb::MemoryRegionInfoUP m_opaque_ap;
112 #endif // LLDB_SBMemoryRegionInfo_h_