From f9abff2df473a3a951a5fe3ce961705ea7d9a15e Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 4 Dec 2018 22:20:16 +0000 Subject: [PATCH] FpDebug (incl lldb/gdb): Fix crash due to wrong cache removed from list. List could have 2 caches with same address, if a smaller cache was replaced by a bigger. Remove could destroy one and remove the other git-svn-id: trunk@59728 - --- components/fpdebug/fpdmemorytools.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/fpdebug/fpdmemorytools.pas b/components/fpdebug/fpdmemorytools.pas index 62ff369b41..4474ecc15e 100644 --- a/components/fpdebug/fpdmemorytools.pas +++ b/components/fpdebug/fpdmemorytools.pas @@ -245,7 +245,7 @@ type * TODO: allow to pre-read and cache Target mem (e.g. before reading all fields of a record *) TFpDbgMemLocationType = ( - mlfUninitialized := 0, // like invalid, but not known // 0 means objet fields will start wint this + mlfUninitialized := 0, // like invalid, but not known // This (0) is the initial value mlfInvalid, mlfTargetMem, // an address in the target (debuggee) process mlfSelfMem, // an address in this(the debuggers) process memory; the data is in TARGET format (endian, ...) @@ -747,7 +747,7 @@ begin if ACache = nil then exit; - FCaches.Remove(ACache); + FCaches.RemovePointer(ACache); ACache.Free; end;