https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66080
Bug ID: 66080 Summary: incorrect debug info for CTOR Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: chihin.ko at oracle dot com Target Milestone: --- Created attachment 35505 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35505&action=edit test case for attach delegating_constructors.cc test case, due to incorrect debug info, gdb behave strange: can't stop at line bpt: (gdb) b 15 Breakpoint 1 at 0x4009d2: file delegating_constructors.cc, line 15. (gdb) b 16 Breakpoint 2 at 0x400a07: file delegating_constructors.cc, line 16. (gdb) b 20 Breakpoint 3 at 0x400a3a: file delegating_constructors.cc, line 20. (gdb) run Starting program: /workspace/chko/ws/dinstall/intel_S11_gcc482/delegating_constructors.dbx,gcc/intel-Linux/a.out Error in re-setting breakpoint 1: Function "/workspace/chko/ws/dinstall/intel_S11_gcc482/delegating_constructors.dbx" not defined. Error in re-setting breakpoint 2: Function "/workspace/chko/ws/dinstall/intel_S11_gcc482/delegating_constructors.dbx" not defined. Error in re-setting breakpoint 3: Function "/workspace/chko/ws/dinstall/intel_S11_gcc482/delegating_constructors.dbx" not defined. a: x=1 y=2.00 z=3 st=4 arr: x=1 y=2.00 z=3 st=4 x=1 y=2.00 z=3 st=4 a2: x=11 y=22.00 z=33 st=77 [Inferior 1 (process 7687) exited normally] (gdb) quit here is one example in dwarf dump: < 2><0x00000052> DW_TAG_subprogram DW_AT_external yes(1) DW_AT_name "St" DW_AT_decl_file 0x00000001 delegating_constructors.cc DW_AT_decl_line 0x00000006 DW_AT_declaration yes(1) ... ... < 1><0x000001c5> DW_TAG_subprogram DW_AT_specification <0x00000052> <== shouldn't point to "St" DW_AT_inline DW_INL_declared_not_inlined DW_AT_object_pointer <0x000001d3> DW_AT_sibling <0x000001e6> ... ... < 1><0x000001eb> DW_TAG_subprogram DW_AT_abstract_origin <0x000001c5> DW_AT_linkage_name "_ZN2StC2Ei" DW_AT_low_pc 0x004009a6 DW_AT_high_pc <offset-from-lowpc>22