dump-record-layouts doesn't output field sizes or alignment spaces

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

dump-record-layouts doesn't output field sizes or alignment spaces

Deep Majumder via cfe-dev
Hi,

Is there a reason why -fdump-record-layouts doesn't show the size of
each of the members of the records and/or the alignment spaces between
them? For simple examples it is pretty easy to understand what those
are, but for more complex cases and for parsing these results into
other tools it's way more complicated than it needs to be.

Is there a particular reason for not printing it, or maybe the problem
is that I'm using the wrong thing to find out all classes which have
space being used by alignment?

Also the MSVC output in this case is very explicit with the alignment
spaces being inserted between members.

Maybe the tool I should be using for this is pahole[1] ? The only
problem I have with it is that I can only use it on DWARF emitting
platforms (and to my misery I need it on windows).

[1](https://manpages.debian.org/unstable/dwarves/pahole.1.en.html)

--

Leonardo Santagada
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev