diff options
Diffstat (limited to 'gdb/mt-tdep.c')
-rw-r--r-- | gdb/mt-tdep.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c index da6e99c..0a78f0f 100644 --- a/gdb/mt-tdep.c +++ b/gdb/mt-tdep.c @@ -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; |