* gdbtypes.h (builtin_type_void): Remove macro, add declaration.

(builtin_type_f_void): Remove macro.
	* gdbtypes.c (builtin_type_void): New global variable.
	(_initialize_gdbtypes): Initialize it.

	* gnu-v3-abi.c (build_gdb_vtable_type): Do not call
	lookup_pointer_type or lookup_function_type on builtin_type_void.
	* printcmd.c (set_next_address): Likewise.
	* objc-lang.c (value_nsstring): Likewise.
	* mt-tdep.c (mt_copro_register_type): Likewise.
	* xtensa-tdep.c (xtensa_register_type): Likewise.

	* symfile.c (syms_from_objfile): Remove special handling
	of builtin_type_void and builtin_type_char.
This commit is contained in:
Ulrich Weigand
2008-09-11 14:20:50 +00:00
parent d4dbb9c7d4
commit fde6c81990
9 changed files with 39 additions and 29 deletions

View File

@@ -251,19 +251,13 @@ mt_copro_register_type (struct gdbarch *arch, int regnum)
static struct type *
mt_register_type (struct gdbarch *arch, int regnum)
{
static struct type *void_func_ptr = NULL;
static struct type *void_ptr = NULL;
static struct type *copro_type;
static struct type *copro_type = NULL;
if (regnum >= 0 && regnum < MT_NUM_REGS + MT_NUM_PSEUDO_REGS)
{
if (void_func_ptr == NULL)
if (copro_type == NULL)
{
struct type *temp;
void_ptr = lookup_pointer_type (builtin_type_void);
void_func_ptr =
lookup_pointer_type (lookup_function_type (builtin_type_void));
temp = create_range_type (NULL, builtin_type_unsigned_int, 0, 1);
copro_type = create_array_type (NULL, builtin_type_int16, temp);
}
@@ -272,10 +266,10 @@ mt_register_type (struct gdbarch *arch, int regnum)
case MT_PC_REGNUM:
case MT_RA_REGNUM:
case MT_IRA_REGNUM:
return void_func_ptr;
return builtin_type (arch)->builtin_func_ptr;
case MT_SP_REGNUM:
case MT_FP_REGNUM:
return void_ptr;
return builtin_type (arch)->builtin_data_ptr;
case MT_COPRO_REGNUM:
case MT_COPRO_PSEUDOREG_REGNUM:
return copro_type;