I'm currently working on a C project that interfaces heavily with other assembly code. We're having self-made visualizations of control blocks and structs that we're using and I'm locking for a process on how to automate this process.
Since we have a C struct equivalency for every assembly control block and we're programming for a pretty rare architecture, the easiest way would probably to visualize the C structs.
I'm more or less looking for a way to automatically obtain graphs like the "TCP pseudo-header for checksum computation (IPv6)" from the TCP wiki page:
TCP pseudo-header for checksum computation (IPv6)
Sadly, I haven't found any open-source tools that are able to generate such visualizations from C header files. Is there a way to generate such images or html representations without manually writing them?
EDIT: Thanks to Alexey Frunze for the idea, with the utility pahole it's possible to extract the real memory layout of all used structs from the DWARF sections of an object file.
One of the ways to do it is to compile your C code with those structs and extract the structure information from the debugging info of the object/executable file. Otherwise you're looking into finding/making structure parsers or hacking clang.
UPD: Never tried it, but there's pycparser, which might be useful.