Code reshuffle.
	* gdb-gdb.py (StructMainTypePrettyPrinter): Change
	TYPE_SPECIFIC_CALLING_CONVENTION to TYPE_SPECIFIC_FUNC.  Move
	calling_convention under func_stuff there.
	* gdbtypes.c (make_function_type): Call INIT_FUNC_SPECIFIC.
	(init_type) <TYPE_CODE_FUNC>: Likewise.
	(recursive_dump_type): Change TYPE_SPECIFIC_CALLING_CONVENTION to
	TYPE_SPECIFIC_FUNC.  New comment for tail_call_list.
	* gdbtypes.h (enum type_specific_kind): Change
	TYPE_SPECIFIC_CALLING_CONVENTION to TYPE_SPECIFIC_FUNC.
	(struct main_type) <type_specific>: Change calling_convention to
	func_stuff.  Move calling_convention to ...
	(struct func_type): ... this new struct.
	(INIT_FUNC_SPECIFIC): New #define.
	(TYPE_CALLING_CONVENTION): Change calling_convention to func_stuff.
This commit is contained in:
Jan Kratochvil
2011-10-09 19:10:52 +00:00
parent 181cebd4f8
commit b6cdc2c1b5
4 changed files with 45 additions and 10 deletions

View File

@ -450,6 +450,8 @@ make_function_type (struct type *type, struct type **typeptr)
TYPE_LENGTH (ntype) = 1;
TYPE_CODE (ntype) = TYPE_CODE_FUNC;
INIT_FUNC_SPECIFIC (ntype);
return ntype;
}
@ -1951,7 +1953,7 @@ init_type (enum type_code code, int length, int flags,
TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FLOATFORMAT;
break;
case TYPE_CODE_FUNC:
TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_CALLING_CONVENTION;
INIT_FUNC_SPECIFIC (type);
break;
}
return type;
@ -3257,9 +3259,10 @@ recursive_dump_type (struct type *type, int spaces)
puts_filtered ("\n");
break;
case TYPE_SPECIFIC_CALLING_CONVENTION:
case TYPE_SPECIFIC_FUNC:
printfi_filtered (spaces, "calling_convention %d\n",
TYPE_CALLING_CONVENTION (type));
/* tail_call_list is not printed. */
break;
}