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

[binutils-gdb] Remove addr_size field from struct piece_closure


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ddd7882a582637d86a321c1ab835f6cdbeb6d017

commit ddd7882a582637d86a321c1ab835f6cdbeb6d017
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date:   Tue Jun 13 15:20:26 2017 +0200

    Remove addr_size field from struct piece_closure
    
    The addr_size field in the piece_closure data structure is a relic from
    before introducing the typed DWARF stack.  It is obsolete now.  This patch
    removes it.
    
    gdb/ChangeLog:
    
    	* dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
    	(allocate_piece_closure): Drop addr_size parameter.
    	(dwarf2_evaluate_loc_desc_full): Adjust call to
    	allocate_piece_closure.

Diff:
---
 gdb/ChangeLog   | 7 +++++++
 gdb/dwarf2loc.c | 8 ++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 51fb241..bd46425 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
+	* dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
+	(allocate_piece_closure): Drop addr_size parameter.
+	(dwarf2_evaluate_loc_desc_full): Adjust call to
+	allocate_piece_closure.
+
+2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
 	PR gdb/21226
 	* dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
 	the LSB end, independent of endianness.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 061ec6d..8f99844 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1486,9 +1486,6 @@ struct piece_closure
   /* The number of pieces used to describe this variable.  */
   int n_pieces;
 
-  /* The target address size, used only for DWARF_VALUE_STACK.  */
-  int addr_size;
-
   /* The pieces themselves.  */
   struct dwarf_expr_piece *pieces;
 
@@ -1503,7 +1500,7 @@ struct piece_closure
 static struct piece_closure *
 allocate_piece_closure (struct dwarf2_per_cu_data *per_cu,
 			int n_pieces, struct dwarf_expr_piece *pieces,
-			int addr_size, struct frame_info *frame)
+			struct frame_info *frame)
 {
   struct piece_closure *c = XCNEW (struct piece_closure);
   int i;
@@ -1511,7 +1508,6 @@ allocate_piece_closure (struct dwarf2_per_cu_data *per_cu,
   c->refc = 1;
   c->per_cu = per_cu;
   c->n_pieces = n_pieces;
-  c->addr_size = addr_size;
   c->pieces = XCNEWVEC (struct dwarf_expr_piece, n_pieces);
   if (frame == NULL)
     c->frame_id = null_frame_id;
@@ -2417,7 +2413,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
 	invalid_synthetic_pointer ();
 
       c = allocate_piece_closure (per_cu, ctx.num_pieces, ctx.pieces,
-				  ctx.addr_size, frame);
+				  frame);
       /* We must clean up the value chain after creating the piece
 	 closure but before allocating the result.  */
       free_values.free_to_mark ();


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