1 //===-- SBMemoryRegionInfo.h ------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SBMemoryRegionInfo_h_
10 #define LLDB_SBMemoryRegionInfo_h_
12 #include "lldb/API/SBData.h"
13 #include "lldb/API/SBDefines.h"
17 class LLDB_API SBMemoryRegionInfo {
21 SBMemoryRegionInfo(const lldb::SBMemoryRegionInfo &rhs);
23 ~SBMemoryRegionInfo();
25 const lldb::SBMemoryRegionInfo &
26 operator=(const lldb::SBMemoryRegionInfo &rhs);
30 /// Get the base address of this memory range.
33 /// The base address of this memory range.
34 lldb::addr_t GetRegionBase();
36 /// Get the end address of this memory range.
39 /// The base address of this memory range.
40 lldb::addr_t GetRegionEnd();
42 /// Check if this memory address is marked readable to the process.
45 /// true if this memory address is marked readable
48 /// Check if this memory address is marked writable to the process.
51 /// true if this memory address is marked writable
54 /// Check if this memory address is marked executable to the process.
57 /// true if this memory address is marked executable
60 /// Check if this memory address is mapped into the process address
64 /// true if this memory address is in the process address space.
67 /// Returns the name of the memory region mapped at the given
71 /// In case of memory mapped files it is the absolute path of
72 /// the file otherwise it is a name associated with the memory
73 /// region. If no name can be determined the returns nullptr.
74 const char *GetName();
76 bool operator==(const lldb::SBMemoryRegionInfo &rhs) const;
78 bool operator!=(const lldb::SBMemoryRegionInfo &rhs) const;
80 bool GetDescription(lldb::SBStream &description);
83 friend class SBProcess;
84 friend class SBMemoryRegionInfoList;
86 lldb_private::MemoryRegionInfo &ref();
88 const lldb_private::MemoryRegionInfo &ref() const;
91 SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr);
93 lldb::MemoryRegionInfoUP m_opaque_up;
98 #endif // LLDB_SBMemoryRegionInfo_h_