From 68066eb576c483b66c1bbc8540b3cdb600a448af Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 29 Nov 2016 06:42:09 +0100 Subject: [PATCH] #97, create input file later --- src/ce_gdb.pas | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ce_gdb.pas b/src/ce_gdb.pas index 987d81d6..0ca21f3f 100644 --- a/src/ce_gdb.pas +++ b/src/ce_gdb.pas @@ -1430,7 +1430,7 @@ begin begin if fDbgRunnable then 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') else dlgOkInfo('The project binary is missing, cannot debug', 'GDB commander'); @@ -1440,9 +1440,6 @@ begin fOutputName := fExe + '.inferiorout'; fInputName := fExe + '.inferiorin'; FreeAndNil(fInput); - if fInputName.fileExists then - deletefile(fInputName); - fInput:= TFileStream.Create(fInputName, fmCreate or fmShareExclusive); FreeAndNil(fOutput); // gdb := exeFullName('gdb'); @@ -1451,6 +1448,10 @@ begin dlgOkInfo('Cannot debug, GDB is missing', 'GDB commander'); exit; end; + // + if fInputName.fileExists then + deletefile(fInputName); + fInput:= TFileStream.Create(fInputName, fmCreate or fmShareExclusive); subjDebugStart(fSubj, self as ICEDebugger); // gdb process killGdb;