#97, create input file later

This commit is contained in:
Basile Burg 2016-11-29 06:42:09 +01:00
parent 7faa02568b
commit 68066eb576
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 5 additions and 4 deletions

View File

@ -1430,7 +1430,7 @@ begin
begin begin
if fDbgRunnable then if fDbgRunnable then
dlgOkInfo('Either the runnable is not compiled or it cannot be found' + dlgOkInfo('Either the runnable is not compiled or it cannot be found' +
LineEnding + 'Note that the runnable option "outputFolder" is not supported', LineEnding + 'Note that the runnable option "outputFolder" is not supported by this widget',
'GDB commander') 'GDB commander')
else else
dlgOkInfo('The project binary is missing, cannot debug', 'GDB commander'); dlgOkInfo('The project binary is missing, cannot debug', 'GDB commander');
@ -1440,9 +1440,6 @@ begin
fOutputName := fExe + '.inferiorout'; fOutputName := fExe + '.inferiorout';
fInputName := fExe + '.inferiorin'; fInputName := fExe + '.inferiorin';
FreeAndNil(fInput); FreeAndNil(fInput);
if fInputName.fileExists then
deletefile(fInputName);
fInput:= TFileStream.Create(fInputName, fmCreate or fmShareExclusive);
FreeAndNil(fOutput); FreeAndNil(fOutput);
// //
gdb := exeFullName('gdb'); gdb := exeFullName('gdb');
@ -1451,6 +1448,10 @@ begin
dlgOkInfo('Cannot debug, GDB is missing', 'GDB commander'); dlgOkInfo('Cannot debug, GDB is missing', 'GDB commander');
exit; exit;
end; end;
//
if fInputName.fileExists then
deletefile(fInputName);
fInput:= TFileStream.Create(fInputName, fmCreate or fmShareExclusive);
subjDebugStart(fSubj, self as ICEDebugger); subjDebugStart(fSubj, self as ICEDebugger);
// gdb process // gdb process
killGdb; killGdb;