daily update
New Ada maintenance command to ignore descriptive types (DWARF).

Currently, Ada debugging requires the use of certain GNAT-specific
encodings, which are generated by the compiler. These encodings
were created a long time ago to work around the fairly limited
capabilities of the stabs debugging format. With DWARF, the vast
majority of the encodings could be abandoned in favor of a pure
DWARF approach.

In order to make it easier to evaluate the quality of the DWARF
debugging information generated by the compiler, and how the debugger
handles it, we are introducing a small Ada-specific maintenance
setting which changes the debugger's behavior to ignore descriptive
types. Descriptive types are artificial types generated by the
compiler purely to give the debugger hints as to how to properly
decode certain properties of a type.  For instance, for array
types, it generates a parallel type whose name is the name of
the array suffixed with ___XA, whose contents tells us what
the array's index type is, and possibly its bounds. See GCC's
gcc/ada/exp_dbug.ads for the full description of all encodings.

This is only a first step, as this setting does not deactivate
all encodings; More settings dedicated to each type of encoding
will likely be implemented in the future, as we make progress.

gdb/ChangeLog:

        * ada-lang.c (maint_set_ada_cmdlist, maint_show_ada_cmdlist):
        New static globals.
        (maint_set_ada_cmd, maint_show_ada_cmd): New functions.
        (ada_ignore_descriptive_types_p): New static global.
        (find_parallel_type_by_descriptive_type): Return immediately
        if ada_ignore_descriptive_types_p is set.
        (_initialize_ada_language): Register new commands "maintenance
        set ada", "maintenance show ada", "maintenance set ada
        ignore-descriptive-types" and "maintenance show ada
        ignore-descriptive-types".
        * NEWS: Add entry for new "maint ada set/show
        ignore-descriptive-types" commands.

gdb/doc/ChangeLog:

        * gdb.texinfo (Ada Glitches): Document the new "maint ada set/show
        ignore-descriptive-types". commands.
Update the tic6x linker tests to match the current behaviour of the linker and readelf.

	PR binutils/16317
	* ld-tic6x/shlib-1.rd: Expect I attribute with RELA sections.
	* ld-tic6x/shlib-1b.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.

	PR binutils/16318
	* ld-tic6x/tic6x.exp: Expect C6000 osabi value in relocatable
	objects.
A recent update to the binutils means that RELA sections now have the
SHF_INFO_LINK bit set, which shows up in readelf section dumps.  This
has broken a couple of IA64 testcases in the gas testsuite, which are
fixed by this patch.

	PR binutils/16317
	* gas/ia64/group-2.d: Expect I attribute with RELA sections.
	* gas/ia64/xdata.d: Likewise.
The MSP430 linker contains emulations for old and obsolete MCU types.
Since all MCUs now have their own specific linker script (courtesy of
TI) there is no need for these emulations and so this patch removes
them.

	* Makefile.am: Remove obsolete MSP430 emulations.
	* configure.tgt: Likewise.
	* emulparams/msp430all.sh: Likewise.
	* Makefile.in: Regenerate.
A recent change to the BFD library has meant that the osabi field in
ELF headers will be copied from input files.  This in turn has broken
the strip-10 test in the binutils testsuite, so this patch updates the
expected output.

	PR binutils/16318
	* binutils-all/strip-10.d: Allow "System V" in the osabi field.
When parsing a DW_FORM_ref_addr attribute the CU containing the
abbreviation may not be the current CU.  Thus we need to make sure
that when we read the abbreviation we use the correct CU.

	* dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
	attributes select the CU containing the abbreviation, which may not
	be the current CU.
Fix typo in ppc64_standard_linkage7

The ppc64_standard_linkage7 pattern added by Alan's recent patch:
https://sourceware.org/ml/gdb-patches/2013-11/msg00274.html
contains a typo: the ELFv2 TOC slot offset is 24, not 40.
This was correct in the comment, but not the actual code.

ChangeLog:

	* ppc64-tdep.c (ppc64_standard_linkage7): Fix typo.
Fix info-shared.exp testcase to expect the leading `.' found on ppc64's symbols.

gdb/testsuite/
2014-01-28  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* gdb.base/info-shared.exp: Expect leading `.' on ppc64's symbols.
Add .gdb_index version 7 support.

This patch adds support for .gdb_index version 7, which adds several
flag bits to the symbol index.  It also fixes a problem where it did
not handle compressed debug sections correctly.

Tested with a google/gcc-4_8 branch compiler, which supports
the -ggnu-pubnames option to generate .debug_gnu_pubnames/pubtypes
tables. (We will submit that patch to GCC when stage 1 reopens.)

2014-01-28  Cary Coutant  <ccoutant@google.com>

	* gold/dwarf_reader.cc: include <utility> (for make_pair).
	(Dwarf_abbrev_table::do_read_abbrevs): Check for compressed
	debug sections.
	(Dwarf_ranges_table::read_ranges_table): Likewise.
	(Dwarf_pubnames_table::read_section): Check for GNU-style
	sections, and for compressed debug sections.
	(Dwarf_pubnames_table::read_header): Compute end address of table.
	(Dwarf_pubnames_table::next_name): Return flag_byte.  Check
	for end of list by offset, not by offset == 0.
	(Dwarf_info_reader::do_read_string_table): Check for compressed
	debug sections.
	* gold/dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table):
	Initialize new data members.
	(Dwarf_pubnames_table::next_name): return flag_byte.
	(Dwarf_pubnames_table::end_of_table_): New data member.
	(Dwarf_pubnames_table::is_gnu_style_): New data member.
	* gold/gdb-index.cc (gdb_index_version): Update to version 7.
	(Gdb_index_info_reader::read_pubtable): Read flag_byte.
	(Gdb_index_info_reader::read_pubnames_and_pubtypes): Don't
	read skeleton type unit DIEs.
	(Gdb_index::add_symbol): Add flag_byte; adjust all callers.
	(Gdb_index::do_write): Write flag_byte.
	* gold/gdb-index.h (Gdb_index::add_symbol): Add flags parameter.
	(Gdb_index::Cu_vector): Store flags along with cu indexes.
	* gold/testsuite/gdb_index_test_3.sh: Allow versions 4-7.
	* gold/testsuite/gdb_index_test_comm.sh: Likewise.
Minor reformatting in valops.c::value_slice

I noticed that a small lexical block was over indented by 2 characters.
So this patch starts by reducing the indentation.

While looking at this area of the code, I also noticed a couple of lines
that had trailing spaces, so this patch also removes them.

And finally, it fixes one tiny to put the assignment operator at
the start of the next line, rather than at the end of the first line.

gdb/ChangeLog:

        * valops.c (value_slice): Minor reformatting.
Following up on Tom's suggestion I am checking in a patch to replace the various
bfd_xxx_set macros with static inline functions, so that we can avoid compile time
warnings about comma expressions with unused values.

	* bfd-in.h (bfd_set_section_vma): Delete.
	(bfd_set_section_alignment): Delete.
	(bfd_set_section_userdata): Delete.
	(bfd_set_cacheable): Delete.
	* bfd.c (bfd_set_cacheable): New static inline function.
	* section.c (bfd_set_section_userdata): Likewise.
	(bfd_set_section_vma): Likewise.
	(bfd_set_section_alignment): Likewise.
	* bfd-in2.h: Regenerate.
My patch to the binutils strip-10.d test was wrong.  The osabi field should always be set to
ELFOSABI_GNU for binaries containing unique symbols.  So I am reverting that patch and
instead applying the patch below to fix up the targets that were triggering the test failure.

bfd/ChangeLog
2014-01-29  Nick Clifton  <nickc@redhat.com>

	* elf32-metag.c (elf_metag_post_process_headers): Call
	_bfd_elf_post_process_headers.
	* elf32-sh64.c (sh64_elf_copy_private_data): Call
	_bfd_elf_copy_private_data.
	* elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.

binutils/testsuite/ChangeLog
2014-01-29  Nick Clifton  <nickc@redhat.com>

	* binutils-all/strip-10.d: Revert previous delta.
