From: Michael Snyder Date: Wed, 5 May 2010 23:44:19 +0000 (+0000) Subject: 2010-05-05 Michael Snyder X-Git-Tag: sid-snapshot-20100601~278 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa238c0364af02ffb3e3e7d95781bd0914cbdf35;p=external%2Fbinutils.git 2010-05-05 Michael Snyder * elfread.c (elf_symtab_read): Delete unused variable. (find_separate_debug_file_by_buildid): Delete unused variables. (elf_symfile_read): Delete unused variable. * coffread.c (coff_symfile_read): Delete unused variables. * coff-pe-read.c (add_pe_exported_sym): Delete unused variable. (read_pe_exported_syms): Delete unused variable. * stabsread.c (define_symbol): Delete unused variable. * dwarf2read.c (read_type_comp_unit_head): Delete unused variable. (process_psymtab_comp_unit): Delete unused variable. (dwarf2_build_psymtabs_hard): Delete unused variable. (load_partial_comp_unit): Delete unused variable. (create_all_comp_units): Delete unused variable. (scan_partial_symbols): Delete unused variable. (add_partial_symbol): Delete unused variable. (add_partial_namespace): Delete unused variable. (add_partial_enumeration): Delete unused variable. (load_full_comp_unit): Delete unused variable. (process_full_comp_unit): Delete unused variable. (read_file_scope): Delete unused variable. (read_type_unit_scope): Delete unused variable. (process_structure_scope): Delete unused variable. (process_enumeration_scope): Delete unused variable. (read_tag_ptr_to_member_type): Delete unused variable. (read_typedef): Delete unused variable. (read_partial_die): Delete unused variable. (decode_locdesc): Delete unused variable. (zeroed_partial_die): Delete unused global variable. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe1cec6..a4c32bf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -5,6 +5,38 @@ 2010-05-05 Michael Snyder + * elfread.c (elf_symtab_read): Delete unused variable. + (find_separate_debug_file_by_buildid): Delete unused variables. + (elf_symfile_read): Delete unused variable. + + * coffread.c (coff_symfile_read): Delete unused variables. + + * coff-pe-read.c (add_pe_exported_sym): Delete unused variable. + (read_pe_exported_syms): Delete unused variable. + + * stabsread.c (define_symbol): Delete unused variable. + + * dwarf2read.c (read_type_comp_unit_head): Delete unused variable. + (process_psymtab_comp_unit): Delete unused variable. + (dwarf2_build_psymtabs_hard): Delete unused variable. + (load_partial_comp_unit): Delete unused variable. + (create_all_comp_units): Delete unused variable. + (scan_partial_symbols): Delete unused variable. + (add_partial_symbol): Delete unused variable. + (add_partial_namespace): Delete unused variable. + (add_partial_enumeration): Delete unused variable. + (load_full_comp_unit): Delete unused variable. + (process_full_comp_unit): Delete unused variable. + (read_file_scope): Delete unused variable. + (read_type_unit_scope): Delete unused variable. + (process_structure_scope): Delete unused variable. + (process_enumeration_scope): Delete unused variable. + (read_tag_ptr_to_member_type): Delete unused variable. + (read_typedef): Delete unused variable. + (read_partial_die): Delete unused variable. + (decode_locdesc): Delete unused variable. + (zeroed_partial_die): Delete unused global variable. + * tui/tui-interp.c (_initialize_tui_interp): Delete unused variable. * tui/tui-regs.c tui_display_registers_from): @@ -86,7 +118,7 @@ (checkpoint_command): Delete unused variable. (linux_fork_context): Delete unused variables. - * linux-nat.c (top level): Delete unused global variable. + * linux-nat.c (linux_parent_pid): Delete unused global variable. (linux_tracefork_child): Delete unused variable. (linux_child_follow_fork): Delete unused variable. (linux_nat_detach): Delete unused variable. @@ -99,7 +131,7 @@ (linux_nat_stop_lwp): Delete unused variables. (_initialize_linux_nat): Delete unused variable. - * ser-pipe.c (top level): Delete unused global variable. + * ser-pipe.c (pipe_ops): Delete unused global variable. * linux-record.c (record_linux_system_call): Delete unused variables. diff --git a/gdb/coff-pe-read.c b/gdb/coff-pe-read.c index 44c4952..3e2b89c 100644 --- a/gdb/coff-pe-read.c +++ b/gdb/coff-pe-read.c @@ -108,7 +108,6 @@ add_pe_exported_sym (char *sym_name, char *qualified_name = 0; int dll_name_len = strlen (dll_name); - int count; /* Generate a (hopefully unique) qualified name using the first part of the dll name, e.g. KERNEL32!AddAtomA. This matches the style @@ -283,7 +282,6 @@ read_pe_exported_syms (struct objfile *objfile) unsigned long secptr1 = secptr + 40 * i; unsigned long vsize = pe_get32 (dll, secptr1 + 8); unsigned long vaddr = pe_get32 (dll, secptr1 + 12); - unsigned long flags = pe_get32 (dll, secptr1 + 36); char sec_name[9]; int sectix; diff --git a/gdb/coffread.c b/gdb/coffread.c index 55dd84b..90d1cc2 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -513,8 +513,6 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags) int stringtab_offset; struct cleanup *back_to, *cleanup_minimal_symbols; int stabstrsize; - int len; - char * target; info = (struct coff_symfile_info *) objfile->deprecated_sym_private; dbxinfo = objfile->deprecated_sym_stab_info; diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f4cbc59..fbd8f76 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -593,9 +593,6 @@ struct dwarf_block #define DW_FIELD_ALLOC_CHUNK 4 #endif -/* A zeroed version of a partial die for initialization purposes. */ -static struct partial_die_info zeroed_partial_die; - /* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, but this would require a corresponding change in unpack_field_as_long and friends. */ @@ -1520,10 +1517,10 @@ read_type_comp_unit_head (struct comp_unit_head *cu_header, ULONGEST *signature, gdb_byte *types_ptr, bfd *abfd) { - unsigned int bytes_read; gdb_byte *initial_types_ptr = types_ptr; - dwarf2_read_section (dwarf2_per_objfile->objfile, &dwarf2_per_objfile->types); + dwarf2_read_section (dwarf2_per_objfile->objfile, + &dwarf2_per_objfile->types); cu_header->offset = types_ptr - dwarf2_per_objfile->types.buffer; types_ptr = read_comp_unit_head (cu_header, types_ptr, abfd); @@ -1794,10 +1791,8 @@ process_psymtab_comp_unit (struct objfile *objfile, CORE_ADDR baseaddr; struct cleanup *back_to_inner; struct dwarf2_cu cu; - unsigned int bytes_read; int has_children, has_pc_info; struct attribute *attr; - const char *name; CORE_ADDR best_lowpc = 0, best_highpc = 0; struct die_reader_specs reader_specs; @@ -1999,7 +1994,6 @@ build_type_psymtabs (struct objfile *objfile) static void dwarf2_build_psymtabs_hard (struct objfile *objfile) { - bfd *abfd = objfile->obfd; gdb_byte *info_ptr; struct cleanup *back_to; @@ -2061,7 +2055,6 @@ load_partial_comp_unit (struct dwarf2_per_cu_data *this_cu, gdb_byte *info_ptr, *beg_of_comp_unit; struct die_info *comp_unit_die; struct dwarf2_cu *cu; - unsigned int bytes_read; struct cleanup *back_to; struct attribute *attr; int has_children; @@ -2140,7 +2133,6 @@ create_all_comp_units (struct objfile *objfile) while (info_ptr < dwarf2_per_objfile->info.buffer + dwarf2_per_objfile->info.size) { unsigned int length, initial_length_size; - gdb_byte *beg_of_comp_unit; struct dwarf2_per_cu_data *this_cu; unsigned int offset; @@ -2190,8 +2182,6 @@ static void scan_partial_symbols (struct partial_die_info *first_die, CORE_ADDR *lowpc, CORE_ADDR *highpc, int need_pc, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; - bfd *abfd = objfile->obfd; struct partial_die_info *pdi; /* Now, march along the PDI's, descending into ones which have @@ -2373,7 +2363,6 @@ add_partial_symbol (struct partial_die_info *pdi, struct dwarf2_cu *cu) struct objfile *objfile = cu->objfile; CORE_ADDR addr = 0; char *actual_name = NULL; - const char *my_prefix; const struct partial_symbol *psym = NULL; CORE_ADDR baseaddr; int built_actual_name = 0; @@ -2535,8 +2524,6 @@ add_partial_namespace (struct partial_die_info *pdi, CORE_ADDR *lowpc, CORE_ADDR *highpc, int need_pc, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; - /* Add a symbol for the namespace. */ add_partial_symbol (pdi, cu); @@ -2662,8 +2649,6 @@ static void add_partial_enumeration (struct partial_die_info *enum_pdi, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; - bfd *abfd = objfile->obfd; struct partial_die_info *pdi; if (enum_pdi->name != NULL) @@ -3046,7 +3031,6 @@ load_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct objfile *objfile) gdb_byte *info_ptr, *beg_of_comp_unit; struct cleanup *back_to, *free_cu_cleanup; struct attribute *attr; - CORE_ADDR baseaddr; gdb_assert (! per_cu->from_debug_types); @@ -3116,7 +3100,6 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu) struct partial_symtab *pst = per_cu->psymtab; struct dwarf2_cu *cu = per_cu->cu; struct objfile *objfile = pst->objfile; - bfd *abfd = objfile->obfd; CORE_ADDR lowpc, highpc; struct symtab *symtab; struct cleanup *back_to; @@ -3532,7 +3515,6 @@ static void read_file_scope (struct die_info *die, struct dwarf2_cu *cu) { struct objfile *objfile = cu->objfile; - struct comp_unit_head *cu_header = &cu->header; struct cleanup *back_to = make_cleanup (null_cleanup, 0); CORE_ADDR lowpc = ((CORE_ADDR) -1); CORE_ADDR highpc = ((CORE_ADDR) 0); @@ -3662,7 +3644,6 @@ read_type_unit_scope (struct die_info *die, struct dwarf2_cu *cu) char *comp_dir = NULL; struct die_info *child_die; bfd *abfd = objfile->obfd; - struct line_header *line_header = 0; /* start_symtab needs a low pc, but we don't really have one. Do what read_file_scope would do in the absence of such info. */ @@ -5250,7 +5231,6 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) static void process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; struct die_info *child_die = die->child; struct type *this_type; @@ -5347,7 +5327,6 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) static void process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; struct die_info *child_die; struct field *fields; struct symbol *sym; @@ -5795,7 +5774,6 @@ read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) static struct type * read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) { - struct objfile *objfile = cu->objfile; struct type *type; struct type *to_type; struct type *domain; @@ -6012,7 +5990,6 @@ static struct type * read_typedef (struct die_info *die, struct dwarf2_cu *cu) { struct objfile *objfile = cu->objfile; - struct attribute *attr; const char *name = NULL; struct type *this_type; @@ -6806,7 +6783,7 @@ read_partial_die (struct partial_die_info *part_die, gdb_byte *buffer, gdb_byte *info_ptr, struct dwarf2_cu *cu) { - unsigned int bytes_read, i; + unsigned int i; struct attribute attr; int has_low_pc_attr = 0; int has_high_pc_attr = 0; @@ -10829,7 +10806,6 @@ static CORE_ADDR decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) { struct objfile *objfile = cu->objfile; - struct comp_unit_head *cu_header = &cu->header; int i; int size = blk->size; gdb_byte *data = blk->data; diff --git a/gdb/elfread.c b/gdb/elfread.c index 42a1b73..68bbf12 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -223,7 +223,6 @@ elf_symtab_read (struct objfile *objfile, int type, int copy_names) { struct gdbarch *gdbarch = get_objfile_arch (objfile); - long storage_needed; asymbol *sym; long i; CORE_ADDR symaddr; @@ -688,13 +687,6 @@ build_id_to_debug_filename (struct build_id *build_id) static char * find_separate_debug_file_by_buildid (struct objfile *objfile) { - asection *sect; - char *basename, *name_copy, *debugdir; - char *dir = NULL; - char *debugfile = NULL; - char *canon_name = NULL; - bfd_size_type debuglink_size; - int i; struct build_id *build_id; build_id = build_id_bfd_get (objfile->obfd); @@ -751,7 +743,6 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags) bfd *abfd = objfile->obfd; struct elfinfo ei; struct cleanup *back_to; - CORE_ADDR offset; long symcount = 0, dynsymcount = 0, synthcount, storage_needed; asymbol **symbol_table = NULL, **dyn_symbol_table = NULL; asymbol *synthsyms; diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 7fc77d0..541e7d0 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -807,7 +807,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, struct type *range_type; int ind = 0; char quote = *p++; - char *startp = p; gdb_byte *string_local = (gdb_byte *) alloca (strlen (p)); gdb_byte *string_value;