I.e.:
$ pahole -C 'perf_event_header(sizeof=siz),a' ~/bin/perf
pahole: the sizeof member 'siz' not found in the 'perf_event_header' type
$ pahole -C 'perf_event_header(sizeof=size,b),a' ~/bin/perf
pahole: invalid, missing '=' in 'perf_event_header(sizeof=size,b)'
$ pahole -C 'perf_event_header(sizeof=size,b=c),a' ~/bin/perf
pahole: invalid arg 'b' in 'perf_event_header(sizeof=size,b=c)' (known args: sizeof=member)
$ pahole -C 'perf_event_header(sizeof=size),a' ~/bin/perf
struct perf_event_header {
__u32 type; /* 0 4 */
__u16 misc; /* 4 2 */
__u16 size; /* 6 2 */
/* size: 8, cachelines: 1, members: 3 */
/* last cacheline: 8 bytes */
};
$
We're for now considering just the first class in that list, so the 'a'
is parsed but not validated, its there just to test the comma as a
separator of class arguments and also as the separator of multiple
classes.
I.e.:
$ pahole -V -C 'perf_event_header(sizeof=size),a(sizeof=1)' ~/bin/perf
pahole: sizeof_operator for 'a' is '1'
pahole: sizeof_operator for 'perf_event_header' is 'size'
struct perf_event_header {
__u32 type; /* 0 4 */
__u16 misc; /* 4 2 */
__u16 size; /* 6 2 */
/* size: 8, cachelines: 1, members: 3 */
/* last cacheline: 8 bytes */
};
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Build instructions:
1. install cmake
2. mkdir build
3. cd build
4. cmake -D__LIB=lib ..
5. make install
Default is to be installed on /usr/local, see rpm spec file for
installing on other places.
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
Fedora Core 6:
cmake 2.4.5-2.fc6
elfutils-devel 0.126-1.fc6