What I want to do is 1. Parse C code to generate AST2. Modify the AST3. Compile the new AST without changing the .c source file.
Is there any tool I can use to do this? If not, is there any tool I can use to do modification on assembly code?
I looked at gcc-plugin, there is very little documentation on it, I can only figure out how to print information when the gcc is parsing the source code (e.g. variable types), but I don't know how I can modify them.