aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-11-06symtab.h (lookup_global_symbol): Improve function comment.Doug Evans2-0/+12
gdb/ChangeLog: * symtab.h (lookup_global_symbol): Improve function comment.
2014-11-06Rename lookup_symbol_global to lookup_global_symbol.Doug Evans7-15/+22
gdb/ChangeLog: * symtab.c (lookup_global_symbol): Renamed from lookup_symbol_global. All callers updated. * symtab.h (lookup_global_symbol): Update decl. (lookup_static_symbol): Move decl to better location.
2014-11-06symtab.c (basic_lookup_symbol_nonlocal): Add comment.Doug Evans2-0/+8
gdb/ChangeLog: * symtab.c (basic_lookup_symbol_nonlocal): Add comment.
2014-11-06Rename some "aux" functions.Doug Evans2-40/+52
"aux" doesn't contribute anything to the name, and it makes the reader wonder what it's supposed to mean. gdb/ChangeLog: * symtab.c (lookup_local_symbol): Renamed from lookup_symbol_aux_local. All callers updated. (lookup_symbol_in_all_objfiles): Renamed from lookup_symbol_aux_symtabs. All callers updated. (lookup_symbol_via_quick_fns): Renamed from lookup_symbol_aux_quick. All callers updated. (lookup_symbol_in_objfile_symtabs): Renamed from lookup_symbol_aux_objfile. All callers updated.
2014-11-06lookup_symbol_in_block: Renamed from lookup_symbol_aux_block.Doug Evans4-9/+14
gdb/ChangeLog: * symtab.c (lookup_symbol_in_block): Renamed from lookup_symbol_aux_block. All callers updated.
2014-11-06Rename lookup_symbol_static to lookup_symbol_in_static_block,Doug Evans6-18/+26
and lookup_static_symbol_aux to lookup_static_symbol. gdb/ChangeLog: * symtab.c (lookup_static_symbol): Renamed from lookup_static_symbol_aux. All callers updated. (lookup_symbol_in_static_block): Renamed from lookup_symbol_static. All callers updated.
2014-11-06New macro ALL_BLOCK_SYMBOLS_WITH_NAME.Doug Evans5-12/+20
gdb/ChangeLog: * block.h (ALL_BLOCK_SYMBOLS_WITH_NAME): New macro. * block.c (block_lookup_symbol): Use it. * cp-support.c (make_symbol_overload_list_block): Use it. * symtab.c (iterate_over_symbols): Use it.
2014-11-06Move lookup_block_symbol to block.c, rename to block_lookup_symbol.Doug Evans8-76/+85
There is another function, lookup_symbol_aux_block, and the names lookup_block_symbol and lookup_symbol_aux_block don't convey any real difference between them. The difference is that lookup_block_symbol lives in the lower level block API, and lookup_symbol_aux_block lives in the higher level symtab API. This patch makes this distinction clear. gdb/ChangeLog: * symtab.c (lookup_block_symbol): Moved to ... * block.c (block_lookup_symbol): ... here and renamed. All callers updated. * block.h (block_lookup_symbol): Declare. * symtab.h (lookup_block_symbol): Delete.
2014-11-07Revert bfd_get_size checksAlan Modra6-40/+11
* archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check. * coffcode.h (coff_set_alignment_hook): Likewise. (coff_slurp_line_table): Likewise. * coffgen.c (coff_get_normalized_symtab): Likewise. (_bfd_coff_get_external_symbols): Likewise. * elf.c (bfd_elf_get_str_section): Likewise. * tekhex.c (first_phase): Likewise.
2014-11-06Use ALL_PRIMARY_SYMTABS instead of ALL_SYMTABS in some places.Doug Evans3-5/+15
Non-primary symtabs share the block vector with their primary symtabs. In these cases there's no need to use ALL_SYMTABS. gdb/ChangeLog: * ada-lang.c (ada_make_symbol_completion_list): Use ALL_PRIMARY_SYMTABS instead of ALL_SYMTABS. * symtab.c (lookup_objfile_from_block): Ditto.
2014-11-06Forgotten ChangeLog entry for previous commit.Doug Evans1-0/+5
gdb/ChangeLog: * gdbtypes.h (TYPE_CODE_CLASS): Delete. All uses changed to use TYPE_CODE_STRUCT.
2014-11-06Delete TYPE_CODE_CLASS, it's just an alias of TYPE_CODE_STRUCT.Doug Evans19-40/+27
gdb/ChangeLog: * gdbtypes.h (TYPE_CODE_CLASS): Delete. All uses changed to use TYPE_CODE_STRUCT.
2014-11-06solib_global_lookup: Fetch arch from objfile, not target_gdbarch.Doug Evans4-3/+11
gdb/ChangeLog: * objfiles.c (get_objfile_arch): Constify. * objfiles.h (get_objfile_arch): Update prototype. * solib.c (solib_global_lookup): Fetch arch from objfile, not target_gdbarch.
2014-11-07daily updateAlan Modra1-1/+1
2014-11-06Add mach parameter to nios2_find_opcode_hash.Sandra Loosemore6-7/+23
2014-11-06 Sandra Loosemore <sandra@codesourcery.com> include/opcode/ * nios2.h (nios2_find_opcode_hash): Add mach parameter to declaration. Fix obsolete comment. opcodes/ * nios2-dis.c (nios2_find_opcode_hash): Add mach parameter. (nios2_disassemble): Adjust call to nios2_find_opcode_hash. gas/ * config/tc-nios2.c (nios2_diagnose_overflow): Adjust call to nios2_find_opcode_hash.
2014-11-06Update Nios II prologue analysis to remove detection of long-obsoleteSandra Loosemore2-90/+14
code sequences. 2014-11-06 Sandra Loosemore <sandra@codesourcery.com> gdb/ * nios2-tdep.c (wild_insn): Delete. (profiler_insn, irqentry_insn): Delete. (nios2_match_sequence): Delete. (nios2_analyze_prologue): Update comments. Remove matching of obsolete profiler_insn and irqentry_insn sequences.
2014-11-06Prevent archive memebers with illegal pathnames from being extracted from an ↵Nick Clifton6-7/+65
archive. PR binutils/17552, binutils/17533 * bucomm.c (is_valid_archive_path): New function. Returns false for absolute pathnames and pathnames that include /../. * bucomm.h (is_valid_archive_path): Add prototype. * ar.c (extract_file): Use new function to check for valid pathnames when extracting files from an archive. * objcopy.c (copy_archive): Likewise. * doc/binutils.texi: Update documentation to mention the limitation on pathname of archive members.
2014-11-06Revert changes in previous deltas that introduced new failures intoNick Clifton4-19/+17
the linker testsuite. * aoutx.h (slurp_symbol_table): Revert previous delta. (slurp_reloc_table): Likewise. * compress.c (bfd_get_full_section_contents): Remove file size test. * coffgen.c (coff_get_normalized_symtab): Allow zero-sized symtabs and do not complain about linker generated files.
2014-11-06bfd/elf-attrs.c: Fix possible infinite loop parsing attributesWill Newton2-0/+9
Handle the case of a zero length section or sub-section in _bfd_elf_parse_attributes and in doing so prevent an infinite loop in the parser. bfd/ChangeLog: 2014-11-06 Will Newton <will.newton@linaro.org> * elf-attrs.c (_bfd_elf_parse_attributes): Handle zero length sections and sub-sections.
2014-11-06daily updateAlan Modra1-1/+1
2014-11-05More fixes for memory problems uncovered by file fuzzers.Nick Clifton3-7/+28
PR binutils/17512 * coffcode.h (handle_COMDAT): Replace abort with BFD_ASSERT. Replace another abort with an error message. (coff_slurp_line_table): Add more range checking. * peXXigen.c (pe_print_debugdata): Add range checking.
2014-11-05More fixes for reading corrupt ELF files.Nick Clifton2-63/+175
PR binutils/15731 * readelf.c (printable_section_name): New function. (printable_section_name_from_index): New function. (dump_relocations): Use new function. (process_program_headers, get_32bit_elf_symbols, (get_64bit_elf_symbols, process_section_headers, (process_section_groups, process_relocs, ia64_process_unwind, (hppa_process_unwind, get_unwind_section_word, decode_arm_unwind, (arm_process_unwind, process_version_sections, (process_symbol_table, apply_relocations, get_section_contents, (dump_section_as_strings, dump_section_as_bytes, (display_debug_section, process_attributes, process_mips_specific, (process_mips_specific process_gnu_liblist): Likewise. (get_unwind_section_word): Check for a missing symbol table. Replace aborts with error messages. (arm_process_unwind): Check for a missing string table. (process_attributes): Check for an attribute length that is too small. (process_mips_specific): Check for a corrupt GOT symbol offset.
2014-11-05Fix gnu11 fallout on Solaris 10+Rainer Orth2-1/+4
* sigsetmask.c (_POSIX_SOURCE): Remove.
2014-11-05Fix segfault when creating a dso with discarded .dynsym section.Matthew Fortune2-2/+9
bfd/ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault when creating a dso with discarded dynsym section.
2014-11-05Update .MIPS.abiflags to support MIPS R6Matthew Fortune11-0/+109
bfd/ * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6 and E_MIPS_ARCH_64R6 support. ld/testsuite/ * ld-mips-elf/abiflags-strip10-ph.d: New file. * ld-mips-elf/mips-eld.exp: Run the new test. gas/ * config/tc-mips.c (mips_elf_final_processing): Add INSN_ISA32R6 and INSN_ISA64R6 support. gas/testsuite/ * gas/mips/elf_arch_mips32r6.d: New file. * gas/mips/elf_arch_mips64r6.d: New file. * gas/mips/mips.exp: Run the new tests.
2014-11-052014-11-05 Jan-Benedict Glaw <jbglaw@lug-owl.de>Jan-Benedict Glaw2-2/+7
* readelf.c (process_mips_specific): Fix format string warning.
2014-11-05More fixes for processing corrupt files.Nick Clifton3-39/+129
PR binutils/17512 * coffcode.h (coff_set_alignment_hook): Warn if the file lies about the number of relocations it contains. (coff_sort_func_alent): Return 0 if the pointers are NULL. (coff_slurp_line_table): Add more range checks. Do not free new tables created when sorting line numbers. * peXXigen.c (pe_print_idata): Add range checks. (pe_print_edata): Likewise. (rsrc_print_resource_entries): Likewise. Avoid printing control characters. Terminate priniting if corruption is detected. (rsrc_print_resource_directory): Terminate printing if an unknown directory type is encountered. (pe_print_debugdata): Fix off-by-one error. (rsrc_count_entries): Add range checking. (rsrc_parse_entry): Likewise.
2014-11-05Cast result of obstack_next_freeAlan Modra2-2/+4
obstack_next_free is supposed to return a void*, rather than a char* as it does currently. Avoid warning on void* arithmetic when obstack_next_free gets it proper return type. * cp-valprint.c (cp_print_value_fields): Cast obstack_next_free to char* before doing pointer arithmetic.
2014-11-05Use obstack_blank_fast to shrink obstacksAlan Modra3-2/+8
obstack_blank isn't the correct macro to call for shrinking obstacks since it does size checking. * charset.c (convert_between_encodings): Shrink obstack using obstack_blank_fast. * minsyms.c (install_minimal_symbols): Likewise.
2014-11-04Update description of ownership of files in include/Doug Evans1-1/+4
2014-11-04Fix -Wshadow warningMatthew Fortune2-4/+8
binutils/ * readelf.c (process_mips_specific): Rename index to idx.
2014-11-05daily updateAlan Modra1-1/+1
2014-11-04tui: Fix newterm call for older ncursesSimon Marchi2-1/+5
Older versions of ncurses' newterm can't take NULL for their ofp and ifp parameters. Newer versions can, and they fall back on stdout/stdin if that is the case. This patch explicitly passes stdout/stdin to the call to newterm to avoid segfaulting with older ncurses. gdb/Changelog: 2014-11-04 Simon Marchi <simon.marchi@ericsson.com> * tui/tui.c (tui_enable): Pass stdout and stdin to newterm.
2014-11-04garbage collect gdb/breakpoint.c:breakpoint_thread_matchPedro Alves3-62/+5
Used to be necessary for the thread-hop code, but that's gone now. Nothing uses this anymore. gdb/ 2014-11-04 Pedro Alves <palves@redhat.com> * breakpoint.c (breakpoint_thread_match): Delete function. * breakpoint.h (breakpoint_thread_match): Delete declaration.
2014-11-04Fix problem with linker created sections being mistakenly flaggedNick Clifton2-1/+6
as corrupt by the new error checking code in bfd_get_full_section_contents. PR binutils/17512 * compress.c (bfd_get_full_section_contents): Improve test for linker created objects.
2014-11-04More fixes for memory corruption when readelf processes corrupt files.Nick Clifton2-46/+138
PR binutils/17531 (get_32bit_program_headers): Verify program header entry size before reading in the program headers. (get_64bit_program_headers): Likewise. (get_unwind_section_word): Do nothing if no section was provided. Fail if the offset is outside of the section. (print_dynamic_symbol): Catch out of range symbol indicies. (process_mips_specific): Likewise. (process_attributes): Make sure that there is enough space left in the section before attempting to read the length of the next attribute.
2014-11-04Fix a seg-fault triggered by reading a mal-formed archive.Nick Clifton2-2/+13
PR binutils/17533 * archive.c (_bfd_slurp_extended_name_table): Handle archives with corrupt extended name tables.
2014-11-04Don't use register keywordAlan Modra24-4044/+4308
* expr.c (expr_symbol_where): Don't use register keyword. * app.c (app_push, app_pop, do_scrub_chars): Likewise. * ecoff.c (add_string, add_ecoff_symbol, add_aux_sym_symint, add_aux_sym_rndx, add_aux_sym_tir, add_procedure, add_file, ecoff_build_lineno, ecoff_setup_ext, allocate_cluster. allocate_scope, allocate_vlinks, allocate_shash, allocate_thash, allocate_tag, allocate_forward, allocate_thead, allocate_lineno_list): Likewise. * frags.c (frag_more, frag_var, frag_variant, frag_wane): Likewise. * input-file.c (input_file_push, input_file_pop): Likewise. * input-scrub.c (input_scrub_push, input_scrub_next_buffer): Likewise. * subsegs.c (subseg_change): Likewise. * symbols.c (colon, symbol_table_insert, symbol_find_or_make) (dollar_label_name, fb_label_name): Likewise. * write.c (relax_align): Likewise. * config/tc-alpha.c (s_alpha_pdesc): Likewise. * config/tc-bfin.c (bfin_s_bss): Likewise. * config/tc-i860.c (md_estimate_size_before_relax): Likewise. * config/tc-m68hc11.c (md_convert_frag): Likewise. * config/tc-m68k.c (m68k_ip, crack_operand): Likewise. (md_convert_frag_1, s_even): Likewise. * config/tc-mips.c (mips_clear_insn_labels): Likewise. * config/tc-mn10200.c (md_begin): Likewise. * config/tc-s390.c (s390_setup_opcodes, md_begin): Likewise. * config/tc-sh.c (sh_elf_cons): Likewise. * config/tc-tic4x.c (tic4x_cons, tic4x_stringer): Likewise. * config/m68k-parse.y (m68k_reg_parse): Likewise. Convert from K&R. (yylex, m68k_ip_op, yyerror): Convert from K&R.
2014-11-04Use frag_now_fix_octets in gas d10v, d30vAlan Modra3-7/+9
obstack_next_free is supposed to return a void* rather than the char* it does currently, so expressions involving pointer arithmetic need a cast. Avoid the issue. * config/tc-d10v.c (find_opcode): Call frag_now_fix_octets rather than equivalent obstack_next_free expression. * config/tc-d30v.c (find_format): Likewise.
2014-11-04Regenerate spu overlay and icache manager filesAlan Modra3-47/+52
Nothing to see here, just the changed placement of section headers. * emultempl/spu_icache.o_c: Regenerate. * emultempl/spu_ovl.o_c: Regenerate.
2014-11-04Provide stat function for spu overlay manager iovecAlan Modra2-1/+18
Commit f54498b4 broke spu-elf, specifically the change "Do not try to load a string table bigger than the file", because bfd_get_size returns zero for the spu built-in overlay manager bfd. * elf32-spu.c (ovl_mgr_stat): New function. (spu_elf_open_builtin_lib): Pass to bfd_openr_iovec.
2014-11-04Fixes for crashes running readelf.Nick Clifton2-33/+96
PR binutils/17531 * readelf.c (get_data): If the reason parameter is null, do not print any error messages. (get_32bit_section_headers): Verify section header entry size before reading in the section headers. (get_64bit_section_headers): Likewise. (process_section_headers): Pass FALSE to get_section_headers. (get_file_header): Pass TRUE to get_section_headers. (process_dynamic_section): Change an assert to an error message. (process_symbol_table): Handle corrupt histograms.
2014-11-03Fix evaluation of method calls under EVAL_SKIP.Siva Chandra5-6/+140
When evaluating method calls under EVAL_SKIP, the "object" and the arguments to the method should also be evaluated under EVAL_SKIP, instead of skipping to evaluate them as was being done previously. gdb/ChangeLog: PR c++/17494 * eval.c (evaluate_subexp_standard): Evaluate the "object" and the method args also under EVAL_SKIP when evaluating method calls under EVAL_SKIP. gdb/testsuite/ChangeLog: PR c++/17494 * gdb.cp/pr17494.cc: New file. * gdb.cp/pr17494.exp: New file.
2014-11-04daily updateAlan Modra1-1/+1
2014-11-03When relaxing, update size of symbols.Andrew Burgess5-18/+53
When performing linker relaxation, reduce the size of symbols that span the deleted bytes. This ensures that, for example, function symbols will have the correct size. bfd/ChangeLog: * elf32-avr.c (elf32_avr_relax_delete_bytes): During linker relaxation, reduce the size of symbols that span the deleted bytes. ld/ChangeLog: * testsuite/ld-avr/relax-02.d: Update to check size of symbols has changed. * testsuite/ld-avr/relax-03.d: Likewise.
2014-11-03When relaxing, update symbols at the very end of the section.Andrew Burgess7-2/+187
Symbols at the very end of a section were not being updated correctly when linker relaxation takes place due to the use of '<' instead of '<='. Added a couple of tests to cover this behaviour. bfd/ChangeLog: * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols located at the very end of the section. ld/ChangeLog: * ld/testsuite/ld-avr/relax-02.d: New file. * ld/testsuite/ld-avr/relax-02.s: New file. * ld/testsuite/ld-avr/relax-03.d: New file. * ld/testsuite/ld-avr/relax-03.s: New file.
2014-11-03More fixes for buffer overruns instigated by corrupt binaries.Nick Clifton12-32/+140
PR binutils/17512 * objdump.c (slurp_symtab): Fail gracefully if the table could not be read. (dump_relocs_in_section): Likewise. * aoutx.h (slurp_symbol_table): Check that computed table size is not bigger than the file from which is it being read. (slurp_reloc_table): Likewise. * coffcode.h (coff_slurp_line_table): Remove unneeded local 'warned'. Do not try to print the details of a symbol with an invalid index. * coffgen.c (make_a_sectiobn_from_file): Check computed string index against length of string table. (bfd_coff_internal_syment_name): Check read in string offset against length of string table. (build_debug_section): Return a pointer to the section used. (_bfd_coff_read_string_table): Store the length of the string table in the coff_tdata structure. (bfd_coff_free_symbols): Set the length of the string table to zero when it is freed. (coff_get_normalized_symtab): Check offsets against string table or data table lengths as appropriate. * cofflink.c (_bfd_coff_link_input_bfd): Check offset against length of string table. * compress.c (bfd_get_full_section_contents): Check computed size against the size of the file. * libcoff-in.h (obj_coff_strings_len): Define. (struct coff_tdata): Add strings_len field. * libcoff.h: Regenerate. * peXXigen.c (pe_print_debugdata): Do not attempt to print the data if the debug section is too small. * xcofflink.c (xcoff_link_input_bfd): Check offset against length of string table.
2014-11-03Import updated translations supplied by the Translation Project.Nick Clifton12-3411/+5630
bfd, binutils, gprof, opcodes: * po/fi.po: Updated Finnish translation. binutils: * po/sv.po: Updated Swedish translation. gprof: * po/hu.po: New Hungarian translation.
2014-11-03Add missing changelog entriesYao Qi1-0/+17
Some changelog entries are missing in previous commits. Add them.
2014-11-03Fixes a snafu checking the size of 20-bit immedaite values.Nick Clifton2-1/+6
* config/tc-msp430.c (msp430_srcoperand): Fix range test for 20-bit values.