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 -
This commit is contained in:
martin 2018-12-04 22:20:16 +00:00
parent bba050e333
commit f9abff2df4

View File

@ -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;