if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type) && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (pcc_promotion_type)) { SYMBOL_VALUE (sym) += TYPE_LENGTH (pcc_promotion_type) - TYPE_LENGTH (SYMBOL_TYPE (sym)); } break;
SYMBOL_TYPE (sym) = TYPE_UNSIGNED (SYMBOL_TYPE (sym)) ? pcc_unsigned_promotion_type : pcc_promotion_type;
define_symbol (CORE_ADDR valu, char *string, int desc, int type,	       struct objfile *objfile){  struct symbol *sym;  char *p = (char *) find_name_end (string);  int deftype;  int synonym = 0;  int i;  /* We would like to eliminate nameless symbols, but keep their types.     E.g. stab entry ":t10=*2" should produce a type 10, which is a pointer     to type 2, but, should not create a symbol to address that type. Since     the symbol will be nameless, there is no way any user can refer to it. */  int nameless;  /* Ignore syms with empty names.  */  if (string[0] == 0)    return 0;  /* Ignore old-style symbols from cc -go  */  if (p == 0)    return 0;  while (p[1] == ':')    {      p += 2;      p = strchr (p, ':');    }  /* If a nameless stab entry, all we need is the type, not the symbol.     e.g. ":t10=*2" or a nameless enum like " :T16=ered:0,green:1,blue:2,;" */  nameless = (p == string || ((string[0] == ' ') && (string[1] == ':')));  current_symbol = sym = (struct symbol *)    obstack_alloc (&objfile->objfile_obstack, sizeof (struct symbol));  memset (sym, 0, sizeof (struct symbol));  switch (type & N_TYPE)    {    case N_TEXT:      SYMBOL_SECTION (sym) = SECT_OFF_TEXT (objfile);      break;    case N_DATA:      SYMBOL_SECTION (sym) = SECT_OFF_DATA (objfile);      break;    case N_BSS:      SYMBOL_SECTION (sym) = SECT_OFF_BSS (objfile);      break;    }  if (processing_gcc_compilation)    {      /* GCC 2.x puts the line number in desc.  SunOS apparently puts in the         number of bytes occupied by a type or object, which we ignore.  */      SYMBOL_LINE (sym) = desc;    }  else    {      SYMBOL_LINE (sym) = 0;	/* unknown */    }  if (is_cplus_marker (string[0]))    {      /* Special GNU C++ names.  */      switch (string[1])	{	case 't':	  DEPRECATED_SYMBOL_NAME (sym) = obsavestring ("this", strlen ("this"),					    &objfile->objfile_obstack);	  break;	case 'v':		/* $vtbl_ptr_type */	  /* Was: DEPRECATED_SYMBOL_NAME (sym) = "vptr"; */	  goto normal;	case 'e':	  DEPRECATED_SYMBOL_NAME (sym) = obsavestring ("eh_throw", strlen ("eh_throw"),					    &objfile->objfile_obstack);	  break;	case '_':	  /* This was an anonymous type that was never fixed up.  */	  goto normal;#ifdef STATIC_TRANSFORM_NAME	case 'X':	  /* SunPRO (3.0 at least) static variable encoding.  */	  goto normal;#endif	default:	  complaint (&symfile_complaints, "Unknown C++ symbol name `%s'",		     string);	  goto normal;		/* Do *something* with it */	}    }  else    {    normal:      SYMBOL_LANGUAGE (sym) = current_subfile->language;      SYMBOL_SET_NAMES (sym, string, p - string, objfile);    }  p++;  /* Determine the type of name being defined.  */#if 0  /* Getting GDB to correctly skip the symbol on an undefined symbol     descriptor and not ever dump core is a very dodgy proposition if     we do things this way.  I say the acorn RISC machine can just     fix their compiler.  */  /* The Acorn RISC machine's compiler can put out locals that don't     start with "234=" or "(3,4)=", so assume anything other than the     deftypes we know how to handle is a local.  */  if (!strchr ("cfFGpPrStTvVXCR", *p))#else  if (isdigit (*p) || *p == '(' || *p == '-')#endif    deftype = 'l';  else    deftype = *p++;  switch (deftype)    {    case 'c':      /* c is a special case, not followed by a type-number.         SYMBOL:c=iVALUE for an integer constant symbol.         SYMBOL:c=rVALUE for a floating constant symbol.         SYMBOL:c=eTYPE,INTVALUE for an enum constant symbol.         e.g. "b:c=e6,0" for "const b = blob1"         (where type 6 is defined by "blobs:t6=eblob1:0,blob2:1,;").  */      if (*p != '=')	{	  SYMBOL_CLASS (sym) = LOC_CONST;	  SYMBOL_TYPE (sym) = error_type (&p, objfile);	  SYMBOL_DOMAIN (sym) = VAR_DOMAIN;	  add_symbol_to_list (sym, &file_symbols);	  return sym;	}      ++p;      switch (*p++)	{	case 'r':	  {	    double d = atof (p);	    char *dbl_valu;	    /* FIXME-if-picky-about-floating-accuracy: Should be using	       target arithmetic to get the value.  real.c in GCC	       probably has the necessary code.  */	    /* FIXME: lookup_fundamental_type is a hack.  We should be	       creating a type especially for the type of float constants.	       Problem is, what type should it be?	       Also, what should the name of this type be?  Should we	       be using 'S' constants (see stabs.texinfo) instead?  */	    SYMBOL_TYPE (sym) = lookup_fundamental_type (objfile,							 FT_DBL_PREC_FLOAT);	    dbl_valu = (char *)	      obstack_alloc (&objfile->objfile_obstack,			     TYPE_LENGTH (SYMBOL_TYPE (sym)));	    store_typed_floating (dbl_valu, SYMBOL_TYPE (sym), d);	    SYMBOL_VALUE_BYTES (sym) = dbl_valu;	    SYMBOL_CLASS (sym) = LOC_CONST_BYTES;	  }	  break;	case 'i':	  {	    /* Defining integer constants this way is kind of silly,	       since 'e' constants allows the compiler to give not	       only the value, but the type as well.  C has at least	       int, long, unsigned int, and long long as constant	       types; other languages probably should have at least	       unsigned as well as signed constants.  */	    /* We just need one int constant type for all objfiles.	       It doesn't depend on languages or anything (arguably its	       name should be a language-specific name for a type of	       that size, but I'm inclined to say that if the compiler	       wants a nice name for the type, it can use 'e').  */	    static struct type *int_const_type;	    /* Yes, this is as long as a *host* int.  That is because we	       use atoi.  */	    if (int_const_type == NULL)	      int_const_type =		init_type (TYPE_CODE_INT,			   sizeof (int) * HOST_CHAR_BIT / TARGET_CHAR_BIT, 0,			   "integer constant",			     (struct objfile *) NULL);	    SYMBOL_TYPE (sym) = int_const_type;	    SYMBOL_VALUE (sym) = atoi (p);	    SYMBOL_CLASS (sym) = LOC_CONST;	  }	  break;	case 'e':	  /* SYMBOL:c=eTYPE,INTVALUE for a constant symbol whose value	     can be represented as integral.	     e.g. "b:c=e6,0" for "const b = blob1"	     (where type 6 is defined by "blobs:t6=eblob1:0,blob2:1,;").  */	  {	    SYMBOL_CLASS (sym) = LOC_CONST;	    SYMBOL_TYPE (sym) = read_type (&p, objfile);	    if (*p != ',')	      {		SYMBOL_TYPE (sym) = error_type (&p, objfile);		break;	      }	    ++p;	    /* If the value is too big to fit in an int (perhaps because	       it is unsigned), or something like that, we silently get	       a bogus value.  The type and everything else about it is	       correct.  Ideally, we should be using whatever we have	       available for parsing unsigned and long long values,	       however.  */	    SYMBOL_VALUE (sym) = atoi (p);	  }	  break;	default:	  {	    SYMBOL_CLASS (sym) = LOC_CONST;	    SYMBOL_TYPE (sym) = error_type (&p, objfile);	  }	}      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &file_symbols);      return sym;    case 'C':      /* The name of a caught exception.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_LABEL;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      SYMBOL_VALUE_ADDRESS (sym) = valu;      add_symbol_to_list (sym, &local_symbols);      break;    case 'f':      /* A static function definition.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_BLOCK;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &file_symbols);      /* fall into process_function_types.  */    process_function_types:      /* Function result types are described as the result type in stabs.         We need to convert this to the function-returning-type-X type         in GDB.  E.g. "int" is converted to "function returning int".  */      if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_FUNC)	SYMBOL_TYPE (sym) = lookup_function_type (SYMBOL_TYPE (sym));      /* All functions in C++ have prototypes.  Stabs does not offer an         explicit way to identify prototyped or unprototyped functions,         but both GCC and Sun CC emit stabs for the "call-as" type rather         than the "declared-as" type for unprototyped functions, so         we treat all functions as if they were prototyped.  This is used         primarily for promotion when calling the function from GDB.  */      TYPE_FLAGS (SYMBOL_TYPE (sym)) |= TYPE_FLAG_PROTOTYPED;      /* fall into process_prototype_types */    process_prototype_types:      /* Sun acc puts declared types of arguments here.  */      if (*p == ';')	{	  struct type *ftype = SYMBOL_TYPE (sym);	  int nsemi = 0;	  int nparams = 0;	  char *p1 = p;	  /* Obtain a worst case guess for the number of arguments	     by counting the semicolons.  */	  while (*p1)	    {	      if (*p1++ == ';')		nsemi++;	    }	  /* Allocate parameter information fields and fill them in. */	  TYPE_FIELDS (ftype) = (struct field *)	    TYPE_ALLOC (ftype, nsemi * sizeof (struct field));	  while (*p++ == ';')	    {	      struct type *ptype;	      /* A type number of zero indicates the start of varargs.	         FIXME: GDB currently ignores vararg functions.  */	      if (p[0] == '0' && p[1] == '\0')		break;	      ptype = read_type (&p, objfile);	      /* The Sun compilers mark integer arguments, which should	         be promoted to the width of the calling conventions, with	         a type which references itself. This type is turned into	         a TYPE_CODE_VOID type by read_type, and we have to turn	         it back into builtin_type_int here.	         FIXME: Do we need a new builtin_type_promoted_int_arg ?  */	      if (TYPE_CODE (ptype) == TYPE_CODE_VOID)		ptype = builtin_type_int;	      TYPE_FIELD_TYPE (ftype, nparams) = ptype;	      TYPE_FIELD_ARTIFICIAL (ftype, nparams++) = 0;	    }	  TYPE_NFIELDS (ftype) = nparams;	  TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED;	}      break;    case 'F':      /* A global function definition.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_BLOCK;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &global_symbols);      goto process_function_types;    case 'G':      /* For a class G (global) symbol, it appears that the         value is not correct.  It is necessary to search for the         corresponding linker definition to find the value.         These definitions appear at the end of the namelist.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_STATIC;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      /* Don't add symbol references to global_sym_chain.         Symbol references don't have valid names and wont't match up with         minimal symbols when the global_sym_chain is relocated.         We'll fixup symbol references when we fixup the defining symbol.  */      if (DEPRECATED_SYMBOL_NAME (sym) && DEPRECATED_SYMBOL_NAME (sym)[0] != '#')	{	  i = hashname (DEPRECATED_SYMBOL_NAME (sym));	  SYMBOL_VALUE_CHAIN (sym) = global_sym_chain[i];	  global_sym_chain[i] = sym;	}      add_symbol_to_list (sym, &global_symbols);      break;      /* This case is faked by a conditional above,         when there is no code letter in the dbx data.         Dbx data never actually contains 'l'.  */    case 's':    case 'l':      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_LOCAL;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      break;    case 'p':      if (*p == 'F')	/* pF is a two-letter code that means a function parameter in Fortran.	   The type-number specifies the type of the return value.	   Translate it into a pointer-to-function type.  */	{	  p++;	  SYMBOL_TYPE (sym)	    = lookup_pointer_type	    (lookup_function_type (read_type (&p, objfile)));	}      else	SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_ARG;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      if (TARGET_BYTE_ORDER != BFD_ENDIAN_BIG)	{	  /* On little-endian machines, this crud is never necessary,	     and, if the extra bytes contain garbage, is harmful.  */	  break;	}      /* If it's gcc-compiled, if it says `short', believe it.  */      if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION)	break;      if (!BELIEVE_PCC_PROMOTION)	{	  /* This is the signed type which arguments get promoted to.  */	  static struct type *pcc_promotion_type;	  /* This is the unsigned type which arguments get promoted to.  */	  static struct type *pcc_unsigned_promotion_type;	  /* Call it "int" because this is mainly C lossage.  */	  if (pcc_promotion_type == NULL)	    pcc_promotion_type =	      init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,			 0, "int", NULL);	  if (pcc_unsigned_promotion_type == NULL)	    pcc_unsigned_promotion_type =	      init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,			 TYPE_FLAG_UNSIGNED, "unsigned int", NULL);	  if (BELIEVE_PCC_PROMOTION_TYPE)	    {	      /* This is defined on machines (e.g. sparc) where we	         should believe the type of a PCC 'short' argument,	         but shouldn't believe the address (the address is the	         address of the corresponding int).	         My guess is that this correction, as opposed to	         changing the parameter to an 'int' (as done below,	         for PCC on most machines), is the right thing to do	         on all machines, but I don't want to risk breaking	         something that already works.  On most PCC machines,	         the sparc problem doesn't come up because the calling	         function has to zero the top bytes (not knowing	         whether the called function wants an int or a short),	         so there is little practical difference between an	         int and a short (except perhaps what happens when the	         GDB user types "print short_arg = 0x10000;").	         Hacked for SunOS 4.1 by gnu@cygnus.com.  In 4.1, the	         compiler actually produces the correct address (we	         don't need to fix it up).  I made this code adapt so	         that it will offset the symbol if it was pointing at	         an int-aligned location and not otherwise.  This way	         you can use the same gdb for 4.0.x and 4.1 systems.	         If the parameter is shorter than an int, and is	         integral (e.g. char, short, or unsigned equivalent),	         and is claimed to be passed on an integer boundary,	         don't believe it!  Offset the parameter's address to	         the tail-end of that integer.  */	      if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)		  && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT	      && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (pcc_promotion_type))		{		  SYMBOL_VALUE (sym) += TYPE_LENGTH (pcc_promotion_type)		    - TYPE_LENGTH (SYMBOL_TYPE (sym));		}	      break;	    }	  else	    {	      /* If PCC says a parameter is a short or a char,	         it is really an int.  */	      if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type)		  && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT)		{		  SYMBOL_TYPE (sym) =		    TYPE_UNSIGNED (SYMBOL_TYPE (sym))		    ? pcc_unsigned_promotion_type		    : pcc_promotion_type;		}	      break;	    }	}    case 'P':      /* acc seems to use P to declare the prototypes of functions that         are referenced by this file.  gdb is not prepared to deal         with this extra information.  FIXME, it ought to.  */      if (type == N_FUN)	{	  SYMBOL_TYPE (sym) = read_type (&p, objfile);	  goto process_prototype_types;	}      /*FALLTHROUGH */    case 'R':      /* Parameter which is in a register.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_REGPARM;      SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);      if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)	{	  reg_value_complaint (SYMBOL_VALUE (sym),			       NUM_REGS + NUM_PSEUDO_REGS,			       SYMBOL_PRINT_NAME (sym));	  SYMBOL_VALUE (sym) = SP_REGNUM;	/* Known safe, though useless */	}      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      break;    case 'r':      /* Register variable (either global or local).  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_REGISTER;      SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);      if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)	{	  reg_value_complaint (SYMBOL_VALUE (sym),			       NUM_REGS + NUM_PSEUDO_REGS,			       SYMBOL_PRINT_NAME (sym));	  SYMBOL_VALUE (sym) = SP_REGNUM;	/* Known safe, though useless */	}      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      if (within_function)	{	  /* Sun cc uses a pair of symbols, one 'p' and one 'r', with	     the same name to represent an argument passed in a	     register.  GCC uses 'P' for the same case.  So if we find	     such a symbol pair we combine it into one 'P' symbol.	     For Sun cc we need to do this regardless of	     stabs_argument_has_addr, because the compiler puts out	     the 'p' symbol even if it never saves the argument onto	     the stack.	     On most machines, we want to preserve both symbols, so	     that we can still get information about what is going on	     with the stack (VAX for computing args_printed, using	     stack slots instead of saved registers in backtraces,	     etc.).	     Note that this code illegally combines	     main(argc) struct foo argc; { register struct foo argc; }	     but this case is considered pathological and causes a warning	     from a decent compiler.  */	  if (local_symbols	      && local_symbols->nsyms > 0	      && gdbarch_stabs_argument_has_addr (current_gdbarch,						  SYMBOL_TYPE (sym)))	    {	      struct symbol *prev_sym;	      prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];	      if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG		   || SYMBOL_CLASS (prev_sym) == LOC_ARG)		  && strcmp (DEPRECATED_SYMBOL_NAME (prev_sym),			     DEPRECATED_SYMBOL_NAME (sym)) == 0)		{		  SYMBOL_CLASS (prev_sym) = LOC_REGPARM;		  /* Use the type from the LOC_REGISTER; that is the type		     that is actually in that register.  */		  SYMBOL_TYPE (prev_sym) = SYMBOL_TYPE (sym);		  SYMBOL_VALUE (prev_sym) = SYMBOL_VALUE (sym);		  sym = prev_sym;		  break;		}	    }	  add_symbol_to_list (sym, &local_symbols);	}      else	add_symbol_to_list (sym, &file_symbols);      break;    case 'S':      /* Static symbol at top level of file */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_STATIC;      SYMBOL_VALUE_ADDRESS (sym) = valu;#ifdef STATIC_TRANSFORM_NAME      if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)))	{	  struct minimal_symbol *msym;	  msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile);	  if (msym != NULL)	    {	      DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym));	      SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);	    }	}#endif      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &file_symbols);      break;    case 't':      /* Typedef */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      /* For a nameless type, we don't want a create a symbol, thus we         did not use `sym'. Return without further processing. */      if (nameless)	return NULL;      SYMBOL_CLASS (sym) = LOC_TYPEDEF;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      /* C++ vagaries: we may have a type which is derived from         a base type which did not have its name defined when the         derived class was output.  We fill in the derived class's         base part member's name here in that case.  */      if (TYPE_NAME (SYMBOL_TYPE (sym)) != NULL)	if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT	     || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION)	    && TYPE_N_BASECLASSES (SYMBOL_TYPE (sym)))	  {	    int j;	    for (j = TYPE_N_BASECLASSES (SYMBOL_TYPE (sym)) - 1; j >= 0; j--)	      if (TYPE_BASECLASS_NAME (SYMBOL_TYPE (sym), j) == 0)		TYPE_BASECLASS_NAME (SYMBOL_TYPE (sym), j) =		  type_name_no_tag (TYPE_BASECLASS (SYMBOL_TYPE (sym), j));	  }      if (TYPE_NAME (SYMBOL_TYPE (sym)) == NULL)	{	  /* gcc-2.6 or later (when using -fvtable-thunks)	     emits a unique named type for a vtable entry.	     Some gdb code depends on that specific name. */	  extern const char vtbl_ptr_name[];	  if ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR	       && strcmp (DEPRECATED_SYMBOL_NAME (sym), vtbl_ptr_name))	      || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_FUNC)	    {	      /* If we are giving a name to a type such as "pointer to	         foo" or "function returning foo", we better not set	         the TYPE_NAME.  If the program contains "typedef char	         *caddr_t;", we don't want all variables of type char	         * to print as caddr_t.  This is not just a	         consequence of GDB's type management; PCC and GCC (at	         least through version 2.4) both output variables of	         either type char * or caddr_t with the type number	         defined in the 't' symbol for caddr_t.  If a future	         compiler cleans this up it GDB is not ready for it	         yet, but if it becomes ready we somehow need to	         disable this check (without breaking the PCC/GCC2.4	         case).	         Sigh.	         Fortunately, this check seems not to be necessary	         for anything except pointers or functions.  */              /* ezannoni: 2000-10-26. This seems to apply for		 versions of gcc older than 2.8. This was the original		 problem: with the following code gdb would tell that		 the type for name1 is caddr_t, and func is char()	         typedef char *caddr_t;		 char *name2;		 struct x		 {		 char *name1;		 } xx;		 char *func()		 {		 }		 main () {}		 */	      /* Pascal accepts names for pointer types. */	      if (current_subfile->language == language_pascal)		{		  TYPE_NAME (SYMBOL_TYPE (sym)) = DEPRECATED_SYMBOL_NAME (sym);          	}	    }	  else	    TYPE_NAME (SYMBOL_TYPE (sym)) = DEPRECATED_SYMBOL_NAME (sym);	}      add_symbol_to_list (sym, &file_symbols);      break;    case 'T':      /* Struct, union, or enum tag.  For GNU C++, this can be be followed         by 't' which means we are typedef'ing it as well.  */      synonym = *p == 't';      if (synonym)	p++;      SYMBOL_TYPE (sym) = read_type (&p, objfile);       /* For a nameless type, we don't want a create a symbol, thus we         did not use `sym'. Return without further processing. */      if (nameless)	return NULL;      SYMBOL_CLASS (sym) = LOC_TYPEDEF;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;      if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)	TYPE_TAG_NAME (SYMBOL_TYPE (sym))	  = obconcat (&objfile->objfile_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));      add_symbol_to_list (sym, &file_symbols);      if (synonym)	{	  /* Clone the sym and then modify it. */	  struct symbol *typedef_sym = (struct symbol *)	  obstack_alloc (&objfile->objfile_obstack, sizeof (struct symbol));	  *typedef_sym = *sym;	  SYMBOL_CLASS (typedef_sym) = LOC_TYPEDEF;	  SYMBOL_VALUE (typedef_sym) = valu;	  SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN;	  if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)	    TYPE_NAME (SYMBOL_TYPE (sym))	      = obconcat (&objfile->objfile_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));	  add_symbol_to_list (typedef_sym, &file_symbols);	}      break;    case 'V':      /* Static symbol of local scope */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_STATIC;      SYMBOL_VALUE_ADDRESS (sym) = valu;#ifdef STATIC_TRANSFORM_NAME      if (IS_STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym)))	{	  struct minimal_symbol *msym;	  msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, objfile);	  if (msym != NULL)	    {	      DEPRECATED_SYMBOL_NAME (sym) = STATIC_TRANSFORM_NAME (DEPRECATED_SYMBOL_NAME (sym));	      SYMBOL_VALUE_ADDRESS (sym) = SYMBOL_VALUE_ADDRESS (msym);	    }	}#endif      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;	add_symbol_to_list (sym, &local_symbols);      break;    case 'v':      /* Reference parameter */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_REF_ARG;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      break;    case 'a':      /* Reference parameter which is in a register.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;      SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);      if (SYMBOL_VALUE (sym) >= NUM_REGS + NUM_PSEUDO_REGS)	{	  reg_value_complaint (SYMBOL_VALUE (sym),			       NUM_REGS + NUM_PSEUDO_REGS,			       SYMBOL_PRINT_NAME (sym));	  SYMBOL_VALUE (sym) = SP_REGNUM;	/* Known safe, though useless */	}      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      break;    case 'X':      /* This is used by Sun FORTRAN for "function result value".         Sun claims ("dbx and dbxtool interfaces", 2nd ed)         that Pascal uses it too, but when I tried it Pascal used         "x:3" (local symbol) instead.  */      SYMBOL_TYPE (sym) = read_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_LOCAL;      SYMBOL_VALUE (sym) = valu;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &local_symbols);      break;    default:      SYMBOL_TYPE (sym) = error_type (&p, objfile);      SYMBOL_CLASS (sym) = LOC_CONST;      SYMBOL_VALUE (sym) = 0;      SYMBOL_DOMAIN (sym) = VAR_DOMAIN;      add_symbol_to_list (sym, &file_symbols);      break;    }  /* Some systems pass variables of certain types by reference instead     of by value, i.e. they will pass the address of a structure (in a     register or on the stack) instead of the structure itself.  */  if (gdbarch_stabs_argument_has_addr (current_gdbarch, SYMBOL_TYPE (sym))      && (SYMBOL_CLASS (sym) == LOC_REGPARM || SYMBOL_CLASS (sym) == LOC_ARG))    {      /* We have to convert LOC_REGPARM to LOC_REGPARM_ADDR (for         variables passed in a register).  */      if (SYMBOL_CLASS (sym) == LOC_REGPARM)	SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;      /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th	 and subsequent arguments on SPARC, for example).  */      else if (SYMBOL_CLASS (sym) == LOC_ARG)	SYMBOL_CLASS (sym) = LOC_REF_ARG;    }  return sym;}