[fpc-pascal] Arrays in debugger; No range errors on arrays

Jonas Maebe jonas at zeus.ugent.be
Tue May 24 14:31:03 CEST 2005

On 24 mei 2005, at 13:58, Lance Boyle wrote:

> As I've indicated in some of the comments, there appears to be some 
> range checking issues--is range checking off by default?

Yes, it is. Add {$r+} at the top of your source to turn it on, or add 
"-Cr" to the command line options of the compiler.

> A second issue is that arrays that begin with any index other than 0 
> seem to be displayed incorrectly in the debugger window of Xcode.

That's a problem of gdb not properly supporting Pascal arrays, which 
indeed can start at an index <> 0. There is a set of patches to create 
gdbpas, which may have this fixed, but I haven't built it for Mac OS X 
yet (also, you'd probably have to overwrite the system's gdb with this 
gdbpas for XCode to use it).


More information about the fpc-pascal mailing list