Skip to content

add C utility for debugging symbol tables, under #if 0 #109390

Closed
@carljm

Description

@carljm

In flowgraph.c we have some C functions for dumping instructions and basicblocks as text. These are under #if 0 by default, so effectively comments, but they can be very useful to uncomment and use when debugging a tricky compiler issue.

I recently had to debug a symbol table problem, and I wrote a similar function to (recursively) dump a symbol table and its children to a text representation. I propose that we also include this in the source tree, under #if 0 just like the compiler equivalent, to save time for future debuggers.

The Python symtable module does not fill this need, since you can't use it if the symbol table bug is preventing compilation from even completing.

cc @JelleZijlstra

Linked PRs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions