aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-30Fix executable indicator in file name completion on Windows.Eli Zaretskii2-0/+19
* complete.c (stat_char) [_WIN32]: Don't use 'access' and X_OK on Windows, they don't work. Instead, look at the file-name extension to determine whether the file is executable.
2014-12-30Remove "dll-symbols", "add-shared-symbol-files" and assf" commands.Joel Brobecker2-93/+9
This patch removes a set of commands that have been deprecated for a while, and which we agreed to remove after the GDB 7.8 release. gdb/ChangeLog: * windows-nat.c (safe_symbol_file_add_stub) (safe_symbol_file_add_cleanup, safe_symbol_file_add) (dll_symbol_command): Delete. (_initialize_windows_nat): Delete local variable "c". Remove "dll-symbols", "add-shared-symbol-files" and assf" commands. Tested by rebuilding GDB on x86-windows.
2014-12-30Automatic date update in version.inGDB Administrator1-1/+1
2014-12-29Sanitize input_interrupt outputSergio Durigan Junior2-3/+19
Hi, This patch is a follow-up of the following discussions: <https://sourceware.org/ml/gdb-patches/2014-12/msg00421.html> <https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01293.html> input_interrupt is currently emiting non-printable characters, which is confusing the dg-extract-results.sh script. This is obviously not a good thing, and, by following Pedro's advices here: <https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01320.html> I adapted the function to print "client connection closed" when it receives a NUL character, or use the "isprint" function to decide how to print the received char. I tested it by running the testcases that were printing the non-printable chars before: gdb.base/gdb-sigterm.exp gdb.threads/non-ldr-exc-1.exp gdb.threads/non-ldr-exc-2.exp gdb.threads/non-ldr-exc-3.exp gdb.threads/non-ldr-exc-4.exp gdb.threads/thread-execl.exp and confirming that they print the right message. I tried a bit to come up with a testcase for this, but failed, and since I did not want to spend too much time on it, I'm sending the patch anyway. Comments are welcome, as usual. gdb/gdbserver/ChangeLog: 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com> * remote-utils.c: Include ctype.h. (input_interrupt): Explicitly handle the case when the char received is the NUL byte. Improve the printing of non-ASCII characters.
2014-12-29[PATCH] Remove cast in Tag_ABI_VFP_args switch case stmtsJiong Wang2-4/+9
2014-12-29 Thomas Preud'homme <thomas.preudhomme@arm.com> gdb/ * arm-tdep.c (arm_gdbarch_init): Remove casts in Tag_ABI_VFP_args switch case statements.
2014-12-29Clean up gdb.trace/entry-values.expYao Qi2-9/+14
This patch is to clean up gdb.trace/entry-values.exp as a preparation of the next patch. It updates the comments to reflect the code. One DIE generated in dwarf assembler is GNU_call_site { {low_pc "$bar_start + $bar_call_foo" addr} {abstract_origin :$foo_label} the DW_AT_low_pc attribute is the return address after the call, so I rename variable bar_call_foo to returned_from_foo. gdb/testsuite: 2014-12-29 Yao Qi <yao@codesourcery.com> * gdb.trace/entry-values.exp: Update comments. Rename variable bar_call_foo to returned_from_foo.
2014-12-29Add moxiebox target supportAnthony Green2-1/+5
2014-12-29Automatic date update in version.inGDB Administrator1-1/+1
2014-12-28Misplaced parenthesis calculates two too few bytes for stringAlan Modra2-3/+10
Factor out strlen to give better code and less likelihood of a repeat of this problem. PR 17766 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct string length. Use memcpy rather than strcpy.
2014-12-28Fix small spelling mistake in gdb/ChangeLog.Joel Brobecker1-1/+1
2014-12-28Automatic date update in version.inGDB Administrator1-1/+1
2014-12-27Update for moxie ISA changesAnthony Green2-29/+51
2014-12-27Update sto/ldo implementations with 16 bit offsetsAnthony Green2-20/+32
2014-12-27Limit moxie sto/ldo offsets to 16 bitsAnthony Green7-28/+44
2014-12-27Automatic date update in version.inGDB Administrator1-1/+1
2014-12-26Update two sh64 ld test's expected outputAlan Modra3-2/+7
At some stage someone fixed a bug in ld -r output, preserving SHF_INFO_LINK from input objects. These two tests expected the old wrong output. * ld-sh/sh64/crangerel1.rd: Update. * ld-sh/sh64/crangerel2.rd: Update.
2014-12-26Delete unnecessary code copying SHF_SH5_ISA32 flagAlan Modra5-21/+29
Since 2006, commit d270463e9, _bfd_elf_copy_private_section_data has copied over SHF_MASKOS and SHF_MASKPROC flags. That makes the buggy code in sh_elf64_copy_private_data_internal redundant. bfd/ PR 17755 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Delete code copying SHF_SH5_ISA32. binutils/testsuite/ * binutils-all/strip-11.d: New test. * binutils-all/objcopy.exp: Run it.
2014-12-26Automatic date update in version.inGDB Administrator1-1/+1
2014-12-25Whitespace cleanupAnthony Green1-0/+5
2014-12-25Whitespace cleanupAnthony Green1-4/+55
2014-12-25ARM: Add support for value 3 of Tag_ABI_VFP_args attributeAlan Modra4-6/+34
Missing from 5c294fee elfcpp/ * arm.h: Add enums for Tag_ABI_FP_number_model and Tag_ABI_VFP_args. gold/ * arm.cc (Target_arm::do_adjust_elf_header): Provide namespace on new enums. (Target_arm::merge_object_attributes, ): Likewise.
2014-12-25Don't pass unadorned zeros to varargs functionsYaakov Selkowitz2-2/+7
PR gas/17753 * config/tc-mep.c (md_begin): Specify types of vararg literals.
2014-12-25ARM: Add support for value 3 of Tag_ABI_VFP_args attributeTerry Guo20-12/+107
*** bfd/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new Tag_ABI_VFP_args value and replace hardcoded values by enum values. (elf32_arm_post_process_headers): Set e_flags in ELF header as hard float only when Tag_ABI_VFP_args is 1, using new enum value AEABI_VFP_args_vfp to check that. *** binutils/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * readelf.c (arm_attr_tag_ABI_VFP_args): Add "compatible". *** gdb/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * arm-tdep.c (arm_gdbarch_init): Explicitely handle value 3 of Tag_ABI_VFP_args. Also replace hardcoded values by enum values in the switch handling the different values of Tag_ABI_VFP_args. *** gold/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * arm.cc (Target_arm::do_adjust_elf_header): Set e_flags in ELF header as hard float only when Tag_ABI_VFP_args is 1, using new enum value AEABI_VFP_args_vfp to check that. (Target_arm::merge_object_attributes): Handle new Tag_ABI_VFP_args value and replace hardcoded values by enum values. *** include/elf/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values. *** ld/testsuite/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * ld-arm/attr-merge-2a.s: Add Tag_ABI_VFP_args. * ld-arm/attr-merge-2b.s: Likewise. * ld-arm/attr-merge-2.attr: Likewise. * ld-arm/attr-merge-4a.s: Add Tag_ABI_FP_number_model and Tag_ABI_VFP_args. * ld-arm/attr-merge-4b.s: Likewise. * ld-arm/attr-merge-4.attr: Likewise. * ld-arm/attr-merge-6a.s: Likewise. * ld-arm/attr-merge-6b.s: Likewise. * ld-arm/attr-merge-6.attr: Add Tag_ABI_FP_number_model.
2014-12-25Automatic date update in version.inGDB Administrator1-1/+1
2014-12-24Add cast to unsigned longH.J. Lu2-1/+7
* pei-x86_64.c (pex64_bfd_print_pdata_section): Add cast to unsigned long.
2014-12-24AVR: Document linker relaxation related options.Andrew Burgess2-0/+15
Adds documentation describing the -mlink-relax and -mno-link-relax command line options. gas/ChangeLog: * doc/c-avr.texi: Document -mlink-relax and -mno-link-relax.
2014-12-24AVR: Assembler now prepares for linker relaxation by default.Andrew Burgess12-18/+56
Have the assembler prepare for linker relaxation by default. This means that users will be able to make use of linker relaxation without having to adjust the assembler flags, this can make life easier when compiling libraries. Having this on by default in the assembler should make no difference to the assembler code produced, however, some of the debug information will be slightly less compressed. A few tests needed to be updated as a result of this change as they relied on linker relaxation support being off by default. I've tightened up the definition of which sections can be relaxed on AVR as part of this commit, the assembler used to think that all non-debugging sections could be relaxed, when in reality only code sections can be relaxed for AVR. The previous definition was not dangerous, just over cautious. The new tighter definition allows an extra test (gas/testsuite/gas/all/forward.d) to continue to pass. gas/ChangeLog: * config/tc-avr.c (struct avr_opt_s): Change link_relax to no_link_relax, extend comment. (enum options): Add new OPTION_NO_LINK_RELAX. (md_longopts): Add entry for -mno-link-relax. (md_parse_option): Handle OPTION_NO_LINK_RELAX, and update OPTION_LINK_RELAX. (md_begin): Initialise linkrelax from no_link_relax. (md_show_usage): Include -mno-link-relax option. (relaxable_section): Only allocatable code sections can be relaxed. * config/tc-avr.h (TC_LINKRELAX_FIXUP): Define. gas/testsuite/ChangeLog: * gas/all/gas.exp: Test will not pass on AVR due to linker relaxation support. * gas/avr/noreloc_withoutrelax.d: Add -mno-link-relax option. * gas/avr/link-relax-elf-flag-clear.d: Likewise. ld/testsuite/ChangeLog: * ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax option. * ld/testsuite/ld-avr/relax-elf-flags-03.d: Likewise. * ld/testsuite/ld-avr/relax-elf-flags-04.d: Likewise. * ld/testsuite/ld-avr/relax-elf-flags-05.d: Likewise. * ld/testsuite/ld-avr/relax-elf-flags-06.d: Likewise.
2014-12-24This patch fixes a snafu where the -D and -U short versions of theAlexander Cherepanov2-2/+8
--enable-deterministic-archives and --disable-deteministic-archive options were not being accepted. PR binutils/17671 * objcopy.c (copy_main, strip_main): Add D and U to the list of accepted short versions of long options.
2014-12-24Add support for moxie's mul.x and umul.x instructionsAnthony Green2-2/+28
2014-12-24Add mul.x and umul.x instructions to moxie portAnthony Green2-9/+14
2014-12-24Don't create .eh_frame_hdr on shared lib bfdAlan Modra2-1/+10
If no object files have .eh_frame, but some shared library does, then ld creates a .eh_frame_hdr section using the shared library bfd. This is silly since shared library .eh_frame sections don't contribute to the output .eh_frame and thus no .eh_frame_hdr is needed. Also, the bfd section list and count is cleared for shared libraries, and a zero section count used as a flag in lang_check to omit a call to bfd_merge_private_bfd_data for shared libraries. If we create a section on a shared lib bfd then ld will wrongly attempt to merge the shared library private bfd data. PR 17742 * ld/emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Exclude shared libraries in loop looking for .eh_frame sections. Similarly for build-id loop.
2014-12-24This patch adds support for printing out the pdata section of PE objects.Pierre Muller3-25/+126
* pe-x86_64.c (pex64_bfd_print_pdata): Add external declaration. (bfd_pe_print_data): Set macro to pex64_bfd_print_data. * pei-x86_64.c (pex64_bfd_print_pdata): Changed to global function. Now handles multiple .pdata sections. (pex_bfd_print_pdata_section): New static helper function, using most of old pex_bfd_print_pdata function code, but adding support for coff pe objects, which might have some fields starting at zero offset. (pex64_print_all_pdata_sections) : New static helper function, used in call to bfd_map_over_sections inside new pex66_bfd_print_pdata function. (bfd_boolean pdata_count): New static variable, used to return bfd_boolean value for pex64_bfd_print_pdata function.
2014-12-24Reverts an "enhancement" made in a previous delta which complained ofNick Clifton2-7/+7
unprocessed augmentation data at the end of a CIE. * dwarf.c (read_cie): Revert check for unused augmentation data - it was bogus.
2014-12-24Fix generic linker symbol output when weak is overridden by strongAlan Modra2-1/+6
Yes, I know this also affects bfd_link_hash_indirect, but output of indirect and warning symbols looks quite broken anyway. * linker.c (_bfd_generic_link_output_symbols): Remove BSF_WEAK flag from bfd_link_hash_defined symbols.
2014-12-24Yet another DEFINED testcaseAlan Modra5-0/+63
* ld-scripts/defined6.s, * ld-scripts/defined6.t, * ld-scripts/defined6.d: New test. * ld-scripts/defined.exp: Run it.
2014-12-24Automatic date update in version.inGDB Administrator1-1/+1
2014-12-23Clarify strip docs.Andrew Stubbs3-2/+8
binutils/ * objcopy.c (strip_usage): Reword --remove-section description. * doc/binutils.texi (strip): Likewise.
2014-12-23Look up primitive types as symbols.Doug Evans15-63/+411
gdb/ChangeLog: * ada-lang.c (user_select_syms): Only fetch symtab if symbol is objfile-owned. (cache_symbol): Ignore symbols that are not objfile-owned. * block.c (block_objfile): New function. (block_gdbarch): New function. * block.h (block_objfile): Declare. (block_gdbarch): Declare. * c-exp.y (classify_name): Remove call to language_lookup_primitive_type. No longer necessary. * gdbtypes.c (lookup_typename): Call lookup_symbol_in_language. Remove call to language_lookup_primitive_type. No longer necessary. * guile/scm-symbol.c (syscm_gdbarch_data_key): New static global. (syscm_gdbarch_data): New struct. (syscm_init_arch_symbols): New function. (syscm_get_symbol_map): Renamed from syscm_objfile_symbol_map. All callers updated. Handle symbols owned by arches. (gdbscm_symbol_symtab): Handle symbols owned by arches. (gdbscm_initialize_symbols): Initialize syscm_gdbarch_data_key. * language.c (language_lookup_primitive_type_1): New function. (language_lookup_primitive_type): Call it. (language_alloc_type_symbol): New function. (language_init_primitive_type_symbols): New function. (language_lookup_primitive_type_as_symbol): New function. * language.h (struct language_arch_info) <primitive_type_symbols>: New member. (language_lookup_primitive_type): Add function comment. (language_lookup_primitive_type_as_symbol): Declare. * printcmd.c (address_info): Handle arch-owned symbols. * python/py-symbol.c (sympy_get_symtab): Ditto. (set_symbol): Ditto. (sympy_dealloc): Ditto. * symmisc.c (print_symbol): Ditto. * symtab.c (fixup_symbol_section): Ditto. (lookup_symbol_aux): Initialize block_found. (basic_lookup_symbol_nonlocal): Try looking up the symbol as a primitive type. (initialize_objfile_symbol_1): New function. (initialize_objfile_symbol): Call it. (allocate_symbol): Call it. (allocate_template_symbol): Call it. (symbol_objfile): Assert symbol is objfile-owned. (symbol_arch, symbol_symtab, symbol_set_symtab): Ditto. * symtab.h (struct symbol) <owner>: Replaces member "symtab". (struct symbol) <is_objfile_owned>: New member. (SYMBOL_OBJFILE_OWNED): New macro. * cp-namespace.c (cp_lookup_bare_symbol): New arg langdef. All callers updated. Try to find the symbol as a primitive type. (lookup_namespace_scope): New arg langdef. All callers updated. Call cp_lookup_bare_symbol directly for simple bare symbols.
2014-12-23AVR/ld: Propagate link-relax elf header flag correctly.Andrew Burgess13-0/+160
The AVR target has an elf header flag to indicate if an object was assembler ready for linker relaxation. If a partial link is performed then it is important that the link-relax flag in the output object is set correctly, otherwise, during the final link, we might try to perform linker relaxation on code that was not assembled suitably. As the link-relax elf header covers the entire object file we must be conservative when setting the flag in the output object, so, for a partial link, any input object that does not have the link-relax flag set will cause the output object to also not have the link-relax flag set. This conservative approach could be softened in future, we only need to disable the link relax flag if an input file is not marked link-relax ready, and the input file contains a relaxable section. However, I've left this optimisation for a later day. For the final link I've overloaded the use of the link-relax elf header flag, in a final executable, the flag now indicates if the executable was built with linker relaxation on or not. ld/ChangeLog: * emultempl/avrelf.em: Add include of elf/avr.h. (avr_finish): New function. (LDEMUL_FINISH): Added. ld/testsuite/ChangeLog: * ld-avr/relax-elf-flags-01.d: New file. * ld-avr/relax-elf-flags-02.d: New file. * ld-avr/relax-elf-flags-03.d: New file. * ld-avr/relax-elf-flags-04.d: New file. * ld-avr/relax-elf-flags-05.d: New file. * ld-avr/relax-elf-flags-06.d: New file. * ld-avr/relax-elf-flags-07.d: New file. * ld-avr/relax-elf-flags-08.d: New file. * ld-avr/relax-elf-flags-a.s: New file. * ld-avr/relax-elf-flags-b.s: New file.
2014-12-23AVR: Only set link-relax elf flag when appropriate.Andrew Burgess9-2/+53
The AVR target uses a bit in the elf header flags to indicate if the object was assembled ready for linker relaxation. Previously this flag was always set, even when the object was not assembled ready for linker relaxation. This patch moves setting of the flag into the assembler, and sets it only when the assembler is preparing the file for linker relaxation. bfd/ChangeLog: * elf32-avr.c (bfd_elf_avr_final_write_processing): Don't set EF_AVR_LINKRELAX_PREPARED unconditionally. gas/ChangeLog: * config/tc-avr.c: Add include for elf/avr.h. (avr_elf_final_processing): New function. * config/tc-avr.h (elf_tc_final_processing): Define. (avr_elf_final_processing): Declare gas/testsuite/ChangeLog: * gas/avr/link-relax-elf-flag-clear.d: New file. * gas/avr/link-relax-elf-flag-set.d: New file. * gas/avr/link-relax-elf-flag.s: New file.
2014-12-23symtab.h (SYMBOL_DOMAIN_BITS): New macro.Doug Evans2-1/+10
gdb/ChangeLog: * symtab.h (SYMBOL_DOMAIN_BITS): New macro. (struct symbol) <domain>: Use it.
2014-12-23initialize_objfile_symbol: Renamed from initialize_symbol.Doug Evans4-3/+8
gdb/ChangeLog: * symtab.c (initialize_objfile_symbol): Renamed from initialize_symbol. All callers updated.
2014-12-23Add langdef arg to la_lookup_symbol_nonlocal.Doug Evans7-11/+24
gdb/ChangeLog: * language.h (struct language_defn) <la_lookup_symbol_nonlocal>: New arg language_defn. All uses updated.
2014-12-23Replace some symbol accessor macros with functions.Doug Evans26-87/+156
gdb/ChangeLog: * symtab.h (SYMBOL_SYMTAB): Delete (SYMBOL_OBJFILE): Delete. (symbol_symtab, symbol_set_symtab): Declare. (symbol_objfile, symbol_arch): Declare. * symtab.c (symbol_symtab): Replaces SYMBOL_SYMTAB. All uses updated. All references to symbol->symtab redirected through here. (symbol_set_symtab): New function. All assignments to SYMBOL_SYMTAB redirected through here. (symbol_arch): New function. (symbol_objfile): New function. Replaces SYMBOL_OBJFILE. All uses updated. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Call symbol_arch. * findvar.c (default_read_var_value): Call symbol_arch. * guile/scm-frame.c (gdbscm_frame_block): Call symbol_objfile. * jv-lang.c (add_class_symtab_symbol): Call symbol_arch. * printcmd.c (address_info): Call symbol_arch. * tracepoint.c (scope_info): Call symbol_arch.
2014-12-23This patch add support for cpu marvell-whitney.Nick Clifton2-0/+7
* gas/config/tc-arm.c (arm_cpus): Add core marvell-whitney.
2014-12-23Reformat the objdump.1 man output to avoid overlong lines.Nick Clifton2-19/+59
2014-12-23Report an error for script multiply defined symbolsAlan Modra2-9/+34
or maybe not just yet, but this is better than a FIXME. * ldexp.c (update_definedness): Return false if script symbol is redefining a strong symbol in an object. (exp_fold_tree_1 <etree_assign>): Set up for reporting a multiple definition error, but for now leave disabled.
2014-12-23Use a symbol flag bit to mark linker defined symbolsAlan Modra14-3/+77
Trying to use the SEC_LINKER_CREATED section flag to determine whether a symbol is linker defined fails to work on targets like alpha that define special SEC_COMMON sections. These might contain symbols that originated in an object file. include/ * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add linker_def. bfd/ * elflink.c (_bfd_elf_define_linkage_sym): Set linker_def. * linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def for CDEF, DEF, DEFW, COM. ld/ * ldexp.c (exp_fold_tree_1 <etree_provide>): Test linker_def. ld/testsuite/ * ld-powerpc/sdabase.s, * ld-powerpc/sdabase.t, * ld-powerpc/sdabase.d: New test. * ld-powerpc/sdabase2.t, * ld-powerpc/sdabase2.d: New test. * ld-powerpc/powerpc.exp: Run them.
2014-12-23Don't PROVIDE over top of common symbolsAlan Modra5-6/+30
This: int end[100000]; int main(void) { end[99999] = 0; return 0; } should not segfault. ld/ * ldexp.c (exp_fold_tree_1 <etree_provide>): Leave bfd_link_hash_common symbols alone. ld/testsuite/ * ld-elf/endsym.s, *ld-elf/endsym.d: New test.
2014-12-23Correct logic for "defined by object"Alan Modra2-4/+8
The old code missed testing bfd_link_hash_undefweak, and wrongly excluded bfd_link_hash_common symbols. It is also clearer to invert the set of enum bfd_link_hash_type values tested. bfd_link_hash_indirect and bfd_link_hash_warning will never appear here. * ldexp.c (update_definedness): Correct logic setting by_object.