From c88757b3e7cfd281f9147d3928f4b506ba5dc396 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 3 Apr 2021 16:04:07 -0700 Subject: [PATCH] Debugger: Make memory tags longer. Need more space for better information. --- Core/Debugger/MemBlockInfo.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/Debugger/MemBlockInfo.cpp b/Core/Debugger/MemBlockInfo.cpp index 5fa8c70517..c9d40de1da 100644 --- a/Core/Debugger/MemBlockInfo.cpp +++ b/Core/Debugger/MemBlockInfo.cpp @@ -46,7 +46,7 @@ private: uint64_t ticks = 0; uint32_t pc = 0; bool allocated = false; - char tag[32]{}; + char tag[128]{}; Slab *prev = nullptr; Slab *next = nullptr; @@ -77,7 +77,7 @@ struct PendingNotifyMem { uint32_t size; uint64_t ticks; uint32_t pc; - char tag[32]; + char tag[128]; }; static constexpr size_t MAX_PENDING_NOTIFIES = 512; @@ -199,7 +199,7 @@ void MemSlabMap::DoState(PointerWrap &p) { } void MemSlabMap::Slab::DoState(PointerWrap &p) { - auto s = p.Section("MemSlabMapSlab", 1, 2); + auto s = p.Section("MemSlabMapSlab", 1, 3); if (!s) return; @@ -208,8 +208,12 @@ void MemSlabMap::Slab::DoState(PointerWrap &p) { Do(p, ticks); Do(p, pc); Do(p, allocated); - if (s >= 2) { + if (s >= 3) { Do(p, tag); + } else if (s >= 2) { + char shortTag[32]; + Do(p, shortTag); + memcpy(tag, shortTag, sizeof(shortTag)); } else { std::string stringTag; Do(p, stringTag);