https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71855
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86-64-Linux
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-07-19
Ever confirmed|0 |1
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Reduced on x86-64 Linux to:
void foobar (const char *format, ...)
{
}
Confirmed compiling with -g.
$ ./xgcc -B./ -c a.i -g -save-temps
$ readelf --debug-dump a.o
<snip>
<1><2d>: Abbrev Number: 2 (DW_TAG_subprogram)
<2e> DW_AT_external : 1
<2e> DW_AT_name : (indirect string, offset: 0x0): foobar
<32> DW_AT_decl_file : 1
<33> DW_AT_decl_line : 1
<34> DW_AT_prototyped : 1
<34> DW_AT_low_pc : 0x0
<3c> DW_AT_high_pc : 0x59
<44> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<46> DW_AT_GNU_all_call_sites: 1
<46> DW_AT_sibling : <0x5c>
<2><4a>: Abbrev Number: 3 (DW_TAG_formal_parameter)
<4b> DW_AT_name : (indirect string, offset: 0x3e): format
<4f> DW_AT_decl_file : 1
<50> DW_AT_decl_line : 1
<51> DW_AT_type : <0x5c>
<55> DW_AT_location : 3 byte block: 91 b8 7e (DW_OP_fbreg: -200)
<2><59>: Abbrev Number: 4 (DW_TAG_unspecified_parameters)
<2><5a>: Abbrev Number: 4 (DW_TAG_unspecified_parameters)
Notice foobar() has two DW_TAG_unspecified_parameters DIEs. I'm not a dwarf
person, but it looks like there should only be one.