diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-03-26 14:53:28 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-03-26 14:53:28 +0000 |
commit | 5e2b427df30d4c07ffe08dca54c26f2569b1630f (patch) | |
tree | c5290f5540b73971c48ba9171a6dcc030e8032cd /gdb/elfread.c | |
parent | 5a413362ba31657af57ca223df47809344d2532e (diff) | |
download | binutils-5e2b427df30d4c07ffe08dca54c26f2569b1630f.zip binutils-5e2b427df30d4c07ffe08dca54c26f2569b1630f.tar.gz binutils-5e2b427df30d4c07ffe08dca54c26f2569b1630f.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index 5a201c9..88ea77b 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -166,8 +166,10 @@ record_minimal_symbol (char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, asection *bfd_section, struct objfile *objfile) { + struct gdbarch *gdbarch = get_objfile_arch (objfile); + if (ms_type == mst_text || ms_type == mst_file_text) - address = gdbarch_smash_text_address (current_gdbarch, address); + address = gdbarch_smash_text_address (gdbarch, address); return prim_record_minimal_symbol_and_info (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); @@ -206,6 +208,7 @@ static void elf_symtab_read (struct objfile *objfile, int type, long number_of_symbols, asymbol **symbol_table) { + struct gdbarch *gdbarch = get_objfile_arch (objfile); long storage_needed; asymbol *sym; long i; @@ -513,7 +516,7 @@ elf_symtab_read (struct objfile *objfile, int type, } if (msym != NULL) msym->filename = filesymname; - gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym); + gdbarch_elf_make_msymbol_special (gdbarch, sym, msym); } } } |