From 58f6f5bd1f5f8a3e78aa95e8edad8fe0a25b3f79 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 8 Mar 2024 15:51:28 +0800 Subject: [PATCH] Avoid excessive function updates when stepping through code --- core/processview.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/processview.cpp b/core/processview.cpp index 2a4ded1..e49a97f 100644 --- a/core/processview.cpp +++ b/core/processview.cpp @@ -162,8 +162,16 @@ size_t DebugProcessView::PerformWrite(uint64_t offset, const void* data, size_t void DebugProcessView::MarkDirty() { // This hack will let the views (linear/graph) update its display - uint64_t end = m_aggressiveAnalysisUpdate ? GetLength() : 1; - BinaryView::NotifyDataWritten(0, end); + if (m_aggressiveAnalysisUpdate) + { + BinaryView::NotifyDataWritten(0, GetLength()); + } + else + { + // This ensures or the BinaryDataListener, e.g, the linear view, refreshes its display. But it avoids any + // functions get marked as update required + BinaryView::NotifyDataWritten(0xdeadbeefdeadbeef, 0); + } }