Re: [fpc-pascal] FreePascal Windows - Force files to write to disk
Am 21.02.2017 um 22:12 schrieb James Richters: Assign(BitFile,'BitSave.pax'); {$I-} ReWrite(BitFile); if ioresult <> 0 then writeln ('error opening pax file'); WriteLn(BitFile,XADJ:1:8); WriteLn(BitFile,YADJ:1:8); WriteLn(BitFile,ZADJ:1:8); WriteLn(BitFile,WADJ:1:8); WriteLn(BitFile,AADJ:1:8); WriteLn(BitFile,TADJ:1:8); WriteLn(BitFile,VADJ:1:8); WriteLn(BitFile,UADJ:1:8); WriteLn(BitFile,CurrentTool); WriteLn(Bitfile,P_Value[4]); writeln (bitfile, 'EOF'); if ioresult <> 0 then writeln ('error writing pax file'); Close(BitFile); if ioresult <> 0 then writeln ('error closing pax file'); {$I+} This writes something at the end of the file that does not come from a variable. Next time the error happens, you can check if that is present. Then your variables were overwritten in memory. Also it checks for errors. And I would disable antivirus or at least tell it to not scan this file. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FreePascal Windows - Force files to write to disk
Am 22.02.2017 um 21:27 schrieb James Richters: Here is the procedure that reads the file. Also you could always try to immediately read the file each time it has been modified. Append a log entry to some other file, telling that the pax file was modified and whether it was still correct. This would tell whether it happens when the file is written, or at some other time. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] lldb problems with Xcode 8.2.1
Hello all, I am experiencing some LLDB problems in macOS Sierra 10.12.3 with Xcode 8.2.1. Its running the LLVM compiler with FPC 2.6.4. I can no longer get breakpoints to function, they get skipped over. Also when pausing or catching an exception no local or global variables show up. My debug scheme for Xcode has the FPC compiler running these options: -ghlttt -O-1 -CRiot -gw2 -gl and the LLVM compiler debug scheme is running with no optimizations. The debug format is set to DWARF and symbols are not being stripped. When I tried running my program out of LLDB through terminal and try to set a breakpoint I get this: (lldb) b s start.pas:12 Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. This setup was working fine on macOS 10.12.1. There seems to be some talk about this on apple message boards and stack overflow but none of the leads have really gone anywhere. Any help would be greatly appreciated. Thanks, Jeremy signature.asc Description: Message signed with OpenPGP ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] lldb problems with Xcode 8.2.1
> On 23 Feb 2017, at 19:10, Jeremy Thompson wrote: > > I am experiencing some LLDB problems in macOS Sierra 10.12.3 with Xcode > 8.2.1. Its running the LLVM compiler with FPC 2.6.4. I can no longer get > breakpoints to function, they get skipped over. Short answer: update to FPC 3.0.2 and use its -godwarfcpp option. The long answer will have to wait till tonight. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal