diff --git a/debugger/cmdlinedebugger.pp b/debugger/cmdlinedebugger.pp index 35a38905bc..e9e105128d 100644 --- a/debugger/cmdlinedebugger.pp +++ b/debugger/cmdlinedebugger.pp @@ -54,7 +54,7 @@ type FFlushAfterRead: Boolean;// Set if we should flush after finished reading FPeekOffset: Integer; // Count the number of lines we have peeked FReadLineTimedOut: Boolean; - function WaitForHandles(const AHandles: array of Integer; var ATimeOut: Integer): Integer; overload; + function WaitForHandles(const AHandles: array of Integer; var ATimeOut: Int64): Integer; overload; function WaitForHandles(const AHandles: array of Integer): Integer; overload; protected procedure DoReadError; virtual; @@ -64,8 +64,8 @@ type function CreateDebugProcess(const AOptions: String): Boolean; virtual; procedure Flush; // Flushes output buffer function GetWaiting: Boolean; override; - function ReadLine(ATimeOut: Integer = -1): String; overload; - function ReadLine(const APeek: Boolean; ATimeOut: Integer = -1): String; virtual; overload; + function ReadLine(ATimeOut: Int64 = -1): String; overload; + function ReadLine(const APeek: Boolean; ATimeOut: Int64 = -1): String; virtual; overload; procedure SendCmdLn(const ACommand: String); virtual; overload; procedure SendCmdLn(const ACommand: String; Values: array of const); overload; procedure SetLineEnds(ALineEnds: TStringDynArray); @@ -103,14 +103,14 @@ uses TimeOut: Max Time in milli-secs => set to 0 if timeout occured Returns: BitArray of handles set, 0 when an error occoured ------------------------------------------------------------------------------} -function TCmdLineDebugger.WaitForHandles(const AHandles: array of Integer; var ATimeOut: Integer): Integer; +function TCmdLineDebugger.WaitForHandles(const AHandles: array of Integer; var ATimeOut: Int64): Integer; {$IFDEF UNIX} var n, R, Max, Count: Integer; TimeOut: Integer; FDSWait, FDS: TFDSet; Step: Integer; - t, t2, t3: DWord; + t, t2, t3: Int64; begin Result := 0; Max := 0; @@ -268,7 +268,7 @@ end; function TCmdLineDebugger.WaitForHandles(const AHandles: array of Integer): Integer; overload; var - t: Integer; + t: Int64; begin t := -1; Result := WaitForHandles(AHandles, t); @@ -355,12 +355,12 @@ begin Result := FReading; end; -function TCmdLineDebugger.ReadLine(ATimeOut: Integer = -1): String; +function TCmdLineDebugger.ReadLine(ATimeOut: Int64 = -1): String; begin Result := ReadLine(False, ATimeOut); end; -function TCmdLineDebugger.ReadLine(const APeek: Boolean; ATimeOut: Integer = -1): String; +function TCmdLineDebugger.ReadLine(const APeek: Boolean; ATimeOut: Int64 = -1): String; function ReadData(const AStream: TStream; var ABuffer: String): Integer; var diff --git a/debugger/gdbmidebugger.pp b/debugger/gdbmidebugger.pp index b498557a12..093b194bc1 100644 --- a/debugger/gdbmidebugger.pp +++ b/debugger/gdbmidebugger.pp @@ -224,24 +224,24 @@ type // ExecuteCommand does execute direct. It does not use the queue function ExecuteCommand(const ACommand: String; AFlags: TGDBMICommandFlags = []; - ATimeOut: Integer = -1 + ATimeOut: Int64 = -1 ): Boolean; overload; function ExecuteCommand(const ACommand: String; out AResult: TGDBMIExecResult; AFlags: TGDBMICommandFlags = []; - ATimeOut: Integer = -1 + ATimeOut: Int64 = -1 ): Boolean; overload; function ExecuteCommand(const ACommand: String; const AValues: array of const; AFlags: TGDBMICommandFlags; - ATimeOut: Integer = -1 + ATimeOut: Int64 = -1 ): Boolean; overload; function ExecuteCommand(const ACommand: String; const AValues: array of const; out AResult: TGDBMIExecResult; AFlags: TGDBMICommandFlags = []; - ATimeOut: Integer = -1 + ATimeOut: Int64 = -1 ): Boolean; overload; procedure DoTimeoutFeedback; - function ProcessResult(var AResult: TGDBMIExecResult; ATimeOut: Integer = -1): Boolean; + function ProcessResult(var AResult: TGDBMIExecResult; ATimeOut: Int64 = -1): Boolean; function ProcessGDBResultText(S: String): String; function GetStackDepth(MaxDepth: integer): Integer; function FindStackFrame(FP: TDBGPtr; StartAt, MaxDepth: Integer): Integer; @@ -9651,7 +9651,7 @@ begin end; function TGDBMIDebuggerCommand.ExecuteCommand(const ACommand: String; - AFlags: TGDBMICommandFlags = []; ATimeOut: Integer = -1): Boolean; + AFlags: TGDBMICommandFlags = []; ATimeOut: Int64 = -1): Boolean; var R: TGDBMIExecResult; begin @@ -9660,7 +9660,7 @@ end; function TGDBMIDebuggerCommand.ExecuteCommand(const ACommand: String; out AResult: TGDBMIExecResult; AFlags: TGDBMICommandFlags = []; - ATimeOut: Integer = -1): Boolean; + ATimeOut: Int64 = -1): Boolean; function RevorerTimeOut: Boolean; var @@ -9769,7 +9769,7 @@ end; function TGDBMIDebuggerCommand.ExecuteCommand(const ACommand: String; const AValues: array of const; AFlags: TGDBMICommandFlags; - ATimeOut: Integer = -1): Boolean; + ATimeOut: Int64 = -1): Boolean; var R: TGDBMIExecResult; begin @@ -9778,7 +9778,7 @@ end; function TGDBMIDebuggerCommand.ExecuteCommand(const ACommand: String; const AValues: array of const; out AResult: TGDBMIExecResult; - AFlags: TGDBMICommandFlags = []; ATimeOut: Integer = -1): Boolean; + AFlags: TGDBMICommandFlags = []; ATimeOut: Int64 = -1): Boolean; begin Result := ExecuteCommand(Format(ACommand, AValues), AResult, AFlags, ATimeOut); end; @@ -9790,7 +9790,7 @@ begin mtWarning, [mbOK], 0); end; -function TGDBMIDebuggerCommand.ProcessResult(var AResult: TGDBMIExecResult;ATimeOut: Integer = -1): Boolean; +function TGDBMIDebuggerCommand.ProcessResult(var AResult: TGDBMIExecResult;ATimeOut: Int64 = -1): Boolean; var InLogWarning: Boolean; diff --git a/debugger/test/Gdbmi/testdisass.pas b/debugger/test/Gdbmi/testdisass.pas index 1f9d667ada..eba8939c63 100644 --- a/debugger/test/Gdbmi/testdisass.pas +++ b/debugger/test/Gdbmi/testdisass.pas @@ -24,7 +24,7 @@ type protected FTestCmdLine: String; procedure SendCmdLn(const ACommand: String); override; overload; - function ReadLine(const APeek: Boolean; ATimeOut: Integer = - 1): String; override; overload; + function ReadLine(const APeek: Boolean; ATimeOut: Int64 = - 1): String; override; overload; function CreateDebugProcess(const AOptions: String): Boolean; override; function GetDebugProcessRunning: Boolean; override; protected @@ -67,7 +67,7 @@ begin FTestCmdLine := ACommand; end; -function TTestBrkGDBMIDebugger.ReadLine(const APeek: Boolean; ATimeOut: Integer): String; +function TTestBrkGDBMIDebugger.ReadLine(const APeek: Boolean; ATimeOut: Int64): String; procedure SkipSpaces(var pos: Integer); begin while (pos <= length(FTestCmdLine)) and (FTestCmdLine[pos] = ' ') do inc(pos);