[lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 02:06:52 PDT 2024
================
@@ -132,6 +140,92 @@ class MinidumpFile : public Binary {
size_t Stride;
};
+ /// Class the provides an iterator over the memory64 memory ranges. Only the
+ /// the first descriptor is validated as readable beforehand.
+ class Memory64Iterator {
+ public:
+ static Memory64Iterator
+ begin(ArrayRef<uint8_t> Storage,
+ ArrayRef<minidump::MemoryDescriptor_64> Descriptors) {
+ return Memory64Iterator(Storage, Descriptors);
+ }
+
+ static Memory64Iterator end() { return Memory64Iterator(); }
+
+ bool operator==(const Memory64Iterator &R) const {
+ return IsEnd == R.IsEnd;
+ }
+
+ bool operator!=(const Memory64Iterator &R) const { return !(*this == R); }
+
+ const std::pair<minidump::MemoryDescriptor_64, ArrayRef<uint8_t>> &
+ operator*() {
+ return Current;
+ }
+
+ const std::pair<minidump::MemoryDescriptor_64, ArrayRef<uint8_t>> *
+ operator->() {
+ return &Current;
+ }
+
+ Error inc() {
+ if (Storage.size() == 0 || Descriptors.size() == 0) {
----------------
labath wrote:
Github says this has been applied, but I don't see that in the code. Did you maybe forget to upload of force-overwrite something by mistake?
https://github.com/llvm/llvm-project/pull/101272
More information about the llvm-commits
mailing list