9a413e60a3
Where the 'if' should be just one of of the cases in the 'switch', and guess what: This: diff --git a/dwarves.c b/dwarves.c index c0ae7c8..34f29a1 100644 --- a/dwarves.c +++ b/dwarves.c @@ -2580,10 +2580,10 @@ static int cus__emit_typedef_definitions } type = cu__find_tag_by_id(cu, tdef->type); - if (type->tag == DW_TAG_typedef) - cus__emit_typedef_definitions(self, cu, type); - switch (type->tag) { + case DW_TAG_typedef: + cus__emit_typedef_definitions(self, cu, type); + break; case DW_TAG_pointer_type: ptr_type = cu__find_tag_by_id(cu, type->type); if (ptr_type->tag != DW_TAG_subroutine_type) Results in this: [acme@newtoy pahole]$ codiff -V build/libdwarves.so.orig build/libdwarves.so /home/acme/pahole/dwarves.c: cus__emit_typedef_definitions | -18 # 466 -> 448 1 function changed, 18 bytes removed [acme@newtoy pahole]$ Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> |
||
---|---|---|
cmake/modules | ||
rpm/SPECS | ||
CMakeLists.txt | ||
MANIFEST | ||
README | ||
README.ctracer | ||
codiff.c | ||
ctracer.c | ||
dtagnames.c | ||
dwarves.c | ||
dwarves.h | ||
list.h | ||
pahole.c | ||
pfunct.c | ||
prefcnt.c |
README
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