DWARF: Use DW_OP_addrx and DW_OP_constx for DWARF5.
authorMark Wielaard <mark@klomp.org>
Tue, 15 May 2018 08:37:46 +0000 (08:37 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Tue, 15 May 2018 08:37:46 +0000 (08:37 +0000)
commit35b361b1164fbef3f1ca0349302dea7177156a1c
treea042991105fc2fbd204a7b85e9f0bbfd082e0e7a
parent01ec978cec1f5c790a4881acef1dfc824ab67f26
DWARF: Use DW_OP_addrx and DW_OP_constx for DWARF5.

For older DWARF and -gsplit-dwarf we want to emit DW_OP_GNU_addr_index
and DW_OP_GNU_const_index, but for DWARF5 we should use DW_OP_addrx
and DW_OP_constx.

gcc/ChangeLog:

* dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
(size_of_loc_descr): Likewise.
(output_loc_operands): Likewise.
(output_loc_operands_raw): Likewise.
(dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
(resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
(hash_loc_operands): Likewise.
(compare_loc_operands): Likewise.

From-SVN: r260252
gcc/ChangeLog
gcc/dwarf2out.c