This is the mail archive of the gdb-patches@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]

[PING][PATCH] Big-endian targets: Don't ignore offset into DW_OP_stack_value


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 --
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 633c6b3..99f63cc 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -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}
 		}
 	    }
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 1ccdc5d..989a717 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -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.


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