From 6bfe8c88b6abc51c2ab34738f9976bdd5b01d2a4 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 4 Nov 2010 13:49:15 +0100
Subject: [PATCH] debugger: Fix memory cache cleanup for trk adapters.

Reviewed-by: Friedemann Kleint
Reviewed-by: Pawel Polanski
---
 src/plugins/debugger/gdb/symbian.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/debugger/gdb/symbian.cpp b/src/plugins/debugger/gdb/symbian.cpp
index 636c83da85e..3c7555e0a00 100644
--- a/src/plugins/debugger/gdb/symbian.cpp
+++ b/src/plugins/debugger/gdb/symbian.cpp
@@ -203,9 +203,10 @@ Snapshot::Snapshot()
 
 void Snapshot::reset()
 {
-    for (Memory::Iterator it = memory.begin(); it != memory.end(); ++it) {
+    for (Memory::Iterator it = memory.begin(); it != memory.end(); ) {
         if (isReadOnly(it.key())) {
             MEMORY_DEBUG("KEEPING READ-ONLY RANGE" << it.key());
+            ++it;
         } else {
             it = memory.erase(it);
         }
-- 
GitLab