From: John Gilmore Date: Thu, 19 Sep 1991 22:39:39 +0000 (+0000) Subject: * mipsread.c (_initialize_mipsread): Avoid using X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5fa3486b1f6c07fe76f9473abcbcc35f994994f;p=binutils-gdb.git * mipsread.c (_initialize_mipsread): Avoid using builtin_type_void at initialize time. (mipscoff_symfile_read): use it now. --- diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 371c92419da..7083d3dc9d6 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -249,6 +249,9 @@ mipscoff_symfile_read(sf, addr, mainline) int symtab_offset; int stringtab_offset; + /* Initialize a variable that we couldn't do at _initialize_ time. */ + builtin_type_ptr = lookup_pointer_type (builtin_type_void); + /* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */ desc = fileno ((FILE *)(abfd->iostream)); /* Raw file descriptor */ /* End of warning */ @@ -2789,10 +2792,13 @@ _initialize_mipsread () 0, "floating_decimal"); /* Templates types */ - builtin_type_ptr = lookup_pointer_type (builtin_type_void); builtin_type_struct = make_type(TYPE_CODE_STRUCT, 0, 0, 0); builtin_type_union = make_type(TYPE_CODE_UNION, 0, 0, 0); builtin_type_enum = make_type(TYPE_CODE_ENUM, 0, 0, 0); builtin_type_range = make_type(TYPE_CODE_RANGE, 0, 0, 0); builtin_type_set = make_type(TYPE_CODE_SET, 0, 0, 0); + + /* We can't do this now because builtin_type_void may not + be set yet. Do it at symbol reading time. */ + /* builtin_type_ptr = lookup_pointer_type (builtin_type_void); */ }