Hi there i'm looking for a way to emit (dump) complete global and local symbol table entries for any given (C) program. For now, it would be satisfactory if this was properly handled for single-source-file programs. But what i would like to do basically is to store the entire information that would be needed in order to "interpret" a GIMPLE dump.
A HLL (high-level language) program would probably map into something like this by any compiler: record Program is record GlobalSymbolTable is // global symbol entries end record; list FunctionList is // a linked list of Function records as defined below end list; end record; record Function is record LocalSymbolTable is // local symbol entries end record; record StatementList is // list of low-GIMPLE-level statements end record; end record; What I can see now is that GlobalSymbolTable is not dumped at all and LocalSymbolTable entries are not dumped to full extent (e.g. no initializations). For example, struct cgraph_varpool_node does not carry all the required information, for global variables and maybe it wasn't designed for that either. Does the LTO branch try to achieve that the complete information for a "Program" can be sufficiently stored (in a file)? If this is already there, could anyone provide some pointers to the API? Thank you in advance. Kind regards Nikolaos Kavvadias