[fpc-devel]Bunch'o questions for the new year

Marco van de Voort marcov at stack.nl
Thu Jan 1 14:39:52 CET 2004


> First, Happy New Year!
> 
> I've started investigating FPC support for GLScene (http://glscene.org),
> and have encountered a few issues:
> 
> 1)are there any instruction on building FreePascal? I've got the CVS sources,
>    tried several makefiles and .bat, browsed the READMEs, but couldn't get
>    a compile to complete (this is under Win32, using the 1.9.0 release).

http://www.stack.nl/~marcov/buildfaq.pdf
 
> 2)while compiling my units, I bumped on a compiler crash (now reported in
>    the bugs with a sample unit), then managed to somehow work around it,
>    but now the compilation fails with no errors. Ie. FPC's return value
>    indicates a failed compile, and the .exe is not generated, but no error
>    is listed. When compiling with '-va', nothing suspicious is listed and
>    the ld.exe stage is reached. Any hints on extra verbose options that
>    could shed more light?

That could mean that the error was in the linker. Don't forget that FPC
calls the linker, so the linkers errorcode propagates to fpc's.

Linker errors are usually displayed though.

> 3)while waiting for Lazarus, I've started work on an IDE expert for Delphi
>    7, which add FPC compile and options menu to the IDE. The compile side
>    is now more or less operationnal (incl. error hyperlinks), and I've
>    started investigating the debug side. Full debug support is quite
>    certainly out of reach (and IMO better left to Lazarus), however ASM
>    based debugging is possible (using the CPU view and Delphi's AttachTo
>    command).


>  What I'm after would be adding a few helper functions to convert pascal
>    file/line number to EXE offset and vice-versa. This would allow basic
>    breakpoint and trace support. Any suggestions on the most suitable
>    debug format for this purpose that FPC 1.9.0 would already generates?

I'm no expert on this, but  afaik FPC generates stabs debug format, like
gcc does. By simply compiling with -gl and -a you can see the debug info
in the generated assembler (.s) file.

>    Any links/docs on that format? (the expert is available from the
>    Utilities directory of GLScene CVS at sourceforge, if an FPC guru wants
>    to pick oversights and errors with how things are done/displayed...)

gcc docs, I don't know if there is documentation on FPC extensions/mappings.

> 4)the '-B' option is listed for Build support, but doesn't seem to rebuild
>    units if their code (file timestamp actually) hasn't changed. Is this a
>    misunderstanding from my part or a bug?

No idea. I never use that :_)

Note that -Ur could be the reason for this. -Ur compiled units are not
recompiled
 
> 5)do the snapshots include binaries, and if so, from which mirror should I
>    download? (tried a few links from the website, but all failed)

Yes, but there will be a formal beta again soon. This beta will use more
Delphi compatible register calling conventions, which might be important
for what you are doing, specially the debugging.

I use ftp://freepascal.stack.nl

> Other than that things went quite smoothly, I haven't compiled/run
> anything really complex yet, but the extra hints/warnings of FPC allowed
> to catch a few bugs Delphi had missed, which is always nice :)

:_)




More information about the fpc-devel mailing list