ftype = lookup_function_type (type);
ftype = make_function_type (type, (struct type **) 0);
read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu){  struct type *type;		/* Type that this function returns */  struct type *ftype;		/* Function that returns above type */  struct attribute *attr;  /* Decode the type that this subroutine returns */  if (die->type)    {      return;    }  type = die_type (die, cu);  ftype = lookup_function_type (type);  /* All functions in C++ have prototypes.  */  attr = dwarf2_attr (die, DW_AT_prototyped, cu);  if ((attr && (DW_UNSND (attr) != 0))      || cu->language == language_cplus)    TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;  if (die->child != NULL)    {      struct die_info *child_die;      int nparams = 0;      int iparams = 0;      /* Count the number of parameters.         FIXME: GDB currently ignores vararg functions, but knows about         vararg member functions.  */      child_die = die->child;      while (child_die && child_die->tag)	{	  if (child_die->tag == DW_TAG_formal_parameter)	    nparams++;	  else if (child_die->tag == DW_TAG_unspecified_parameters)	    TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS;	  child_die = sibling_die (child_die);	}      /* Allocate storage for parameters and fill them in.  */      TYPE_NFIELDS (ftype) = nparams;      TYPE_FIELDS (ftype) = (struct field *)	TYPE_ALLOC (ftype, nparams * sizeof (struct field));      child_die = die->child;      while (child_die && child_die->tag)	{	  if (child_die->tag == DW_TAG_formal_parameter)	    {	      /* Dwarf2 has no clean way to discern C++ static and non-static	         member functions. G++ helps GDB by marking the first	         parameter for non-static member functions (which is the	         this pointer) as artificial. We pass this information	         to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL.  */	      attr = dwarf2_attr (child_die, DW_AT_artificial, cu);	      if (attr)		TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr);	      else		TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0;	      TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu);	      iparams++;	    }	  child_die = sibling_die (child_die);	}    }  die->type = ftype;}