* gdb.threads/gcore-thread.exp: Use gdb_gcore_cmd.
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index d5b5b63122a7d99f7c53e8cf187544eb3927aee0..7a669f125e0b57d4634e54135118eb067aafb93d 100644 (file)
@@ -346,13 +346,12 @@ float_type_from_length (struct type *type)
 {
   struct gdbarch *gdbarch = get_type_arch (type);
   const struct builtin_type *builtin = builtin_type (gdbarch);
-  unsigned int len = TYPE_LENGTH (type);
 
-  if (len == TYPE_LENGTH (builtin->builtin_float))
+  if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_float))
     type = builtin->builtin_float;
-  else if (len == TYPE_LENGTH (builtin->builtin_double))
+  else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_double))
     type = builtin->builtin_double;
-  else if (len == TYPE_LENGTH (builtin->builtin_long_double))
+  else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_long_double))
     type = builtin->builtin_long_double;
 
   return type;
@@ -680,6 +679,7 @@ build_address_symbolic (struct gdbarch *gdbarch,
     }
 
   if (msymbol != NULL
+      && MSYMBOL_HAS_SIZE (msymbol)
       && MSYMBOL_SIZE (msymbol) == 0
       && MSYMBOL_TYPE (msymbol) != mst_text
       && MSYMBOL_TYPE (msymbol) != mst_text_gnu_ifunc
@@ -2266,7 +2266,6 @@ ui_printf (char *arg, struct ui_file *stream)
 
              /* Parameter data.  */
              struct type *param_type = value_type (val_args[i]);
-             unsigned int param_len = TYPE_LENGTH (param_type);
              struct gdbarch *gdbarch = get_type_arch (param_type);
              enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
@@ -2328,8 +2327,8 @@ ui_printf (char *arg, struct ui_file *stream)
 
              /* Conversion between different DFP types.  */
              if (TYPE_CODE (param_type) == TYPE_CODE_DECFLOAT)
-               decimal_convert (param_ptr, param_len, byte_order,
-                                dec, dfp_len, byte_order);
+               decimal_convert (param_ptr, TYPE_LENGTH (param_type),
+                                byte_order, dec, dfp_len, byte_order);
              else
                /* If this is a non-trivial conversion, just output 0.
                   A correct converted value can be displayed by explicitly
This page took 0.024449 seconds and 4 git commands to generate.