723c27b3e0
[acme@filo pahole]$ cat examples/expand_typedefs.c <SNIP> typedef struct { int a, b, c; } inner; static struct outer { int q, b; inner m; } foo; <SNIP> [acme@filo pahole]$ pahole --expand_types examples/expand_typedefs /* <158> /home/acme/git/pahole/examples/expand_typedefs.c:7 */ struct outer { int q; /* 0 4 */ int b; /* 4 4 */ /* typedef inner */ struct { int a; /* 0 4 */ int b; /* 4 4 */ int c; /* 8 4 */ } m; /* 8 12 */ }; /* size: 20, cachelines: 1 */ /* last cacheline: 20 bytes */ /* definitions: 1 */ [acme@filo pahole]$ For now it does all typedef expansions, which in at least the base types may be a bit too much, e.g. u32 -> unsigned long int, lets see if somebody complains, perhaps even myself 8) If that is the case we can add yet another command line option to specify that such base type expansions should be filtered out, making the expand_types parameter be flag mask, not just a boolean as it is today. To see a more complete output look at: http://oops.ghostprotocols.net:81/acme/dwarves/vmlinux-pahole-expand_types-typedef_unfolding.txt Suggested by Jeff Muizelaar. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
||
---|---|---|
cmake/modules | ||
lib | ||
ostra | ||
rpm/SPECS | ||
CMakeLists.txt | ||
codiff.c | ||
ctracer.c | ||
dtagnames.c | ||
dwarves.c | ||
dwarves.h | ||
list.h | ||
MANIFEST | ||
pahole.c | ||
pdwtags.c | ||
pfunct.c | ||
pglobal.c | ||
prefcnt.c | ||
README | ||
README.ctracer |
Build instructions: 1. install cmake 2. mkdir build 3. cd build 4. cmake .. 5. make Known to work scenarios: Mandriva Cooker: cmake 2.4.5-1mdv2007.1 libelfutils1-devel 0.123-1mdv2007.1 Debian Unstable: cmake 2.4.5-1 libdw-dev 0.123-2