[Bug debug/66503] New: missing DW_AT_abstract_origin for cross-unit call sites
derodat at adacore dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 09:28:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66503
Bug ID: 66503
Summary: missing DW_AT_abstract_origin for cross-unit call
sites
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: derodat at adacore dot com
Target Milestone: ---
Created attachment 35754
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35754&action=edit
C reproducer
With the recent work for PR debug/65549, we observed a regression in the
generated debugging information. Take the attached reproducer, build it and
look at the output DWARF:
$ gcc -c -O1 -g foo.c
$ objdump --dwarf=info foo.o
[...]
<2><4e>: Abbrev Number: 3 (DW_TAG_GNU_call_site)
<4f> DW_AT_low_pc : 0x9
<2><57>: Abbrev Number: 0
There is no DW_AT_abstract_origin attribute anymore, whereas there used to be
one.
On PowerPC with -mlongcall, for instance, call instructions are indirect and we
(at AdaCore) rely on this attribute to determine what function is actually
called (it's easier this way than interpreting machine code...). The DWARF
proposal for call sites also say debuggers should be able to use this attribute
(to build virtual call stacks in the presence of tail calls), but I could not
observe this in practice with GDB.
(Excepts from the <https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00712.html>
thread)
As discussed on the corresponding thread on gcc-patches@, I am about to commit
a fix on mainline and on the 5.0 branch.
More information about the Gcc-bugs
mailing list