Community
Participate
Working Groups
Build Identifier: I20110613-1736 Single stepping through code that changes memory whilst looking at it in a traditional memory view shows the bytes as changing but does not highlight them as expected. This seems to be because handleSuspend is being called twice each time the step occurs and highlights the changes the first time but the second call overwrites the display removing the highlight. Reproducible: Always Steps to Reproduce: 1. create a project that changes memory 2. open a traditional memory view looking at the memory that will change 3. single step through the code
Created attachment 203046 [details] Patch that resolves the bug On my system this patch resolves the issue. The change is that now archiveDeltas is called on resume.
Comment on attachment 203046 [details] Patch that resolves the bug From 44d6cd7e2ea5233c1141bf45c7dc131dd6b5eef1 Mon Sep 17 00:00:00 2001 From: Phil Mason <pmason@broadcom.com> Date: Fri, 9 Sep 2011 14:44:57 +0100 Subject: [PATCH] Modified debug event handling so that historyCache is only updated on continue. --- .../cdt/debug/ui/memory/traditional/Rendering.java | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java index 3dfd908..c3dd8a9 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java @@ -570,6 +570,7 @@ public class Rendering extends Composite implements IDebugEventSetListener boolean isChangeOnly = false; boolean isSuspend = false; boolean isBreakpointHit = false; + boolean isContinue = false; for(int i = 0; i < events.length; i++) { @@ -583,6 +584,8 @@ public class Rendering extends Composite implements IDebugEventSetListener if(source.getDebugTarget() == getMemoryBlock() .getDebugTarget()) { + if ((detail & DebugEvent.RESUME) != 0) + isContinue = true; if((detail & DebugEvent.BREAKPOINT) != 0) isBreakpointHit = true; if(kind == DebugEvent.SUSPEND) @@ -599,6 +602,15 @@ public class Rendering extends Composite implements IDebugEventSetListener } } + if (isContinue) + Display.getDefault().asyncExec(new Runnable() + { + public void run() + { + archiveDeltas(); + } + }); + if(isSuspend) handleSuspend(isBreakpointHit); else if(isChangeOnly) @@ -614,7 +626,6 @@ public class Rendering extends Composite implements IDebugEventSetListener { public void run() { - archiveDeltas(); refresh(); } }); -- 1.7.6
(In reply to comment #2) Sorry, I thought I was editing the previous patch to replace it with an improved version. I'll add the new patch as an attachment and mark the old one as obsolete.
Created attachment 203065 [details] Improved patch that runs archiveDeltas asyncronously Old patch called archiveDeltas directly. Now it uses asyncExec as it should have done.