Re: [fpc-devel] What's the best way to debug the fpc compiler?

2017-12-28 Thread Sven Barth via fpc-devel
Am 28.12.2017 11:30 schrieb "Giuliano Colla" :

Hi fpc developers,

I'm playing a bit with the compiler. In order to debug my changes I need to
compile some test programs.

To stay on the safe side, currently when I modify something I rebuild
everything (make all - make install) in order to provide a consistent
compilation environment.

This is rather time consuming and I do compile a lot of unnecessary stuff.
Is there a better way?

Any suggestion is welcome


As long as you don't have static changes (e.g. what is written to PPUs)
it's sufficient to build the correct compiler using the Lazarus project
(e.g. ppcx64.lpi he the x86_64 compiler) and set the run parameters
accordingly (I for example use "-n -Furtl/units/x86_64-linux -viwn -
FEtestoutput ./fpctests/whatever.pp" with the current directory set to the
FPC  directory). With that it is enough to have done a single "make all"
beforehand. Depending on the required units for the test I also sometimes
rebuild only the RTL.
When I'm satisfied with my changes I do a complete rebuild and run the
testsuite to compare the resulting list of failures to the one without my
changes.
A "make install" I do only when I need to use the compiler in Lazarus for a
different project, for everything else I simply add the unit directories of
the needed packages to the run parameters.

I hope this helps you :)

Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] What's the best way to debug the fpc compiler?

2017-12-28 Thread Giuliano Colla

Hi fpc developers,

I'm playing a bit with the compiler. In order to debug my changes I need 
to compile some test programs.


To stay on the safe side, currently when I modify something I rebuild 
everything (make all - make install) in order to provide a consistent 
compilation environment.


This is rather time consuming and I do compile a lot of unnecessary 
stuff. Is there a better way?


Any suggestion is welcome

Giuliano


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel