* top.c (xgdb_verbose): Remove.
[deliverable/binutils-gdb.git] / gdb / findvar.c
index ec9dde7810d2a73cafec1d1a91694dd427df4067..d0051455109a5dc203d08888e138745fe862a44c 100644 (file)
@@ -446,7 +446,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
   struct value *v;
   struct type *type = SYMBOL_TYPE (var);
   CORE_ADDR addr;
-  int len;
 
   /* Call check_typedef on our type to make sure that, if TYPE is
      a TYPE_CODE_TYPEDEF, its length is set to the length of the target type
@@ -455,8 +454,6 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
      set the returned value type description correctly.  */
   check_typedef (type);
 
-  len = TYPE_LENGTH (type);
-
   if (symbol_read_needs_frame (var))
     gdb_assert (frame);
 
@@ -465,7 +462,7 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
     case LOC_CONST:
       /* Put the constant back in target format.  */
       v = allocate_value (type);
-      store_signed_integer (value_contents_raw (v), len,
+      store_signed_integer (value_contents_raw (v), TYPE_LENGTH (type),
                            gdbarch_byte_order (get_type_arch (type)),
                            (LONGEST) SYMBOL_VALUE (var));
       VALUE_LVAL (v) = not_lval;
@@ -490,7 +487,8 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
 
     case LOC_CONST_BYTES:
       v = allocate_value (type);
-      memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), len);
+      memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var),
+             TYPE_LENGTH (type));
       VALUE_LVAL (v) = not_lval;
       return v;
 
This page took 0.027607 seconds and 4 git commands to generate.