|
|
|||
File indexing completed on 2026-05-10 08:42:42
0001 //===-- SBMemoryRegionInfo.h ------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLDB_API_SBMEMORYREGIONINFO_H 0010 #define LLDB_API_SBMEMORYREGIONINFO_H 0011 0012 #include "lldb/API/SBData.h" 0013 #include "lldb/API/SBDefines.h" 0014 0015 namespace lldb { 0016 0017 class LLDB_API SBMemoryRegionInfo { 0018 public: 0019 SBMemoryRegionInfo(); 0020 0021 SBMemoryRegionInfo(const lldb::SBMemoryRegionInfo &rhs); 0022 0023 SBMemoryRegionInfo(const char *name, lldb::addr_t begin, lldb::addr_t end, 0024 uint32_t permissions, bool mapped, 0025 bool stack_memory = false); 0026 0027 ~SBMemoryRegionInfo(); 0028 0029 const lldb::SBMemoryRegionInfo & 0030 operator=(const lldb::SBMemoryRegionInfo &rhs); 0031 0032 void Clear(); 0033 0034 /// Get the base address of this memory range. 0035 /// 0036 /// \return 0037 /// The base address of this memory range. 0038 lldb::addr_t GetRegionBase(); 0039 0040 /// Get the end address of this memory range. 0041 /// 0042 /// \return 0043 /// The base address of this memory range. 0044 lldb::addr_t GetRegionEnd(); 0045 0046 /// Check if this memory address is marked readable to the process. 0047 /// 0048 /// \return 0049 /// true if this memory address is marked readable 0050 bool IsReadable(); 0051 0052 /// Check if this memory address is marked writable to the process. 0053 /// 0054 /// \return 0055 /// true if this memory address is marked writable 0056 bool IsWritable(); 0057 0058 /// Check if this memory address is marked executable to the process. 0059 /// 0060 /// \return 0061 /// true if this memory address is marked executable 0062 bool IsExecutable(); 0063 0064 /// Check if this memory address is mapped into the process address 0065 /// space. 0066 /// 0067 /// \return 0068 /// true if this memory address is in the process address space. 0069 bool IsMapped(); 0070 0071 /// Returns the name of the memory region mapped at the given 0072 /// address. 0073 /// 0074 /// \return 0075 /// In case of memory mapped files it is the absolute path of 0076 /// the file otherwise it is a name associated with the memory 0077 /// region. If no name can be determined the returns nullptr. 0078 const char *GetName(); 0079 0080 /// Returns whether this memory region has a list of memory pages 0081 /// that have been modified -- that are dirty. 0082 /// 0083 /// \return 0084 /// True if the dirty page list is available. 0085 bool HasDirtyMemoryPageList(); 0086 0087 /// Returns the number of modified pages -- dirty pages -- in this 0088 /// memory region. 0089 /// 0090 /// \return 0091 /// The number of dirty page entries will be returned. If 0092 /// there are no dirty pages in this memory region, 0 will 0093 /// be returned. 0 will also be returned if the dirty page 0094 /// list is not available for this memory region -- you must 0095 /// use HasDirtyMemoryPageList() to check for that. 0096 uint32_t GetNumDirtyPages(); 0097 0098 /// Returns the address of a memory page that has been modified in 0099 /// this region. 0100 /// 0101 /// \return 0102 /// Returns the address for his dirty page in the list. 0103 /// If this memory region does not have a dirty page list, 0104 /// LLDB_INVALID_ADDRESS is returned. 0105 addr_t GetDirtyPageAddressAtIndex(uint32_t idx); 0106 0107 /// Returns the size of a memory page in this region. 0108 /// 0109 /// \return 0110 /// Returns the size of the memory pages in this region, 0111 /// or 0 if this information is unavailable. 0112 int GetPageSize(); 0113 0114 bool operator==(const lldb::SBMemoryRegionInfo &rhs) const; 0115 0116 bool operator!=(const lldb::SBMemoryRegionInfo &rhs) const; 0117 0118 bool GetDescription(lldb::SBStream &description); 0119 0120 private: 0121 friend class SBProcess; 0122 friend class SBMemoryRegionInfoList; 0123 friend class SBSaveCoreOptions; 0124 friend class lldb_private::ScriptInterpreter; 0125 0126 lldb_private::MemoryRegionInfo &ref(); 0127 0128 const lldb_private::MemoryRegionInfo &ref() const; 0129 0130 // Unused. 0131 SBMemoryRegionInfo(const lldb_private::MemoryRegionInfo *lldb_object_ptr); 0132 0133 lldb::MemoryRegionInfoUP m_opaque_up; 0134 }; 0135 0136 } // namespace lldb 0137 0138 #endif // LLDB_API_SBMEMORYREGIONINFO_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|