die->type = type;
set_die_type (die, type, cu);
read_base_type (struct die_info *die, struct dwarf2_cu *cu){  struct objfile *objfile = cu->objfile;  struct type *type;  struct attribute *attr;  int encoding = 0, size = 0;  /* If we've already decoded this die, this is a no-op. */  if (die->type)    {      return;    }  attr = dwarf2_attr (die, DW_AT_encoding, cu);  if (attr)    {      encoding = DW_UNSND (attr);    }  attr = dwarf2_attr (die, DW_AT_byte_size, cu);  if (attr)    {      size = DW_UNSND (attr);    }  attr = dwarf2_attr (die, DW_AT_name, cu);  if (attr && DW_STRING (attr))    {      enum type_code code = TYPE_CODE_INT;      int type_flags = 0;      switch (encoding)	{	case DW_ATE_address:	  /* Turn DW_ATE_address into a void * pointer.  */	  code = TYPE_CODE_PTR;	  type_flags |= TYPE_FLAG_UNSIGNED;	  break;	case DW_ATE_boolean:	  code = TYPE_CODE_BOOL;	  type_flags |= TYPE_FLAG_UNSIGNED;	  break;	case DW_ATE_complex_float:	  code = TYPE_CODE_COMPLEX;	  break;	case DW_ATE_float:	  code = TYPE_CODE_FLT;	  break;	case DW_ATE_signed:	case DW_ATE_signed_char:	  break;	case DW_ATE_unsigned:	case DW_ATE_unsigned_char:	  type_flags |= TYPE_FLAG_UNSIGNED;	  break;	default:	  complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'",		     dwarf_type_encoding_name (encoding));	  break;	}      type = init_type (code, size, type_flags, DW_STRING (attr), objfile);      if (encoding == DW_ATE_address)	TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID,							   cu);      else if (encoding == DW_ATE_complex_float)	{	  if (size == 32)	    TYPE_TARGET_TYPE (type)	      = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu);	  else if (size == 16)	    TYPE_TARGET_TYPE (type)	      = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu);	  else if (size == 8)	    TYPE_TARGET_TYPE (type)	      = dwarf2_fundamental_type (objfile, FT_FLOAT, cu);	}    }  else    {      type = dwarf_base_type (encoding, size, cu);    }  die->type = type;}