Ada: Enhance debugging with entity chain print routines and consistency checks
Improves Ada debugging by adding routines to print entity chains and check their consistency, aiding in compiler development.
This commit introduces new debugging routines, pech and rpech, to print entity chains in the Ada compiler, along with a simple consistency check. These routines help developers understand the structure and relationships between entities in the compiler’s internal representation. The consistency check detects errors in the chain’s links, improving the reliability of debugging efforts.
In Details
Entity chains are fundamental data structures in the Ada compiler, representing relationships between various program entities. The new pech and rpech routines in treepr.ads and treepr.adb provide a way to dump these chains for debugging purposes. The added consistency check verifies that Prev (Next (E)) == E, ensuring the integrity of the chain's links and aiding in the diagnosis of compiler issues.
For Context
Debugging complex software like a compiler requires tools to inspect the internal data structures and relationships. This commit adds new debugging routines to the Ada compiler that allow developers to print out the relationships between different entities within the compiler's internal representation. A consistency check is also added to ensure these relationships are valid, enabling more effective debugging and maintenance of the compiler.