diff --git a/debugger/debugger.pp b/debugger/debugger.pp index 0bb5ca7d71..207f5f386d 100644 --- a/debugger/debugger.pp +++ b/debugger/debugger.pp @@ -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; diff --git a/debugger/gdbmidebugger.pp b/debugger/gdbmidebugger.pp index c5e0628ff8..c94cad3df3 100644 --- a/debugger/gdbmidebugger.pp +++ b/debugger/gdbmidebugger.pp @@ -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;