This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] dwarf2out.c patch for bug 20805


This fixes a problem where C++ code could result in dwarf2 debug info
that triggered an internal gdb error.  We were incorrectly emitting
DW_AT_specification for a declaration.  This should only be used for
definitions of class local static variables (pardon my C++).

This is a side effect of how the namespace support works.  We get two
DIEs emitted for one declaration, one in the namespace associated with
the variable, and one in the current context.  The second one was being
mistaken for a definition following a declaration.  We can fix this by
adding an explicit check to ignore declarations before emitting a
DW_AT_specification.

This was tested with an x86_64-linux bootstrap, make check, and gdb make
check.  There were no regressions.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

Attachment: patch.second.die
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]