From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 4602E385B52E; Sat, 18 Mar 2023 17:20:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4602E385B52E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679160042; bh=7Kvjn3no1PzDt4PQsRRoTs7n63ArLQykn3WSMA/yFr4=; h=From:To:Subject:Date:From; b=WMLLO/cK+6NSaMiBHayUgj4fKObarPE9sc06GN0suIwk8vTtw2NoeVceh9CyGABRP a9cLIhbB+jCFF1oOxQz5IHoBwnXYbDrr5CJY2gG0w12NgLhIEhkB3jrX4YLBSZUy/S LJZSMW3jOT3S6Oy+d3G3ASTBFxj/wVSIOZv8NDpU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Rename objfile_type to builtin_type X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 426e5b66a738f4de185410a3e47a61423e0a7bdf X-Git-Newrev: a8ed3dde8340e591043b7e7044d25ff92405993e Message-Id: <20230318172042.4602E385B52E@sourceware.org> Date: Sat, 18 Mar 2023 17:20:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da8ed3dde8340= e591043b7e7044d25ff92405993e commit a8ed3dde8340e591043b7e7044d25ff92405993e Author: Tom Tromey Date: Sat Mar 11 09:39:58 2023 -0700 Rename objfile_type to builtin_type =20 This renames objfile_type to be an overload of builtin_type, in preparation for their unification. =20 Reviewed-By: Simon Marchi Diff: --- gdb/coffread.c | 34 +++++++++++++++++----------------- gdb/compile/compile-c-symbols.c | 10 +++++----- gdb/compile/compile-cplus-symbols.c | 10 +++++----- gdb/ctfread.c | 18 +++++++++--------- gdb/dwarf2/cu.c | 2 +- gdb/dwarf2/read.c | 16 ++++++++-------- gdb/gdbtypes.c | 2 +- gdb/gdbtypes.h | 2 +- gdb/mdebugread.c | 24 ++++++++++++------------ gdb/objfiles.c | 4 ++-- gdb/parse.c | 12 ++++++------ gdb/stabsread.c | 26 +++++++++++++------------- gdb/xcoffread.c | 4 ++-- 13 files changed, 82 insertions(+), 82 deletions(-) diff --git a/gdb/coffread.c b/gdb/coffread.c index be31144639d..e993b17db09 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1779,7 +1779,7 @@ decode_type (struct coff_symbol *cs, unsigned int c_t= ype, *dim =3D 0; =20 base_type =3D decode_type (cs, new_c_type, aux, objfile); - index_type =3D objfile_type (objfile)->builtin_int; + index_type =3D builtin_type (objfile)->builtin_int; type_allocator alloc (objfile); range_type =3D create_static_range_type (alloc, index_type, 0, n - 1); @@ -1846,39 +1846,39 @@ decode_base_type (struct coff_symbol *cs, { case T_NULL: /* Shows up with "void (*foo)();" structure members. */ - return objfile_type (objfile)->builtin_void; + return builtin_type (objfile)->builtin_void; =20 #ifdef T_VOID case T_VOID: /* Intel 960 COFF has this symbol and meaning. */ - return objfile_type (objfile)->builtin_void; + return builtin_type (objfile)->builtin_void; #endif =20 case T_CHAR: - return objfile_type (objfile)->builtin_char; + return builtin_type (objfile)->builtin_char; =20 case T_SHORT: - return objfile_type (objfile)->builtin_short; + return builtin_type (objfile)->builtin_short; =20 case T_INT: - return objfile_type (objfile)->builtin_int; + return builtin_type (objfile)->builtin_int; =20 case T_LONG: if (cs->c_sclass =3D=3D C_FIELD && aux->x_sym.x_misc.x_lnsz.x_size > gdbarch_long_bit (gdbarch)) - return objfile_type (objfile)->builtin_long_long; + return builtin_type (objfile)->builtin_long_long; else - return objfile_type (objfile)->builtin_long; + return builtin_type (objfile)->builtin_long; =20 case T_FLOAT: - return objfile_type (objfile)->builtin_float; + return builtin_type (objfile)->builtin_float; =20 case T_DOUBLE: - return objfile_type (objfile)->builtin_double; + return builtin_type (objfile)->builtin_double; =20 case T_LNGDBL: - return objfile_type (objfile)->builtin_long_double; + return builtin_type (objfile)->builtin_long_double; =20 case T_STRUCT: if (cs->c_naux !=3D 1) @@ -1947,24 +1947,24 @@ decode_base_type (struct coff_symbol *cs, break; =20 case T_UCHAR: - return objfile_type (objfile)->builtin_unsigned_char; + return builtin_type (objfile)->builtin_unsigned_char; =20 case T_USHORT: - return objfile_type (objfile)->builtin_unsigned_short; + return builtin_type (objfile)->builtin_unsigned_short; =20 case T_UINT: - return objfile_type (objfile)->builtin_unsigned_int; + return builtin_type (objfile)->builtin_unsigned_int; =20 case T_ULONG: if (cs->c_sclass =3D=3D C_FIELD && aux->x_sym.x_misc.x_lnsz.x_size > gdbarch_long_bit (gdbarch)) - return objfile_type (objfile)->builtin_unsigned_long_long; + return builtin_type (objfile)->builtin_unsigned_long_long; else - return objfile_type (objfile)->builtin_unsigned_long; + return builtin_type (objfile)->builtin_unsigned_long; } complaint (_("Unexpected type for symbol %s"), cs->c_name); - return objfile_type (objfile)->builtin_void; + return builtin_type (objfile)->builtin_void; } =0C /* This page contains subroutines of read_type. */ diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbol= s.c index c47af4a3ab0..0449c37099e 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -279,12 +279,12 @@ convert_symbol_bmsym (compile_c_instance *context, case mst_text: case mst_file_text: case mst_solib_trampoline: - type =3D objfile_type (objfile)->nodebug_text_symbol; + type =3D builtin_type (objfile)->nodebug_text_symbol; kind =3D GCC_C_SYMBOL_FUNCTION; break; =20 case mst_text_gnu_ifunc: - type =3D objfile_type (objfile)->nodebug_text_gnu_ifunc_symbol; + type =3D builtin_type (objfile)->nodebug_text_gnu_ifunc_symbol; kind =3D GCC_C_SYMBOL_FUNCTION; addr =3D gnu_ifunc_resolve_addr (target_gdbarch (), addr); break; @@ -293,17 +293,17 @@ convert_symbol_bmsym (compile_c_instance *context, case mst_file_data: case mst_bss: case mst_file_bss: - type =3D objfile_type (objfile)->nodebug_data_symbol; + type =3D builtin_type (objfile)->nodebug_data_symbol; kind =3D GCC_C_SYMBOL_VARIABLE; break; =20 case mst_slot_got_plt: - type =3D objfile_type (objfile)->nodebug_got_plt_symbol; + type =3D builtin_type (objfile)->nodebug_got_plt_symbol; kind =3D GCC_C_SYMBOL_FUNCTION; break; =20 default: - type =3D objfile_type (objfile)->nodebug_unknown_symbol; + type =3D builtin_type (objfile)->nodebug_unknown_symbol; kind =3D GCC_C_SYMBOL_VARIABLE; break; } diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplu= s-symbols.c index 02b7b898a64..5e504ac839d 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -291,14 +291,14 @@ convert_symbol_bmsym (compile_cplus_instance *instanc= e, case mst_text: case mst_file_text: case mst_solib_trampoline: - type =3D objfile_type (objfile)->nodebug_text_symbol; + type =3D builtin_type (objfile)->nodebug_text_symbol; kind =3D GCC_CP_SYMBOL_FUNCTION; break; =20 case mst_text_gnu_ifunc: /* nodebug_text_gnu_ifunc_symbol would cause: function return type cannot be function */ - type =3D objfile_type (objfile)->nodebug_text_symbol; + type =3D builtin_type (objfile)->nodebug_text_symbol; kind =3D GCC_CP_SYMBOL_FUNCTION; addr =3D gnu_ifunc_resolve_addr (target_gdbarch (), addr); break; @@ -307,17 +307,17 @@ convert_symbol_bmsym (compile_cplus_instance *instanc= e, case mst_file_data: case mst_bss: case mst_file_bss: - type =3D objfile_type (objfile)->nodebug_data_symbol; + type =3D builtin_type (objfile)->nodebug_data_symbol; kind =3D GCC_CP_SYMBOL_VARIABLE; break; =20 case mst_slot_got_plt: - type =3D objfile_type (objfile)->nodebug_got_plt_symbol; + type =3D builtin_type (objfile)->nodebug_got_plt_symbol; kind =3D GCC_CP_SYMBOL_FUNCTION; break; =20 default: - type =3D objfile_type (objfile)->nodebug_unknown_symbol; + type =3D builtin_type (objfile)->nodebug_unknown_symbol; kind =3D GCC_CP_SYMBOL_VARIABLE; break; } diff --git a/gdb/ctfread.c b/gdb/ctfread.c index d1a57d77a50..42f2da7a88f 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -410,7 +410,7 @@ ctf_add_member_cb (const char *name, if (t =3D=3D nullptr) { complaint (_("ctf_add_member_cb: %s has NO type (%ld)"), name, tid); - t =3D objfile_type (ccp->of)->builtin_error; + t =3D builtin_type (ccp->of)->builtin_error; set_tid_type (ccp->of, tid, t); } } @@ -501,7 +501,7 @@ new_symbol (struct ctf_context *ccp, struct type *type,= ctf_id_t tid) break; case CTF_K_CONST: if (sym->type ()->code () =3D=3D TYPE_CODE_VOID) - sym->set_type (objfile_type (objfile)->builtin_int); + sym->set_type (builtin_type (objfile)->builtin_int); break; case CTF_K_TYPEDEF: case CTF_K_INTEGER: @@ -717,7 +717,7 @@ read_func_kind_type (struct ctf_context *ccp, ctf_id_t = tid) =20 type->set_fields ((struct field *) TYPE_ZALLOC (type, argc * sizeof (struct field))); - struct type *void_type =3D objfile_type (of)->builtin_void; + struct type *void_type =3D builtin_type (of)->builtin_void; /* If failed to find the argument type, fill it with void_type. */ for (int iparam =3D 0; iparam < argc; iparam++) { @@ -829,7 +829,7 @@ read_array_type (struct ctf_context *ccp, ctf_id_t tid) =20 idx_type =3D fetch_tid_type (ccp, ar.ctr_index); if (idx_type =3D=3D nullptr) - idx_type =3D objfile_type (objfile)->builtin_int; + idx_type =3D builtin_type (objfile)->builtin_int; =20 type_allocator alloc (objfile); range_type =3D create_static_range_type (alloc, idx_type, 0, ar.ctr_nele= ms - 1); @@ -863,7 +863,7 @@ read_const_type (struct ctf_context *ccp, ctf_id_t tid,= ctf_id_t btid) if (base_type =3D=3D nullptr) { complaint (_("read_const_type: NULL base type (%ld)"), btid); - base_type =3D objfile_type (objfile)->builtin_error; + base_type =3D builtin_type (objfile)->builtin_error; } } cv_type =3D make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); @@ -887,7 +887,7 @@ read_volatile_type (struct ctf_context *ccp, ctf_id_t t= id, ctf_id_t btid) if (base_type =3D=3D nullptr) { complaint (_("read_volatile_type: NULL base type (%ld)"), btid); - base_type =3D objfile_type (objfile)->builtin_error; + base_type =3D builtin_type (objfile)->builtin_error; } } =20 @@ -913,7 +913,7 @@ read_restrict_type (struct ctf_context *ccp, ctf_id_t t= id, ctf_id_t btid) if (base_type =3D=3D nullptr) { complaint (_("read_restrict_type: NULL base type (%ld)"), btid); - base_type =3D objfile_type (objfile)->builtin_error; + base_type =3D builtin_type (objfile)->builtin_error; } } cv_type =3D make_restrict_type (base_type); @@ -959,7 +959,7 @@ read_pointer_type (struct ctf_context *ccp, ctf_id_t ti= d, ctf_id_t btid) if (target_type =3D=3D nullptr) { complaint (_("read_pointer_type: NULL target type (%ld)"), btid); - target_type =3D objfile_type (ccp->of)->builtin_error; + target_type =3D builtin_type (ccp->of)->builtin_error; } } =20 @@ -1167,7 +1167,7 @@ ctf_add_var_cb (const char *name, ctf_id_t id, void *= arg) if (type =3D=3D nullptr) { complaint (_("ctf_add_var_cb: %s has NO type (%ld)"), name, id); - type =3D objfile_type (ccp->of)->builtin_error; + type =3D builtin_type (ccp->of)->builtin_error; } sym =3D new (&ccp->of->objfile_obstack) symbol; OBJSTAT (ccp->of, n_syms++); diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c index 9c1691c90e9..89de40daab0 100644 --- a/gdb/dwarf2/cu.c +++ b/gdb/dwarf2/cu.c @@ -107,7 +107,7 @@ struct type * dwarf2_cu::addr_type () const { struct objfile *objfile =3D this->per_objfile->objfile; - struct type *void_type =3D objfile_type (objfile)->builtin_void; + struct type *void_type =3D builtin_type (objfile)->builtin_void; struct type *addr_type =3D lookup_pointer_type (void_type); int addr_size =3D this->per_cu->addr_size (); =20 diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index e1ae98fe910..3fc23e2d43f 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -13655,7 +13655,7 @@ read_array_type (struct die_info *die, struct dwarf= 2_cu *cu) arrays with unspecified length. */ if (die->child =3D=3D NULL) { - index_type =3D objfile_type (objfile)->builtin_int; + index_type =3D builtin_type (objfile)->builtin_int; type_allocator alloc (objfile); range_type =3D create_static_range_type (alloc, index_type, 0, -1); type =3D create_array_type_with_stride (alloc, element_type, range_t= ype, @@ -14006,7 +14006,7 @@ read_common_block (struct die_info *die, struct dwa= rf2_cu *cu) } } =20 - sym =3D new_symbol (die, objfile_type (objfile)->builtin_void, cu); + sym =3D new_symbol (die, builtin_type (objfile)->builtin_void, cu); sym->set_value_common_block (common_block); } } @@ -14499,7 +14499,7 @@ read_tag_string_type (struct die_info *die, struct = dwarf2_cu *cu) length =3D 1; } =20 - index_type =3D objfile_type (objfile)->builtin_int; + index_type =3D builtin_type (objfile)->builtin_int; type_allocator alloc (objfile); if (length_is_constant) range_type =3D create_static_range_type (alloc, index_type, 1, length); @@ -14604,7 +14604,7 @@ read_subroutine_type (struct die_info *die, struct = dwarf2_cu *cu) =20 if (die->child !=3D NULL) { - struct type *void_type =3D objfile_type (objfile)->builtin_void; + struct type *void_type =3D builtin_type (objfile)->builtin_void; struct die_info *child_die; int nparams, iparams; =20 @@ -15039,7 +15039,7 @@ dwarf2_init_integer_type (struct dwarf2_cu *cu, str= uct objfile *objfile, at least versions 14, 17, and 18. */ if (bits =3D=3D 0 && producer_is_icc (cu) && name !=3D nullptr && strcmp (name, "void") =3D=3D 0) - type =3D objfile_type (objfile)->builtin_void; + type =3D builtin_type (objfile)->builtin_void; else { type_allocator alloc (objfile); @@ -18882,7 +18882,7 @@ new_symbol (struct die_info *die, struct type *type= , struct dwarf2_cu *cu, } else sym->set_aclass_index (LOC_OPTIMIZED_OUT); - sym->set_type (objfile_type (objfile)->builtin_core_addr); + sym->set_type (builtin_type (objfile)->builtin_core_addr); sym->set_domain (LABEL_DOMAIN); add_symbol_to_list (sym, cu->list_in_scope); break; @@ -18925,7 +18925,7 @@ new_symbol (struct die_info *die, struct type *type= , struct dwarf2_cu *cu, variables with missing type entries. Change the misleading `void' type to something sensible. */ if (sym->type ()->code () =3D=3D TYPE_CODE_VOID) - sym->set_type (objfile_type (objfile)->builtin_int); + sym->set_type (builtin_type (objfile)->builtin_int); =20 attr =3D dwarf2_attr (die, DW_AT_const_value, cu); /* In the case of DW_TAG_member, we should only be called for @@ -19392,7 +19392,7 @@ die_type (struct die_info *die, struct dwarf2_cu *c= u) { struct objfile *objfile =3D cu->per_objfile->objfile; /* A missing DW_AT_type represents a void type. */ - return objfile_type (objfile)->builtin_void; + return builtin_type (objfile)->builtin_void; } =20 return lookup_die_type (die, type_attr, cu); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 6f206d8b050..d45452ecefe 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -6084,7 +6084,7 @@ static const registry::keysc) || sh->sc =3D=3D scNil || sh->index =3D=3D indexNil) - s->set_type (objfile_type (objfile)->nodebug_data_symbol); + s->set_type (builtin_type (objfile)->nodebug_data_symbol); else s->set_type (parse_type (cur_fd, ax, sh->index, 0, bigend, name)); /* Value of a data symbol is its memory address. */ @@ -715,7 +715,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh= , int bigend, s->set_aclass_index (LOC_LABEL); /* but not misused. */ s->set_section_index (section_index); s->set_value_address (sh->value); - s->set_type (objfile_type (objfile)->builtin_int); + s->set_type (builtin_type (objfile)->builtin_int); add_symbol (s, top_stack->cur_st, top_stack->cur_block); break; =20 @@ -758,7 +758,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh= , int bigend, s->set_section_index (section_index); /* Type of the return value. */ if (SC_IS_UNDEF (sh->sc) || sh->sc =3D=3D scNil) - t =3D objfile_type (objfile)->builtin_int; + t =3D builtin_type (objfile)->builtin_int; else { t =3D parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name); @@ -1167,7 +1167,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_= sh, int bigend, s =3D new_symbol (MDEBUG_EFI_SYMBOL_NAME); s->set_domain (LABEL_DOMAIN); s->set_aclass_index (LOC_CONST); - s->set_type (objfile_type (mdebugread_objfile)->builtin_void); + s->set_type (builtin_type (mdebugread_objfile)->builtin_void); e =3D OBSTACK_ZALLOC (&mdebugread_objfile->objfile_obstack, mdebug_extra_func_info); s->set_value_bytes ((gdb_byte *) e); @@ -1391,12 +1391,12 @@ basic_type (int bt, struct objfile *objfile) switch (bt) { case btNil: - tp =3D objfile_type (objfile)->builtin_void; + tp =3D builtin_type (objfile)->builtin_void; break; =20 case btAdr: tp =3D init_pointer_type (alloc, 32, "adr_32", - objfile_type (objfile)->builtin_void); + builtin_type (objfile)->builtin_void); break; =20 case btChar: @@ -1470,7 +1470,7 @@ basic_type (int bt, struct objfile *objfile) break; =20 case btVoid: - tp =3D objfile_type (objfile)->builtin_void; + tp =3D builtin_type (objfile)->builtin_void; break; =20 case btLong64: @@ -1491,7 +1491,7 @@ basic_type (int bt, struct objfile *objfile) =20 case btAdr64: tp =3D init_pointer_type (alloc, 64, "adr_64", - objfile_type (objfile)->builtin_void); + builtin_type (objfile)->builtin_void); break; =20 case btInt64: @@ -1851,7 +1851,7 @@ upgrade_type (int fd, struct type **tpp, int tq, unio= n aux_ext *ax, int bigend, { complaint (_("illegal array index type for %s, assuming int"), sym_name); - indx =3D objfile_type (mdebugread_objfile)->builtin_int; + indx =3D builtin_type (mdebugread_objfile)->builtin_int; } =20 /* Get the bounds, and create the array type. */ @@ -2003,7 +2003,7 @@ parse_procedure (PDR *pr, struct compunit_symtab *sea= rch_symtab, SYMBOL_CLASS (s) =3D LOC_BLOCK; /* Don't know its type, hope int is ok. */ s->type () - =3D lookup_function_type (objfile_type (pst->objfile)->builtin_int); + =3D lookup_function_type (builtin_type (pst->objfile)->builtin_int); add_symbol (s, top_stack->cur_st, top_stack->cur_block); /* Won't have symbols for this one. */ b =3D new_block (2); @@ -2057,7 +2057,7 @@ parse_procedure (PDR *pr, struct compunit_symtab *sea= rch_symtab, if (processing_gcc_compilation =3D=3D 0 && found_ecoff_debugging_info =3D=3D 0 && s->type ()->target_type ()->code () =3D=3D TYPE_CODE_VOID) - s->set_type (objfile_type (mdebugread_objfile)->nodebug_text_symbol); + s->set_type (builtin_type (mdebugread_objfile)->nodebug_text_symbol); } =20 /* Parse the external symbol ES. Just call parse_symbol() after @@ -3972,7 +3972,7 @@ mdebug_expand_psymtab (legacy_psymtab *pst, struct ob= jfile *objfile) =20 s->set_domain (LABEL_DOMAIN); s->set_aclass_index (LOC_CONST); - s->set_type (objfile_type (objfile)->builtin_void); + s->set_type (builtin_type (objfile)->builtin_void); s->set_value_bytes ((gdb_byte *) e); e->pdr.framereg =3D -1; add_symbol_to_list (s, get_local_symbols ()); diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 21ec8c7ad2e..9caebfefd59 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -1314,8 +1314,8 @@ objfile_int_type (struct objfile *of, int size_in_byt= es, bool unsigned_p) /* Helper macro to examine the various builtin types. */ #define TRY_TYPE(F) \ int_type =3D (unsigned_p \ - ? objfile_type (of)->builtin_unsigned_ ## F \ - : objfile_type (of)->builtin_ ## F); \ + ? builtin_type (of)->builtin_unsigned_ ## F \ + : builtin_type (of)->builtin_ ## F); \ if (int_type !=3D NULL && int_type->length () =3D=3D size_in_bytes) \ return int_type =20 diff --git a/gdb/parse.c b/gdb/parse.c index b2cc6c59fb5..24db3ca57d9 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -142,7 +142,7 @@ find_minsym_type_and_address (minimal_symbol *msymbol, /* Skip translation if caller does not need the address. */ if (address_p !=3D NULL) *address_p =3D target_translate_tls_address (objfile, addr); - return objfile_type (objfile)->nodebug_tls_symbol; + return builtin_type (objfile)->nodebug_tls_symbol; } =20 if (address_p !=3D NULL) @@ -153,22 +153,22 @@ find_minsym_type_and_address (minimal_symbol *msymbol, case mst_text: case mst_file_text: case mst_solib_trampoline: - return objfile_type (objfile)->nodebug_text_symbol; + return builtin_type (objfile)->nodebug_text_symbol; =20 case mst_text_gnu_ifunc: - return objfile_type (objfile)->nodebug_text_gnu_ifunc_symbol; + return builtin_type (objfile)->nodebug_text_gnu_ifunc_symbol; =20 case mst_data: case mst_file_data: case mst_bss: case mst_file_bss: - return objfile_type (objfile)->nodebug_data_symbol; + return builtin_type (objfile)->nodebug_data_symbol; =20 case mst_slot_got_plt: - return objfile_type (objfile)->nodebug_got_plt_symbol; + return builtin_type (objfile)->nodebug_got_plt_symbol; =20 default: - return objfile_type (objfile)->nodebug_unknown_symbol; + return builtin_type (objfile)->nodebug_unknown_symbol; } } =20 diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 89d778db1c2..c3d87033f4f 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -311,7 +311,7 @@ dbx_lookup_type (int typenums[2], struct objfile *objfi= le) warning (_("GDB internal error: bad real_filenum")); =20 error_return: - temp_type =3D objfile_type (objfile)->builtin_error; + temp_type =3D builtin_type (objfile)->builtin_error; return &temp_type; } =20 @@ -798,7 +798,7 @@ define_symbol (CORE_ADDR valu, const char *string, int = desc, int type, gdb_byte *dbl_valu; struct type *dbl_type; =20 - dbl_type =3D objfile_type (objfile)->builtin_double; + dbl_type =3D builtin_type (objfile)->builtin_double; dbl_valu =3D (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, dbl_type->length ()); @@ -819,7 +819,7 @@ define_symbol (CORE_ADDR valu, const char *string, int = desc, int type, types; other languages probably should have at least unsigned as well as signed constants. */ =20 - sym->set_type (objfile_type (objfile)->builtin_long); + sym->set_type (builtin_type (objfile)->builtin_long); sym->set_value_longest (atoi (p)); sym->set_aclass_index (LOC_CONST); } @@ -827,7 +827,7 @@ define_symbol (CORE_ADDR valu, const char *string, int = desc, int type, =20 case 'c': { - sym->set_type (objfile_type (objfile)->builtin_char); + sym->set_type (builtin_type (objfile)->builtin_char); sym->set_value_longest (atoi (p)); sym->set_aclass_index (LOC_CONST); } @@ -880,10 +880,10 @@ define_symbol (CORE_ADDR valu, const char *string, in= t desc, int type, type_allocator alloc (objfile); range_type =3D create_static_range_type (alloc, - objfile_type (objfile)->builtin_int, + builtin_type (objfile)->builtin_int, 0, ind); sym->set_type - (create_array_type (alloc, objfile_type (objfile)->builtin_char, + (create_array_type (alloc, builtin_type (objfile)->builtin_char, range_type)); string_value =3D (gdb_byte *) obstack_alloc (&objfile->objfile_obstack, ind + 1); @@ -1002,7 +1002,7 @@ define_symbol (CORE_ADDR valu, const char *string, in= t desc, int type, it back into builtin_int here. FIXME: Do we need a new builtin_promoted_int_arg ? */ if (ptype->code () =3D=3D TYPE_CODE_VOID) - ptype =3D objfile_type (objfile)->builtin_int; + ptype =3D builtin_type (objfile)->builtin_int; ftype->field (nparams).set_type (ptype); TYPE_FIELD_ARTIFICIAL (ftype, nparams++) =3D 0; } @@ -1094,8 +1094,8 @@ define_symbol (CORE_ADDR valu, const char *string, in= t desc, int type, { sym->set_type (sym->type ()->is_unsigned () - ? objfile_type (objfile)->builtin_unsigned_int - : objfile_type (objfile)->builtin_int); + ? builtin_type (objfile)->builtin_unsigned_int + : builtin_type (objfile)->builtin_int); } break; } @@ -1462,7 +1462,7 @@ error_type (const char **pp, struct objfile *objfile) break; } } - return objfile_type (objfile)->builtin_error; + return builtin_type (objfile)->builtin_error; } =0C =20 @@ -2063,7 +2063,7 @@ rs6000_builtin_type (int typenum, struct objfile *obj= file) if (typenum >=3D 0 || typenum < -NUMBER_RECOGNIZED) { complaint (_("Unknown builtin type %d"), typenum); - return objfile_type (objfile)->builtin_error; + return builtin_type (objfile)->builtin_error; } =20 if (!negative_types) @@ -4172,7 +4172,7 @@ read_range_type (const char **pp, int typenums[2], in= t type_size, handle_true_range: =20 if (self_subrange) - index_type =3D objfile_type (objfile)->builtin_int; + index_type =3D builtin_type (objfile)->builtin_int; else index_type =3D *dbx_lookup_type (rangenums, objfile); if (index_type =3D=3D NULL) @@ -4182,7 +4182,7 @@ handle_true_range: =20 complaint (_("base type %d of range type is not defined"), rangenums= [1]); =20 - index_type =3D objfile_type (objfile)->builtin_int; + index_type =3D builtin_type (objfile)->builtin_int; } =20 result_type diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index ab763760f43..a07f40b5702 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1486,7 +1486,7 @@ process_xcoff_symbol (struct xcoff_symbol *cs, struct= objfile *objfile) patch_block_stabs (), unless the file was compiled without -g. */ =20 sym->set_linkage_name (SYMNAME_ALLOC (name, symname_alloced)); - sym->set_type (objfile_type (objfile)->nodebug_text_symbol); + sym->set_type (builtin_type (objfile)->nodebug_text_symbol); =20 sym->set_aclass_index (LOC_BLOCK); sym2 =3D new (&objfile->objfile_obstack) symbol (*sym); @@ -1499,7 +1499,7 @@ process_xcoff_symbol (struct xcoff_symbol *cs, struct= objfile *objfile) else { /* In case we can't figure out the type, provide default. */ - sym->set_type (objfile_type (objfile)->nodebug_data_symbol); + sym->set_type (builtin_type (objfile)->nodebug_data_symbol); =20 switch (cs->c_sclass) {