Go to file
Arnaldo Carvalho de Melo 723c27b3e0 [LIB]: Expand typedefs in the expand_types mode
[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>
2007-02-26 22:57:38 -03:00
cmake/modules [CMAKE] FindDWARF.cmake: use the "include_directories" command 2007-02-25 17:21:29 -03:00
lib [CTRACER]: Lots of improvements 2007-02-02 15:15:27 -02:00
ostra [CTRACER]: Lots of improvements 2007-02-02 15:15:27 -02:00
rpm/SPECS [RPM]: 15th release 2007-02-26 13:45:45 -03:00
CMakeLists.txt [CMAKE]: Just convert the commands to lowercase 2007-02-25 16:43:59 -03:00
codiff.c [CODIFF]: Look for diffs in the number and total size of inline expansions: 2007-02-24 23:12:34 -02:00
ctracer.c [LIB]: Rename tag__print to tag__fprintf, for consistency 2007-02-15 11:40:51 -02:00
dtagnames.c [ALL]: Fixup warnings 2007-01-29 10:42:03 -02:00
dwarves.c [LIB]: Expand typedefs in the expand_types mode 2007-02-26 22:57:38 -03:00
dwarves.h [LIB]: Make tag__fprintf return the number of bytes printed 2007-02-15 12:03:47 -02:00
list.h Repository creation. 2006-10-24 20:42:39 -03:00
MANIFEST [CTRACER]: Lots of improvements 2007-02-02 15:15:27 -02:00
pahole.c [LIB]: Rename tag__print to tag__fprintf, for consistency 2007-02-15 11:40:51 -02:00
pdwtags.c [LIB]: Rename lexblock__print to lexblock__fprintf, for consistency 2007-02-15 11:56:16 -02:00
pfunct.c [LIB]: Rename function__print_stats to function__fprintf_stats, for consistency 2007-02-15 12:01:01 -02:00
pglobal.c [LIB]: Rename tag__print to tag__fprintf, for consistency 2007-02-15 11:40:51 -02:00
prefcnt.c [LIB]: Rename tag__print to tag__fprintf, for consistency 2007-02-15 11:40:51 -02:00
README [README]: Add information about packages required to build 2006-12-20 10:28:44 -02:00
README.ctracer [CTRACER]: Lots of improvements 2007-02-02 15:15:27 -02:00

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