[PATCH v2] gdb/dwarf: fix reading subprogram with DW_AT_specification (PR gdb/26693)
Tom Tromey
tom@tromey.com
Thu Oct 22 14:18:43 GMT 2020
>> gdb currently goes through a lot of work to support DWARF like this, but
>> I wish it didn't have to. It complicates the DWARF reader -- but IIRC
>> both gcc and clang just emit specializations with names like
>> "apply<int>". So, I wonder if we could drop support for this at some
>> point.
Simon> The object that contained this kind of DWARF, that made GDB crash, was
Simon> compiled with ICC. So unless we decide to drop support for ICC, I don't
Simon> think we can get rid of it any time soon.
Well, we could support it in a more limited way - like, these functions
would still appear but without template parameters in their names.
We could try to get a clarification from DWARF as to whether icc or
gcc/clang are correct here, then file bug(s) against the compiler.
Simon> I would write this, does that sound good?
Simon> /* Load the DIEs associated with PER_CU into memory.
Simon> In some cases, the caller, while reading partial symbols, will need to load
Simon> the full symbols for the CU for some reason. It will already have a
Simon> dwarf2_cu object for THIS_CU and pass it as EXISTING_CU, so it can be re-used
Simon> rather than creating a new one. */
Looks great, thank you.
Tom
More information about the Gdb-patches
mailing list