This is a regression for GDB gdb.cp/abstract-origin.exp. PASS: gcc (GCC) 4.7.3 20121212 (prerelease) FAIL: gcc (GCC) 4.8.0 20121212 (experimental) (regression sometimes in ~ the last month) PASS was: <1><9e>: Abbrev Number: 14 (DW_TAG_subprogram) <9f> DW_AT_abstract_origin: <0x5a> <a3> DW_AT_linkage_name: (indirect string, offset: 0xac): _ZN1AC2Ei [...] <2><d1>: Abbrev Number: 16 (DW_TAG_lexical_block) <d2> DW_AT_low_pc : 0x40081e <da> DW_AT_high_pc : 0x400891 <3><e2>: Abbrev Number: 17 (DW_TAG_variable) <e3> DW_AT_abstract_origin: <0x7c> and above: <2><7b>: Abbrev Number: 11 (DW_TAG_lexical_block) <3><7c>: Abbrev Number: 12 (DW_TAG_variable) <7d> DW_AT_name : (indirect string, offset: 0x51): problem [...] BTW <d1> was missing DW_AT_abstract_origin <0x7b>; but GDB works with that. FAIL is: <1><9e>: Abbrev Number: 14 (DW_TAG_subprogram) <9f> DW_AT_abstract_origin: <0x5a> <a3> DW_AT_linkage_name: (indirect string, offset: 0xa9): _ZN1AC2Ei [...] <nothing for DW_TAG_variable> This means GDB correctly inherits the DIE from inherited DIE tree: <2><7b>: Abbrev Number: 11 (DW_TAG_lexical_block) <3><7c>: Abbrev Number: 12 (DW_TAG_variable) <7d> DW_AT_name : (indirect string, offset: 0x97): problem [...] But that DW_TAG_lexical_block has no DW_AT_low/high_pc (it cannot have as it is not the concrete instance) which is a regression. GDB currently ignores DW_TAG_lexical_block without DW_AT_low/high_pc/range. While GDB could recognize DW_TAG_lexical_block without DW_AT_low/high_pc it would be still a debug info quality regression as the GCC-4.7 range there is more narrow than the DW_TAG_subprogram PC range.
Created attachment 28936 [details] gdb.cp/abstract-origin.cc from FSF GDB tree, for -O0 -g.
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193595 Trying to spot the difference.
Created attachment 28937 [details] gcc48-pr55665.patch Untested fix.
Author: jakub Date: Wed Dec 12 23:19:32 2012 New Revision: 194461 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194461 Log: PR debug/55665 * tree-inline.c (remap_decls): Change nonlocalized_list to pointer to pointer to vector from pointer to vector. (remap_block): Pass address of BLOCK_NONLOCALIZED_VARS. * g++.dg/guality/pr55665.C: New test. Added: trunk/gcc/testsuite/g++.dg/guality/pr55665.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-inline.c
Fixed.
Confirming the GDB regression is fixed in the today's results, thanks!