* added message on failure

git-svn-id: trunk@8184 -
This commit is contained in:
marc 2005-11-18 00:14:46 +00:00
parent a8f56d92ef
commit d8ae91b726

View File

@ -86,7 +86,8 @@ begin
+ ' connection. See docs/RemoteDebugging.txt for details. The path' + ' connection. See docs/RemoteDebugging.txt for details. The path'
+ ' must contain the ssh client filename, the hostname with an optional' + ' must contain the ssh client filename, the hostname with an optional'
+ ' username and the filename of gdb on the remote computer.' + ' username and the filename of gdb on the remote computer.'
+ ' For example: "/usr/bin/ssh username@hostname gdb"'; + ' For example: "/usr/bin/ssh username@hostname gdb"'
+ ' or: "/usr/bin/setsid /usr/bin/ssh username@hostname gdb"';
end; end;
procedure TSSHGDBMINotePropertyEditor.PropMeasureHeight(const NewValue: ansistring; ACanvas: TCanvas; var AHeight: Integer); procedure TSSHGDBMINotePropertyEditor.PropMeasureHeight(const NewValue: ansistring; ACanvas: TCanvas; var AHeight: Integer);
@ -130,7 +131,7 @@ function TSSHGDBMIDebugger.ParseInitialization: Boolean;
then ALine := StripLN(ReadLine); then ALine := StripLN(ReadLine);
end; end;
var var
Line: String; Line, ExtraText: String;
begin begin
Result := False; Result := False;
@ -157,43 +158,33 @@ begin
end; end;
*) *)
(* ExtraText := '';
while Pos('password:', Line) > 0 do while CheckReadLine(Line) do
begin begin
if not InputQuery('Debugger', 'Enter ' + Line, S) // No prompt yet
then begin if ExtraText = ''
DebugProcess.Terminate(0); then ExtraText := Line
Exit; else ExtraText := ExtraText + ' ' + Line;
end;
// peek the line from here, we might have a prompt
Line := ReadLine(True);
if Pos('(gdb)', Line) > 0 then Break;
// something else, read the line
Line := ReadLine;
if MessageDlg('Debugger',
'Response: ' + LineEnding + Line + LineEnding + 'Continue ?',
mtConfirmation, [mbYes, mbNo], 0) <> mrYes
then begin
DebugProcess.Terminate(0);
Exit;
end;
// Check again if we got a prompt
Line := ReadLine(True);
if Pos('(gdb)', Line) > 0 then Break;
// Next attempt
Line := StripLN(ReadLine);
end; end;
*)
if (ExtraText <> '')
and (MessageDlg('Debugger',
'Response: ' + LineEnding + ExtraText + LineEnding + 'Continue ?',
mtConfirmation, [mbYes, mbNo], 0) <> mrYes)
then begin
// DebugProcess.Terminate(0);
Exit;
end;
if Pos('(gdb)', Line) > 0 if Pos('(gdb)', Line) > 0
then Result := inherited ParseInitialization then Result := inherited ParseInitialization
else begin else begin
// We got an unexpected result // We got an unexpected result
MessageDlg('Debugger', MessageDlg('Debugger',
'Unexpected result:' + LineEnding + Line + LineEnding + 'The debugger wil be terminated.', 'Unexpected result:' + LineEnding + Line + LineEnding + 'The debugger will terminate',
mtInformation, [mbOK], 0); mtInformation, [mbOK], 0);
DebugProcess.Terminate(0); Exit;
// DebugProcess.Terminate(0);
end; end;
end; end;