summaryrefslogtreecommitdiff
path: root/gdb/somread.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-03-26 14:53:28 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-03-26 14:53:28 +0000
commitbb73511b9adf08f0b75de51a8bcee881faa0f49a (patch)
tree6292a7eee1bd495f774549dd5ee01966700be41e /gdb/somread.c
parenta2f25a060d0e2f17f3df867a794eda2aa18d90ce (diff)
downloadgdb-bb73511b9adf08f0b75de51a8bcee881faa0f49a.tar.gz
* 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/somread.c')
-rw-r--r--gdb/somread.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/somread.c b/gdb/somread.c
index 338d0c60500..a3389d9d2b2 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -58,6 +58,7 @@ static void
som_symtab_read (bfd *abfd, struct objfile *objfile,
struct section_offsets *section_offsets)
{
+ struct gdbarch *gdbarch = get_objfile_arch (objfile);
unsigned int number_of_symbols;
int val, dynamic;
char *stringtab;
@@ -132,7 +133,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_text;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;
case ST_ENTRY:
@@ -146,7 +147,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_text;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;
case ST_STUB:
@@ -154,7 +155,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_solib_trampoline;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;
case ST_DATA:
@@ -183,7 +184,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_file_text;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
check_strange_names:
/* Utah GCC 2.5, FSF GCC 2.6 and later generate correct local
@@ -215,7 +216,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_file_text;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;
case ST_ENTRY:
@@ -227,7 +228,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_file_text;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;
case ST_STUB:
@@ -235,7 +236,7 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
ms_type = mst_solib_trampoline;
bufp->symbol_value += text_offset;
bufp->symbol_value = gdbarch_smash_text_address
- (current_gdbarch, bufp->symbol_value);
+ (gdbarch, bufp->symbol_value);
break;