File indexing completed on 2026-05-10 08:42:53
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "lldb/Utility/RangeMap.h"
0010 #include "lldb/Utility/Status.h"
0011 #include "lldb/Utility/StreamString.h"
0012
0013 #include "llvm/ADT/AddressRanges.h"
0014
0015 #ifndef LLDB_TARGET_COREFILEMEMORYRANGES_H
0016 #define LLDB_TARGET_COREFILEMEMORYRANGES_H
0017
0018 namespace lldb_private {
0019
0020 struct CoreFileMemoryRange {
0021 llvm::AddressRange range;
0022 uint32_t lldb_permissions;
0023
0024 bool operator==(const CoreFileMemoryRange &rhs) const {
0025 return range == rhs.range && lldb_permissions == rhs.lldb_permissions;
0026 }
0027
0028 bool operator!=(const CoreFileMemoryRange &rhs) const {
0029 return !(*this == rhs);
0030 }
0031
0032 bool operator<(const CoreFileMemoryRange &rhs) const {
0033 if (range < rhs.range)
0034 return true;
0035 if (range == rhs.range)
0036 return lldb_permissions < rhs.lldb_permissions;
0037 return false;
0038 }
0039
0040 std::string Dump() const {
0041 lldb_private::StreamString stream;
0042 stream << "[";
0043 stream.PutHex64(range.start());
0044 stream << '-';
0045 stream.PutHex64(range.end());
0046 stream << ")";
0047 return stream.GetString().str();
0048 }
0049 };
0050
0051 class CoreFileMemoryRanges
0052 : public lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t,
0053 CoreFileMemoryRange> {
0054 public:
0055
0056
0057 Status FinalizeCoreFileSaveRanges();
0058 };
0059 }
0060
0061 #endif