Debugger: Changed commit 27554 #73fda95380 ( Issue #0017537,#0016318,#0016132 ). Order could be wrong if addresses had highest bit set (type-cast to negative, would make bigger addr appear smaller)

git-svn-id: trunk@27569 -
This commit is contained in:
martin 2010-10-04 11:20:59 +00:00
parent ba23bd2982
commit ea59a61dee
2 changed files with 7 additions and 3 deletions

View File

@ -42,8 +42,6 @@ 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,13 @@ end;
function DisasmSortCompare(AItem1, AItem2: Pointer): Integer;
begin
Result := TDBGPtrInt(PGDBMIDisasm(AItem1)^.Address) - TDBGPtrInt(PGDBMIDisasm(AItem2)^.Address);
if PGDBMIDisasm(AItem1)^.Address < PGDBMIDisasm(AItem2)^.Address then
Result := -1
else
if PGDBMIDisasm(AItem1)^.Address > PGDBMIDisasm(AItem2)^.Address then
Result := 1
else
Result := 0;
end;
function TGDBMIDebugger.GDBDisassemble(AAddr: TDbgPtr; ABackward: Boolean; out ANextAddr: TDbgPtr; out ADump, AStatement, AFile: String; out ALine: Integer): Boolean;