This changeset makes sparc64_linux_step_trap to return 0 when a
breakpoint is set in a `ta 0x6d´ which is not a sigreturn syscall.  In
these cases no rt_frame exists in the stack and thus the read PC is
wrong.

ChangeLog
2014-01-29  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* sparc64-linux-tdep.c (sparc64_linux_step_trap): Get PC from
          the sigreturn register save area only if the syscall is
          sigreturn.

testsuite/ChangeLog
2014-01-29  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* gdb.arch/sparc-sysstep.exp: New file.
	* gdb.arch/sparc-sysstep.c: Likewise.

	* gdb.arch/Makefile.in (EXECUTABLES): Add sparc-sysstep.
Add rdynamic-1 test

It is added for

commit 409ff343a402799563f71f938138b29f8baf7a1c
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Nov 8 13:49:11 2011 +0000

      * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
      executables when export_dynamic.

	* ld-elf/rdynamic-1.c: New file.
	* ld-elf/rdynamic-1.rd: Likewise.

	* ld-elf/shared.exp (build_tests): Add rdynamic-1.
daily update
Fix shift for AVX512F gather/scatter instructions

opcodes/

2014-01-30  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
	    Jan Beulich  <jbeulich@suse.com>

	PR binutils/16490
	* i386-dis.c (OP_E_memory): Fix shift computation for
	vex_vsib_q_w_dq_mode.

gas/testsuite/

2014-01-30  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
	    Jan Beulich  <jbeulich@suse.com>

	PR binutils/16490
	* gas/i386/avx512f.d: Fix test output.
	* gas/i386/avx512f-intel.d: Likewise.
	* gas/i386/x86-64-avx512f.d: Likewise.
	* gas/i386/x86-64-avx512f-intel.d: Likewise.
Add support for AT_HWCAP2 auxv entry

Recent ppc64 Linux kernels provide a new auxv entry AT_HWCAP2,
which is currently not recognized by GDB, causing every use of
"info auxv" to show an error.

This commit adds the AT_HWCAP2 define to include/elf/common.h
and handles it in GDB.

include/elf/ChangeLog:

	* common.h (AT_HWCAP2): Define.

gdb/ChangeLog:

	* auxv.c (fprint_target_auxv): Handle AT_HWCAP2.
daily update
Nios II CALL26 linker relaxation

2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>

	bfd/
	* bfd-in2.h: Update from reloc.c.
	* elf32-nios2.c: Include elf32-nios2.h.
	(elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
	(nios2_reloc_map): Likewise.
	(enum elf32_nios2_stub_type): Declare.
	(struct elf32_nios2_stub_hash_entry): Declare.
	(nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
	(struct elf32_nios2_link_hash_entry): Add hsh_cache field.
	(struct elf32_nios2_link_hash_table): Add new fields bstab,
	stub_bfd, add_stub_section, layout_sections_again, stub_group,
	bfd_count, top_index, input_list, all_local_syms.
	(nios2_call26_stub_entry): New.
	(nios2_elf32_install_imm16): Move up in file.
	(nios2_elf32_install_data): Move up in file.
	(hiadj): Move up in file.
	(stub_hash_newfunc): New.
	(link_hash_newfunc): Initialize hsh_cache field.
	(STUB_SUFFIX): New.
	(nios2_stub_name): New.
	(nios2_get_stub_entry): New.
	(nios2_add_stub): New.
	(nios2_elf32_setup_section_lists): New.
	(nios2_elf32_next_input_section): New.
	(CALL26_SEGMENT): New.
	(MAX_STUB_SECTION_SIZE): New.
	(group_sections): New.
	(nios2_type_of_stub): New.
	(nios2_build_one_stub): New.
	(nios2_size_one_stub): New.
	(get_local_syms): New.
	(nios2_elf32_size_stubs): New.
	(nios2_elf32_build_stubs): New.
	(nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
	(nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT.  Add
	trampolines for R_NIOS2_CALL26 stubs.
	(nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
	(nios2_elf32_gc_sweep_hook): Likewise.
	(nios2_elf32_link_hash_table_create): Initialize the stub hash table.
	(nios2_elf32_link_hash_table_free): New.
	(bfd_elf32_bfd_link_hash_table_free): Define.
	* elf32-nios2.h: New file.
	* libbfd.h: Update from reloc.c.
	* reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.

	gas/
	* config/tc-nios2.c (md_apply_fix): Handle BFD_RELOC_NIOS2_CALL26_NOAT.
	(nios2_assemble_args_m): Likewise.
	(md_assemble): Likewise.

	gas/testsuite/
	* gas/nios2/call26_noat.d: New.
	* gas/nios2/call26_noat.s: New.
	* gas/nios2/call_noat.d: New.
	* gas/nios2/call_noat.s: New.

	include/elf/
	* nios2.h (elf_nios2_reloc_type): Add R_NIOS2_CALL26_NOAT.

	ld/
	* Makefile.am (enios2elf.c, enios2linux.c): Update dependencies.
	* Makefile.in: Regenerated.
	* emulparams/nios2elf.sh (EXTRA_EM_FILE): Set.
	* emulparams/nios2linux.sh (EXTRA_EM_FILE): Set.
	* emultempl/nios2elf.em: New file.
	* gen-doc.texi (NIOSII): Set.
	* ld.texinfo (NIOSII): Set.

	ld/testsuite/
	* ld-nios2/relax_call26.s: New.
	* ld-nios2/relax_call26_boundary.ld: New.
	* ld-nios2/relax_call26_boundary.s: New.
	* ld-nios2/relax_call26_boundary_c8.d: New.
	* ld-nios2/relax_call26_boundary_cc.d: New.
	* ld-nios2/relax_call26_boundary_d0.d: New.
	* ld-nios2/relax_call26_boundary_d4.d: New.
	* ld-nios2/relax_call26_boundary_d8.d: New.
	* ld-nios2/relax_call26_boundary_dc.d: New.
	* ld-nios2/relax_call26_boundary_f0.d: New.
	* ld-nios2/relax_call26_boundary_f4.d: New.
	* ld-nios2/relax_call26_boundary_f8.d: New.
	* ld-nios2/relax_call26_boundary_fc.d: New.
	* ld-nios2/relax_call26_cache.d: New.
	* ld-nios2/relax_call26_cache.ld: New.
	* ld-nios2/relax_call26_cache.s: New.
	* ld-nios2/relax_call26_multi.d: New.
	* ld-nios2/relax_call26_multi.ld: New.
	* ld-nios2/relax_call26_norelax.d: New.
	* ld-nios2/relax_call26_shared.d: New.
	* ld-nios2/relax_call26_shared.ld: New.