mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 11:39:23 +02:00
FpDebug: fix cache when cross debugging a 64bit target from a 32bit IDE. (affects FpLldb)
git-svn-id: trunk@60085 -
This commit is contained in:
parent
ea6abfeb17
commit
9a9d87e661
@ -16,6 +16,7 @@ type
|
|||||||
datatype pointing to data on the target
|
datatype pointing to data on the target
|
||||||
*)
|
*)
|
||||||
TDBGPtr = type QWord;
|
TDBGPtr = type QWord;
|
||||||
|
PDBGPtr = ^TDBGPtr;
|
||||||
TDBGPtrArray = Array of TDBGPtr;
|
TDBGPtrArray = Array of TDBGPtr;
|
||||||
|
|
||||||
(* TDbgSymbolKind
|
(* TDbgSymbolKind
|
||||||
|
@ -682,12 +682,12 @@ begin
|
|||||||
else Result := 0;
|
else Result := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CompareKey(Item1, Item2: Pointer): Integer;
|
function CompareKey(Key, Item2: Pointer): Integer;
|
||||||
begin
|
begin
|
||||||
If {%H-}TDBGPtr(Item1) > TFpDbgMemCacheSimple(Item2).CacheAddress
|
If PDBGPtr(Key)^ > TFpDbgMemCacheSimple(Item2).CacheAddress
|
||||||
then Result := 1
|
then Result := 1
|
||||||
else
|
else
|
||||||
If {%H-}TDBGPtr(Item1) < TFpDbgMemCacheSimple(Item2).CacheAddress
|
If PDBGPtr(Key)^ < TFpDbgMemCacheSimple(Item2).CacheAddress
|
||||||
then Result := -1
|
then Result := -1
|
||||||
else Result := 0;
|
else Result := 0;
|
||||||
end;
|
end;
|
||||||
@ -710,7 +710,7 @@ var
|
|||||||
Node: TAVLTreeNode;
|
Node: TAVLTreeNode;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Node := FCaches.FindNearestKey({%H-}Pointer(AnAddress), @CompareKey);
|
Node := FCaches.FindNearestKey(@AnAddress, @CompareKey);
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ function TFpDbgMemCacheManagerSimple.ReadMemory(AnAddress: TDbgPtr;
|
|||||||
var
|
var
|
||||||
Node: TAVLTreeNode;
|
Node: TAVLTreeNode;
|
||||||
begin
|
begin
|
||||||
Node := FCaches.FindNearestKey({%H-}Pointer(AnAddress), @CompareKey);
|
Node := FCaches.FindNearestKey(@AnAddress, @CompareKey);
|
||||||
if Node = nil then
|
if Node = nil then
|
||||||
exit(inherited ReadMemory(AnAddress, ASize, ADest));
|
exit(inherited ReadMemory(AnAddress, ASize, ADest));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user