mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* objfiles.h (struct objfile): New GDBARCH member.
(get_objfile_arch): Add prototype. * objfiles.c: Include "arch-utils.h". (allocate_objfile): Look up gdbarch associated with bfd. (get_objfile_arch): New function. * Makefile (objfiles.o): Update dependencies. * dwarf2-frame.c (decode_frame_entry_1): Replace current_gdbarch by objfile arch. * dwarf2loc.c (dwarf_expr_read_reg): Replace current_gdbarch by frame arch. (locexpr_describe_location): Replace current_gdbarch by objfile arch. * dwarf2read.c (die_type): Replace current_gdbarch by objfile arch. (dwarf2_add_field): Likewise. (read_tag_pointer_type): Likewise. (read_base_type): Likewise. (new_symbol): Likewise. * coffread.c (decode_type): Add OBJFILE argument. Update callers. (decode_base_type, decode_function_type): Likewise. (coff_read_struct_type, coff_read_enum_type): Likewise. (coff_symtab_read): Replace current_gdbarch by objfile arch. (decode_base_type): Likewise. (coff_read_enum_type): Likewise. (coff_read_struct_type): Replace current_objfile by OBJFILE argument. (coff_read_enum_type): Likewise. * dbxread.c (read_dbx_symtab): Replace current_gdbarch by objfile arch. (end_psymtab): Likewise. (process_one_symbol): Likewise. * mdebugread.c (parse_symbol): Replace current_gdbarch by objfile arch. (parse_procedure): Likewise. (parse_partial_symbols): Likewise. * somread.c (som_symtab_read): Replace current_gdbarch by objfile arch. * stabsread.c (define_symbol): Replace current_gdbarch by objfile arch. Replace static pcc_promotion_type and pcc_unsigned_promotion_type by built-in types. (read_range_type): Replace current_gdbarch by objfile arch. Replace static range_index_type by built-in type. (read_one_struct_field): Replace current_gdbarch by objfile arch. (read_enum_type): Likewise. * xcoffread.c (read_xcoff_symtab): Replace current_gdbarch by objfile arch.
This commit is contained in:
@@ -1435,6 +1435,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
|
||||
static struct symbol *
|
||||
process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct symbol onesymbol;
|
||||
struct symbol *sym = &onesymbol;
|
||||
struct symbol *sym2 = NULL;
|
||||
@@ -1474,7 +1475,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
|
||||
patch_block_stabs (), unless the file was compiled without -g. */
|
||||
|
||||
DEPRECATED_SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
|
||||
SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_text_symbol;
|
||||
SYMBOL_TYPE (sym) = builtin_type (gdbarch)->nodebug_text_symbol;
|
||||
|
||||
SYMBOL_CLASS (sym) = LOC_BLOCK;
|
||||
SYMBOL_DUP (sym, sym2);
|
||||
@@ -1487,7 +1488,7 @@ process_xcoff_symbol (struct coff_symbol *cs, struct objfile *objfile)
|
||||
else
|
||||
{
|
||||
/* In case we can't figure out the type, provide default. */
|
||||
SYMBOL_TYPE (sym) = builtin_type (current_gdbarch)->nodebug_data_symbol;
|
||||
SYMBOL_TYPE (sym) = builtin_type (gdbarch)->nodebug_data_symbol;
|
||||
|
||||
switch (cs->c_sclass)
|
||||
{
|
||||
@@ -2582,9 +2583,9 @@ scan_xcoff_symtab (struct objfile *objfile)
|
||||
case 'S':
|
||||
symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
|
||||
if (gdbarch_static_transform_name_p (current_gdbarch))
|
||||
if (gdbarch_static_transform_name_p (gdbarch))
|
||||
namestring = gdbarch_static_transform_name
|
||||
(current_gdbarch, namestring);
|
||||
(gdbarch, namestring);
|
||||
|
||||
add_psymbol_to_list (namestring, p - namestring,
|
||||
VAR_DOMAIN, LOC_STATIC,
|
||||
|
||||
Reference in New Issue
Block a user