* buildsym.c (finish_block): If finishing a function without known

parameter type info, set that from parameter symbols.
	* c-typeprint.c (c_type_print_varspec_suffix):  For TYPE_CODE_FUNC,
	print parameter types, if available.
	* ch-typeprint.c (chill_type_print_base):  Likewise.

	* gdbtypes.h (struct type):  Remove function type field.
	(TYPE_FUNCTION_TYPE):  Remove macro.  We can't as simply re-use
	function types now that we're also storing parameter types.
	And the payoff is much less.
	* gdbtypes.c (make_function_type):  Don't use/set TYPE_FUNCTION_TYPE.
	(recursive_dump_type):  Don't print TYPE_FUNCTION_TYPE.
	* dwarfread.c (read_subroutine_type):  Don't set TYPE_FUNCTION_TYPE.
This commit is contained in:
Per Bothner 1995-02-12 18:46:45 +00:00
parent c44c67b5ae
commit 27202b6a47
7 changed files with 92 additions and 29 deletions

View file

@ -226,17 +226,6 @@ make_function_type (type, typeptr)
register struct type *ntype; /* New type */
struct objfile *objfile;
ntype = TYPE_FUNCTION_TYPE (type);
if (ntype)
if (typeptr == 0)
return ntype; /* Don't care about alloc, and have new type. */
else if (*typeptr == 0)
{
*typeptr = ntype; /* Tracking alloc, and we have new type. */
return ntype;
}
if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */
{
ntype = alloc_type (TYPE_OBJFILE (type));
@ -252,14 +241,10 @@ make_function_type (type, typeptr)
}
TYPE_TARGET_TYPE (ntype) = type;
TYPE_FUNCTION_TYPE (type) = ntype;
TYPE_LENGTH (ntype) = 1;
TYPE_CODE (ntype) = TYPE_CODE_FUNC;
if (!TYPE_FUNCTION_TYPE (type)) /* Remember it, if don't have one. */
TYPE_FUNCTION_TYPE (type) = ntype;
return ntype;
}
@ -1444,9 +1429,6 @@ recursive_dump_type (type, spaces)
printfi_filtered (spaces, "reference_type ");
gdb_print_address (TYPE_REFERENCE_TYPE (type), gdb_stdout);
printf_filtered ("\n");
printfi_filtered (spaces, "function_type ");
gdb_print_address (TYPE_FUNCTION_TYPE (type), gdb_stdout);
printf_filtered ("\n");
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
if (TYPE_FLAGS (type) & TYPE_FLAG_UNSIGNED)
{