diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:20:50 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:20:50 +0000 |
commit | fde6c81990c82b00f737cec2d781458de2ac84e1 (patch) | |
tree | 73bdf87cc47981432c3844665086f52145d9cf1b /gdb/mt-tdep.c | |
parent | d4dbb9c7d4ddc39cb0affb783515944bdf8cce68 (diff) | |
download | gdb-fde6c81990c82b00f737cec2d781458de2ac84e1.zip gdb-fde6c81990c82b00f737cec2d781458de2ac84e1.tar.gz gdb-fde6c81990c82b00f737cec2d781458de2ac84e1.tar.bz2 |
* 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.
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; |