[Feature] XML node dump
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
This feature has been discussed a little bit in the fpc-devel message board. If you build the compiler with the define "DEBUG_NODE_DUMP", all source files compiled with it will have their intermediate nodes dumped to an XML file (which have .ppx extensions) - this feature is useful for compiler debugging and development, as being formatted into an XML file, trees can be expanded and collapsed at will with an appropriate viewer, making the nodes easier to navigate and analyse.
Steps to reproduce:
Apply patch and confirm correct compilation with 'make clean all', 'make clean all FPCOPT="-dDEBUG_NODE_DUMP"', 'make fullcycle' and 'make fullcycle FPCOPT="-dDEBUG_NODE_DUMP"'
Additional information:
Currently the node dump files only contain the nodes for procedures and functions - things like class declarations and global variables are not yet dumped. Nevertheless, this is a feature in progress and any extensions to it will be greatly appreciated.
The outputting of asm blocks is currently only supported on the x86 family. Other platforms will print the node, but its contents will just be a note saying the feature is not yet supported.