GCC already has `-fdump-go-spec=`/`-fdump-ada-spec` options to write Go/Ada bindings for C/C++. `-fdump-ada-spec` is implemented in `c-family`, so in the FEs; `-fdump-go-spec` is in the middle-end code, hooking into debug_hooks.