diff --git a/debugger/test/Gdbmi/rungdbmiform.pas b/debugger/test/Gdbmi/rungdbmiform.pas index 3666226b84..ae9d8e42c4 100644 --- a/debugger/test/Gdbmi/rungdbmiform.pas +++ b/debugger/test/Gdbmi/rungdbmiform.pas @@ -75,7 +75,14 @@ var begin FTesting := False; Form1.Memo2.Lines.Add('***** '+ Parent.TestName + ' ' + Parent.Parent.TestName); - TestCompile(AppDir + 'WatchesPrg.pas', TestExeName); + + try + TestCompile(Form1.edPasFile.Text, TestExeName); + except + on e: Exception do + Form1.Memo2.Lines.Add('Compile error: ' + e.Message); + end; + try dbg := TGDBMIDebugger.Create(DebuggerInfo.ExeName); diff --git a/debugger/test/Gdbmi/testbase.pas b/debugger/test/Gdbmi/testbase.pas index 7b52a8be05..46b805c0d0 100644 --- a/debugger/test/Gdbmi/testbase.pas +++ b/debugger/test/Gdbmi/testbase.pas @@ -12,23 +12,23 @@ uses fpclist.txt contains lines of format: [Name] exe=/path/fpc.exe - symbols=gs,gw,gwset,gw3 + symbols=none,gs,gw,gwset,gw3 gdblist.txt contains lines of format: [Name] exe=/path/fpc.exe - symbols=gs,gw,gwset,gw3 + symbols=none,gs,gw,gwset,gw3 *) type - TSymbolType = (stStabs, stDwarf, stDwarfSet, stDwarf3); + TSymbolType = (stNone, stStabs, stDwarf, stDwarfSet, stDwarf3); TSymbolTypes = set of TSymbolType; const - SymbolTypeNames: Array [TSymbolType] of String = ('Stabs', 'Dwarf', 'Dwarf+Sets', 'Dwarf3'); - SymbolTypeSwitches: Array [TSymbolType] of String = ('-gs', '-gw', '-gw -godwarfsets', '-gw3'); + SymbolTypeNames: Array [TSymbolType] of String = ('No_Dbg', 'Stabs', 'Dwarf', 'Dwarf+Sets', 'Dwarf3'); + SymbolTypeSwitches: Array [TSymbolType] of String = ('', '-gs', '-gw', '-gw -godwarfsets', '-gw3'); type @@ -206,6 +206,7 @@ begin s2 := s2 + s[1]; delete(s,1, 1); end; + if s2 = 'none' then Result := Result + [stNone]; if s2 = 'gs' then Result := Result + [stStabs]; if s2 = 'gw' then Result := Result + [stDwarf]; if s2 = 'gwset' then Result := Result + [stDwarfSet]; @@ -499,8 +500,10 @@ begin raise EAssertionFailedError.Create('Found existing file before compiling: ' + ExeName); FCompiledList.Add(ExeName); ErrMsg := CompileHelpers.TestCompile(PrgName, FSymbolSwitch + ' ' + FCompilerInfo.ExtraOpts, ExeName, CompilerInfo.ExeName); - if ErrMsg <> '' then + if ErrMsg <> '' then begin + debugln(ErrMsg); raise EAssertionFailedError.Create('Compilation Failed: ' + ExeName + LineEnding + ErrMsg); + end; end; if not FileExists(ExeName) then diff --git a/debugger/test/Gdbmi/testwatches.pas b/debugger/test/Gdbmi/testwatches.pas index 9e29e67ef3..47d5aa4757 100644 --- a/debugger/test/Gdbmi/testwatches.pas +++ b/debugger/test/Gdbmi/testwatches.pas @@ -547,7 +547,11 @@ var i: Integer; WList: Array of TTestWatch; begin - TestCompile(AppDir + 'WatchesPrg.pas', TestExeName); + try + TestCompile(AppDir + 'WatchesPrg.pas', TestExeName); + except + on e: Exception do Fail('Compile error: ' + e.Message); + end; try FWatches := TBaseWatches.Create(TBaseWatch);