Description of problem: Looking at the abidiff comparing the same library compiled with clang vs. compiled with GCC it points out: [C]'function void RAW_LOG(int, const char*)' has some indirect sub-type changes: parameter 3 of type '...' was added When you look at the declaration of the function in the source code you can see that it makes use of varargs gperftools/src/base/logging.h inline void RAW_LOG(int lvl, const char* pat, ...) { LOG_PRINTF(lvl, pat); } In the DWARF you can see that GCC gets this right: [ 3922b] subprogram external (flag) Yes name (strp) "RAW_LOG" decl_file (data1) 1 decl_line (data1) 228 MIPS_linkage_name (strp) "_Z7RAW_LOGiPKcz" <snip> [ 3924d] formal_parameter name (string) "lvl" decl_file (data1) 1 decl_line (data1) 228 type (ref4) [ 346dd] location (data4) location list [ 2576f] [ 3925c] formal_parameter name (string) "pat" decl_file (data1) 1 decl_line (data1) 228 type (ref4) [ 34cc6] location (data4) location list [ 25792] [ 3926b] unspecified_parameters [ 3926c] lexical_block But in Clang it only lists the 1st two parameters: [ 2474f] subprogram MIPS_linkage_name (strp) "_Z7RAW_LOGiPKcz" name (strp) "RAW_LOG" decl_file (data1) 18 decl_line (data1) 228 external (flag_present) Yes <snip> [ 2476c] formal_parameter name (strp) "lvl" decl_file (data1) 18 decl_line (data1) 228 type (ref4) [ 22c53] location (sec_offset) location list [ 106f1] [ 2477b] formal_parameter name (strp) "pat" decl_file (data1) 18 decl_line (data1) 228 type (ref4) [ 22bf9] location (sec_offset) location list [ 10727] [ 2478a] lexical_block Note that there is no: "unspecified_parameters". This will impact user's ability to debug functions which make use of varargs Version-Release number of selected component (if applicable): 3.4.2 from EPEL How reproducible: At least sometimes. Steps to Reproduce: 1. compare the two attached object files using abidiff 2. look at each compiler's resulting DWARF Actual results: There are only two parameters listed in clang's DWARF. Expected results: There should an unspecified_parameters line in clang's DWARF
Created attachment 1067011 [details] clang 3.4.2 compiled library
Created attachment 1067012 [details] gcc 4.4.7 compiled library
This appears to be fixed in clang 3.5.0 [ 1f8a8] subprogram low_pc (addr) +0x0000000000015dd0 <_Z7RAW_LOGiPKcz> high_pc (data4) 299 (+0x0000000000015efb) frame_base (exprloc) [ 0] reg7 lo_user+0x1fe7 (flag_present) MIPS_linkage_name (strp) "_Z7RAW_LOGiPKcz" name (strp) "RAW_LOG" decl_file (data1) 14 decl_line (data1) 228 external (flag_present) accessibility (data1) public (1) [ 1f8c2] formal_parameter location (sec_offset) location list [ 1131f] name (strp) "lvl" decl_file (data1) 14 decl_line (data1) 228 type (ref4) [ 1dd37] [ 1f8d1] formal_parameter location (sec_offset) location list [ 11359] name (strp) "pat" decl_file (data1) 14 decl_line (data1) 228 type (ref4) [ 1e16b] [ 1f8e0] unspecified_parameters [ 1f8e1] lexical_block