This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

[Bug gdb/23712] dwarf2read.c:9730: internal-error: void dw2_add_symbol_to_list(symbol*, pending**): Assertion `(*listhead) == NULL || (SYMBOL_LANGUAGE ((*listhead)->symbol[0]) == SYMBOL_LANGUAGE (symbol))' failed


https://sourceware.org/bugzilla/show_bug.cgi?id=23712

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, if GCC can do anything better here please speak up.  Currently the CUs
generated at link-time (possibly combining different source language CUs) get
sth like

  Compilation Unit @ offset 0x138:
   Length:        0x8e (32-bit)
   Version:       4
   Abbrev Offset: 0xd2
   Pointer Size:  8
 <0><143>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <144>   DW_AT_producer    : (indirect string, offset: 0x22e): GNU GIMPLE
9.0.0 20181108 (experimental) -mtune=generic -march=x86-64 -mtune=generic
-march=x86-64 -g -fno-openmp -fno-openacc -fno-pie -fltrans
    <148>   DW_AT_language    : 12      (ANSI C99)
    <149>   DW_AT_name        : (indirect string, offset: 0x221): <artificial>
    <14d>   DW_AT_comp_dir    : (indirect string, offset: 0x1ac):
/abuild/rguenther/obj-slpcost-g/gcc
    <151>   DW_AT_low_pc      : 0x4004b2
    <159>   DW_AT_high_pc     : 0x3c
    <161>   DW_AT_stmt_list   : 0x10c

where DW_AT_language is either the single common language of the source CUs
contributing to this, the "newest" C/C++ when mixing C and C++ (where
C++ is "newer" than C), or as fallback DW_LANG_C (for example when combining
C and fortran).  The standard says a CU entry _may_ have a DW_AT_language
attribute - would gdb be more happy when we do not emit any DW_AT_language
attribute for link-time generated DIEs?  You can see we set a producer
of GNU GIMPLE which gdb may use to trigger special behavior (OTOH it
could do that whenever seeing a unit import with different DW_AT_language...)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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