Debugger: Added type-cast to fix a range check issue. Issue #0017537,#0016318,#0016132 Based on patch by Juha Manninen in 0017537

git-svn-id: trunk@27554 -
This commit is contained in:
martin 2010-10-03 21:01:27 +00:00
parent 89bc817f68
commit 73fda95380
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,8 @@ uses
type
// datatype pointing to data on the target
TDBGPtr = type QWord;
// Signed datatype with size of TDBGPtr
TDBGPtrInt = type Int64;
TDBGLocationRec = record
Address: TDBGPtr;

View File

@ -1538,7 +1538,7 @@ end;
function DisasmSortCompare(AItem1, AItem2: Pointer): Integer;
begin
Result := PGDBMIDisasm(AItem1)^.Address - PGDBMIDisasm(AItem2)^.Address;
Result := TDBGPtrInt(PGDBMIDisasm(AItem1)^.Address) - TDBGPtrInt(PGDBMIDisasm(AItem2)^.Address);
end;
function TGDBMIDebugger.GDBDisassemble(AAddr: TDbgPtr; ABackward: Boolean; out ANextAddr: TDbgPtr; out ADump, AStatement, AFile: String; out ALine: Integer): Boolean;