[PING] Big-endian targets: Don't ignore offset into DW_OP_stack_value
Commit Message
Ping:
https://sourceware.org/ml/gdb-patches/2017-02/msg00363.html
> gdb/ChangeLog:
>
> * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
> pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
> (dwarf2_evaluate_loc_desc_full): Add parameter 'orig_type'. Fix
> the handling of DWARF_VALUE_STACK on big-endian targets when
> coming via an implicit pointer.
> (dwarf2_evaluate_loc_desc): Adjust call to
> dwarf2_evaluate_loc_desc_full.
> * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
> * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
>
> gdb/testsuite/ChangeLog:
>
> Andreas Arnez <arnez@linux.vnet.ibm.com>
>
> * gdb.dwarf2/nonvar-access.exp: Add test for stack value location
> and implicit pointer into such a location.
Since we now have DWARF-5 support, I think there is no point in adding a
new use of DW_OP_GNU_implicit_pointer to the test case. Thus I suggest
to use DW_OP_implicit_pointer instead, by merging the patch below.
OK to apply?
--
Andreas
-- >8 --
@@ -159,7 +159,7 @@ Dwarf::assemble $asm_file {
{name implicit_a_ptr}
{type :$char_ptr_label}
{location {
- GNU_implicit_pointer $implicit_a_label 5
+ implicit_pointer $implicit_a_label 5
} SPECIAL_expr}
}
# Stack-value location.
@@ -176,7 +176,7 @@ Dwarf::assemble $asm_file {
{name implicit_b_ptr}
{type :$char_ptr_label}
{location {
- GNU_implicit_pointer $stack_b_label 1
+ implicit_pointer $stack_b_label 1
} SPECIAL_expr}
}
}
@@ -946,9 +946,10 @@ namespace eval Dwarf {
define_label $l2
}
+ DW_OP_implicit_pointer -
DW_OP_GNU_implicit_pointer {
if {[llength $line] != 3} {
- error "usage: DW_OP_GNU_implicit_pointer LABEL OFFSET"
+ error "usage: $opcode LABEL OFFSET"
}
# Here label is a section offset.