Forum > General
free pascal questions
(1/1)
guest56745:
I have used C for ~6 years now and I have recently been evaluating the technical merits of Free Pascal for usage on small projects. There are some things I am still unable to find answers for. Mainly it involves what debugging and safety options the units shipped with the compiler have been compiled with as they are distributed in binary form with the compiler.
1) Are the units compiled with any debugging information?
2) Are the units compiled with any input/output, range, overflow, or stack checking code?
3) If the answer is no to these, then is it possible to recompile the units with these options turned on?
4) Are Free Pascal integer and floating point types always the same size for all supported platforms? The only exceptions I've seen suggesting otherwise is 'integer' and 'real'.
Thank you.
CM630:
1) Are the units compiled with any debugging information?
Yes
2) Are the units compiled with any input/output, range, overflow, or stack checking code?
Yes, if the following items are checked in the IDE main menu -> Project -> Project Options -> Compiler Options -> Debugging -> -Ci, -Cr, -Co, -St, -Cr, -Sa.
4) Are Free Pascal integer and floating point types always the same size for all supported platforms? The only exceptions I've seen suggesting otherwise is 'integer' and 'real'.
Check here: http://wiki.freepascal.org/Pascal_for_C_users
howardpc:
--- Quote from: ryuo on February 23, 2015, 06:04:35 pm ---Mainly it involves what debugging and safety options the units shipped with the compiler have been compiled with as they are distributed in binary form with the compiler.
1) Are the units compiled with any debugging information?
--- End quote ---
If we are talking about a release version of Lazarus, then the answer is Yes and No. The LCL units are compiled with debug information, so you can step through LCL code (as well as your own code, if you have enabled debugging information). However, the FreePascal .ppus for the RTL do not come with debug info (at least, not the ones packaged with Lazarus). So if you want to step through RTL code you would have to recompile FPC yourself with the appropriate options, and then set the IDE compiler paths to use your newly compiled (bulky) RTL units.
marcov:
Note that turning debugging on in the system or sysutils unit is very annoying in practice. You really don't want to trace into a routine for every operation on an automated type (like a string).
That's mostly only useful if you are really searching for bugs in those units.
Navigation
[0] Message Index