]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
9 years ago[AArch64] Let aliased instructions be their preferred form.
Matthew Wahab [Fri, 27 Nov 2015 15:02:26 +0000 (15:02 +0000)] 
[AArch64] Let aliased instructions be their preferred form.

Although the AArch64 backend supports aliased instructions, the aliasing
forms are always preferred over the real instruction. This makes it
awkward to handle instructions which have aliases but which are their
own preferred form.

This patch includes the instruction being aliased in the list of
alternatives which is searched when considering which form to use.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-dis.c: Weaken assert.
* aarch64-gen.c: Include the instruction in the list of its
possible aliases.

9 years ago[Aarch64] Support an ARMv8.2 system register.
Matthew Wahab [Fri, 27 Nov 2015 13:44:10 +0000 (13:44 +0000)] 
[Aarch64] Support an ARMv8.2 system register.

ARMv8.2 adds a new system register id_aa64mmfr2_el1. This patch adds
support for the register to binutils, making it available when
-march=armv8.2-a is selected.

opcodes/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add "id_aa64mmfr2_el1".
(aarch64_sys_reg_supported_p): Add ARMv8.2 system register
feature test.

gas/testsuite/
2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/sysreg-2.d: New.
* gas/aarch64/sysreg-2.s: New.

Change-Id: Ice6aad245ae9e6cedbc800c9a098ae50bbd8e70e

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Dec 2015 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Dec 2015 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Dec 2015 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Dec 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoPowerPC ifunc with local symbols
Alan Modra [Mon, 7 Dec 2015 03:22:01 +0000 (13:52 +1030)] 
PowerPC ifunc with local symbols

This fixes some cases where the linker would incorrectly error on plt
relocs to local ifunc symbols.  I've also tidied plt and ifunc
handling for ppc64, where check_relocs was allowing for the
possibility of plt calls via addr14/addr24 relocs but relocate_section
was not.

* elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc
plt call.  Wrap long lines.
(ppc_elf_relocate_section): Wrap long lines.
* elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc
plt calls.  Move __tls_get_addr checks later.  Don't create plt
for addr14/addr24 relocs.
(ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
(ppc64_elf_relocate_section): Correct local ifunc handling for
PLT64, PLT32 and PLT16 relocs.

9 years agoPR19323 memory allocation greater than 4G
Alan Modra [Mon, 7 Dec 2015 03:11:36 +0000 (13:41 +1030)] 
PR19323 memory allocation greater than 4G

On 32-bit targets, memory requested for program/section headers on a
fuzzed binary can wrap to 0.  A bfd_alloc of zero bytes actually
returns a one byte allocation rather than a NULL pointer.  This then
leads to buffer overflows.

Making this check unconditional triggers an extremely annoying gcc-5
warning.

PR 19323
* elfcode.h (elf_object_p): Check for ridiculous e_shnum and
e_phnum values.

9 years ago[GOLD] R_PPC64_ENTRY support
Alan Modra [Mon, 7 Dec 2015 02:45:24 +0000 (13:15 +1030)] 
[GOLD] R_PPC64_ENTRY support

elfcpp/
* powerpc.h (R_PPC64_ENTRY): Define.
gold/
* powerpc.cc (add_2_2_12, ld_2_12, lis_2): Define.
(Target_powerpc::Scan::local, global): Handle R_PPC64_ENTRY.
(Target_powerpc::Relocate::relocate): Edit code at R_PPC64_ENTRY.

9 years agoR_PPC64_ENTRY
Alan Modra [Mon, 7 Dec 2015 02:44:53 +0000 (13:14 +1030)] 
R_PPC64_ENTRY

Add a new relocation that marks large-model entry code, for edit back
to medium-model.

include/elf/
* ppc64.h (R_PPC64_ENTRY): Define.
bfd/
* reloc.c (BFD_RELOC_PPC64_ENTRY): New.
* elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add
entry for R_PPC64_ENTRY.
(LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define.
(ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY.
(ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY.  Use
new insn defines.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.

9 years agoaddr2line vs. inlined C functions called from C++
Alan Modra [Wed, 2 Dec 2015 05:16:48 +0000 (15:46 +1030)] 
addr2line vs. inlined C functions called from C++

In this case the inlined function doesn't have DW_AT_linkage_name in
.debug_info, but the language is C++ so find_nearest_line goes looking
in the symbol table.  Since the function is inlined the enclosing
non-inline function symbol is returned from _bfd_elf_find_function,
which is wrong.  This patch only uses a symbol if its address matches.

PR binutils/19315
* dwarf2.c (_bfd_elf_find_function): Return symbol matched.
(_bfd_dwarf2_find_nearest_line): Check symbol returned above
against dwarf range.
* elf-bfd.h (_bfd_elf_find_function): Update prototype.

9 years agoFix powerpc64 segfault caused by zero r_symndx relocs.
Alan Modra [Wed, 2 Dec 2015 08:19:53 +0000 (18:49 +1030)] 
Fix powerpc64 segfault caused by zero r_symndx relocs.

Fixes a segfault in ppc64_elf_tls_optimize found when testing
R_PPC64_ENTRY, and potential for trouble in other places found by
code inspection.

* elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL
symbol section or output section.
(ppc64_elf_edit_toc): Similarly for ld -R objects.
(ppc64_elf_size_stubs): Likewise.

9 years agoobjdump: Handle 32-bit base address in debug_ranges / debug_loc.
Andrew Burgess [Fri, 16 Oct 2015 09:58:02 +0000 (11:58 +0200)] 
objdump: Handle 32-bit base address in debug_ranges / debug_loc.

When the DWARF address size is 32-bit, but the host machine is 64-bit,
objdump fails to spot base addresses specified in the .debug_ranges and
.debug_loc lists.

As an example, here is the output when dumping an example .debug_ranges
section with the pre-patched objdump:

    Contents of the .debug_ranges section:

        Offset   Begin    End
        00000000 ffffffff 00000004 (start > end)
        00000000 00000000 00000004
        00000000 ffffffff 00000008 (start > end)
        00000000 00000000 00000004
        00000000 <End of list>

And this is what the same section looks like when dumped with the
patched version of objdump:

    Contents of the .debug_ranges section:

        Offset   Begin    End
        00000000 ffffffff 00000004 (base address)
        00000000 00000004 00000008
        00000000 ffffffff 00000008 (base address)
        00000000 00000008 0000000c
        00000000 <End of list>

binutils/ChangeLog:

* dwarf.c (is_max_address): New function.
(display_loc_list): Remove out of date comment, use
is_max_address.
(display_debug_ranges): Likewise.

binutils/testsuite/ChangeLog:

* binutils-all/objdump.exp: Add test for .debug_ranges decode.
* binutils-all/dw2-ranges.S: New file.
* binutils-all/dw2-ranges.W: New file.

9 years agoAdjust local symbol value in relocatable link to be relative to section.
Cary Coutant [Wed, 25 Nov 2015 16:50:41 +0000 (08:50 -0800)] 
Adjust local symbol value in relocatable link to be relative to section.

gold/
PR gold/19291
* object.cc (Sized_relobj_file::write_local_symbols): If relocatable,
subtract section address from symbol value.

9 years ago[GOLD] Align PowerPC64 GOT
Alan Modra [Wed, 25 Nov 2015 03:08:43 +0000 (13:38 +1030)] 
[GOLD] Align PowerPC64 GOT

As done in a27e685f for bfd ld.

* powerpc.cc (Output_data_got_powerpc::Output_data_got_powerpc): Align
to 256 byte boundary.

9 years agoFix a problem with the maximum number of open files held in the cache when running...
Stefan Teleman [Fri, 20 Nov 2015 15:28:40 +0000 (15:28 +0000)] 
Fix a problem with the maximum number of open files held in the cache when running on a 32-bit Solaris host.

PR ld/19260
* cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
Solaris as the result is unreliable.

9 years ago[GOLD] PowerPC TOC16 and GOT16 relocs are relative
Alan Modra [Thu, 19 Nov 2015 06:29:36 +0000 (16:59 +1030)] 
[GOLD] PowerPC TOC16 and GOT16 relocs are relative

* powerpc.cc (Target_powerpc::Scan::get_reference_flags): Correct
GOT16 and TOC16 relocs to RELATIVE_REF.

9 years agoFix problem where bss symbols for copy relocations are marked local.
Cary Coutant [Sat, 14 Nov 2015 19:04:01 +0000 (11:04 -0800)] 
Fix problem where bss symbols for copy relocations are marked local.

gold/
PR gold/19244
PR gold/18548
* symtab.cc (Symbol_table::do_define_in_output_data): Check for forced
local symbols only for predefined symbols.

9 years agoRecent powerpc testcase fails
Alan Modra [Thu, 19 Nov 2015 06:27:49 +0000 (16:57 +1030)] 
Recent powerpc testcase fails

On powerpcle-cygwin a couple of tests fail due to alignment.

* gas/ppc/altivec3.d: Allow for padding at end of section.
* gas/testsuite/gas/ppc/power9.d: Likewise.

9 years agoAccount for .tbss alignment when adjusting start of relro
Alan Modra [Thu, 19 Nov 2015 04:30:13 +0000 (15:00 +1030)] 
Account for .tbss alignment when adjusting start of relro

Another option might be to not bump "dot" for .tbss alignment in the
main section sizing loop, but that could leak some of the following
section into the TLS segment.  Leakage shouldn't matter since it will
be to bytes past the end of .tdata, but for now this is a safer
option.

PR ld/19264
* ldlang.c (lang_size_sections): Don't ignore .tbss when
adjusting start of relro region.

9 years agoPrevent looping in archives
Alan Modra [Wed, 18 Nov 2015 11:42:23 +0000 (22:12 +1030)] 
Prevent looping in archives

PR 19256
* archive.c (bfd_generic_openr_next_archived_file): Don't allow
backward file movement via "negative" sizes.
* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Dec 2015 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoImplement Intel OSPKE instructions
H.J. Lu [Wed, 9 Dec 2015 16:01:57 +0000 (08:01 -0800)] 
Implement Intel OSPKE instructions

This patch implements Intel OSPKE instructions documented in Intel64
and IA-32 Architectures Software Developer’s Manual Volume 2, September
2015.

gas/testsuite/

* gas/i386/i386.exp: Run ospke and x86-64-ospke.
* gas/i386/ospke.d: New file.
* gas/i386/ospke.s: Likewise.
* gas/i386/x86-64-ospke.d: Likewise.

opcodes/

* i386-dis.c (MOD_0F01_REG_5): New.
(RM_0F01_REG_5): Likewise.
(reg_table): Use MOD_0F01_REG_5.
(mod_table): Add MOD_0F01_REG_5.
(rm_table): Add RM_0F01_REG_5.
* i386-gen.c (cpu_flag_init): Add CPU_OSPKE_FLAGS.
(cpu_flags): Add CpuOSPKE.
* i386-opc.h (CpuOSPKE): New.
(i386_cpu_flags): Add cpuospke.
* i386-opc.tbl: Add rdpkru and wrpkru instructions.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.

(cherry picked from commit 8eab413676a0222a863f45ff606f3db69bb7afc4)

9 years ago[AArch64] Add ARMv8.2 command line option and feature flag.
Matthew Wahab [Wed, 9 Dec 2015 13:10:59 +0000 (13:10 +0000)] 
[AArch64] Add ARMv8.2 command line option and feature flag.

ARMv8.2 is an architectural extension of ARMv8. This patch adds an
architecture feature macro for ARMv8.2 to the binutils AArch64 target
with GAS command line option -march=armv8.2-a.

gas/
2015-12-09  Matthew Wahab  <matthew.wahab@arm.com>

* config/tc-aarch64.c (aarch64_archs): Add "armv8.2-a".
* doc/c-aarch64.texi (-march): Likewise.

include/opcode/
2015-12-09  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_V8_2): New.
(AARCH64_ARCH_V8_2): New.

Change-Id: I79fb1b61cdd24acb1d55e29dfa84cfb86615603a

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Dec 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years ago[AArch64] Add support for ARMv8.1 Virtualization Host Extensions.
Matthew Wahab [Tue, 8 Dec 2015 09:51:10 +0000 (09:51 +0000)] 
[AArch64] Add support for ARMv8.1 Virtualization Host Extensions.

The ARMv8.1 architecture includes the Virtualization Host Extensions
which add a number of system registers. This patch adds support for
these system registers, making them available when -march=armv8.1-a is
selected.

include/opcode/
2015-12-08  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64.h (AARCH64_FEATURE_V8_1): New.
(AARCH64_ARCH_v8_1): Add AARCH64_FEATURE_V8_1.

opcodes/
2015-12-08  Matthew Wahab  <matthew.wahab@arm.com>

* aarch64-opc.c (aarch64_sys_regs): Add spsr_el12, elr_el12,
sctlr_el12, cpacr_el12, ttbr1_el2, ttbr0_el12, ttbr1_el12,
tcr_el12, afsr0_el12, afsr1_el12, esr_el12, far_el12, mair_el12,
amair_el12, vbar_el12, contextidr_el2, contextidr_el12,
cntkctl_el12, cntp_tval_el02, cntp_ctl_el02, cntp_cval_el02,
cntv_tval_el02, cntv_ctl_el02, cntv_cval_el02, cnthv_tval_el2,
cnthv_ctl_el2, cnthv_cval_el2.
(aarch64_sys_reg_supported_p): Update for the new system
registers.

gas/testsuite/
2015-12-08  Matthew Wahab  <matthew.wahab@arm.com>

* gas/aarch64/virthostext-directive.d: New.
* gas/aarch64/virthostext.d: New.
* gas/aarch64/virthostext.s: New.

Change-Id: I698545c1b59a2de46581f7fe4e156ea14b6a0c68

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Dec 2015 00:01:25 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Dec 2015 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Dec 2015 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoOptimize R_386_GOT32/R_386_GOT32X only if addend is 0
H.J. Lu [Fri, 4 Dec 2015 16:43:45 +0000 (08:43 -0800)] 
Optimize R_386_GOT32/R_386_GOT32X only if addend is 0

Linker can't optimize R_386_GOT32 and R_386_GOT32X relocations if addend
isn't 0.  It isn't valid to convert

movl foo@GOT+1(%ecx), %eax

to

leal foo@GOTOFF+1(%ecx), %eax

nor to convert

movq foo@GOTPCREL+1(%rip), %rax

to

leaq foo(%rip), %rax

for x86-64.  We should check if addend is 0 before optimizing R_386_GOT32
and R_386_GOT32X relocations.  Testcases are added for i386 and x86-64.

bfd/

* elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0.
(elf_i386_relocate_section): Skip R_386_GOT32X optimization if
addend isn't 0.

ld/testsuite/

* ld-i386/i386.exp: Run mov2a, mov2b and mov3.
* ld-i386/mov2.s: New file.
* ld-i386/mov2a.d: Likewise.
* ld-i386/mov2b.d: Likewise.
* ld-i386/mov3.d: Likewise.
* ld-i386/mov3.s: Likewise.
* ld-x86-64/mov2.s: Likewise.
* ld-x86-64/mov2a.d: Likewise.
* ld-x86-64/mov2b.d: Likewise.
* ld-x86-64/mov2c.d: Likewise.
* ld-x86-64/mov2d.d: Likewise.
* ld-x86-64/x86-64.exp: Run mov2a, mov2b, mov2c and mov2d.

(cherry picked from commit 02e2aef89bb58e8e0cc4390db41c5f775e1b7c3e)

9 years agoProperly check symbol defined by assignment in linker script
H.J. Lu [Tue, 1 Dec 2015 22:45:51 +0000 (14:45 -0800)] 
Properly check symbol defined by assignment in linker script

Symbol defined by a linker assignment may have type bfd_link_hash_new
or bfd_link_hash_undefined.  And h->def_regular is always set.
elf_i386_convert_load and elf_x86_64_convert_load should check
h->def_regular as well as bfd_link_hash_undefined and bfd_link_hash_new
to see if a symbol is defined by a linker script.

bfd/

PR ld/19319
* elf32-i386.c (elf_i386_convert_load): Check h->def_regular
instead of bfd_link_hash_new.
* elf64-x86-64.c (elf_x86_64_convert_load): Likewise.  Skip
relocation overflow for bfd_link_hash_undefined and
bfd_link_hash_new if h->def_regular is set.

ld/testsuite/

PR ld/19319
* ld-i386/i386.exp: Run pr19319 test.
* ld-x86-64/x86-64.exp: Likewise.
* ld-i386/pr19319.dd: New file.
* ld-i386/pr19319a.S: Likewise.
* ld-i386/pr19319b.S: Likewise.
* ld-x86-64/pr19319.dd: Likewise.
* ld-x86-64/pr19319a.S: Likewise.
* ld-x86-64/pr19319b.S: Likewise.

(cherry picked from commit ead3d5427a2df5e33316d4ad045510c1d2078c2a)

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Dec 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Dec 2015 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Dec 2015 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Dec 2015 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Dec 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Nov 2015 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Nov 2015 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Nov 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Nov 2015 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Nov 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoFix building objcopy under mingw64
Thomas Preud'homme [Wed, 25 Nov 2015 06:29:00 +0000 (14:29 +0800)] 
Fix building objcopy under mingw64

2015-11-25  Tejas Belagod  <tejas.belagod@arm.com>

    Backport from mainline:
    2015-11-20  Ronald Hoogenboom  <hoogenboom30@zonnet.nl>

    * objcopy.c (parse_symflags): Use xstrndup in place of strndup.
    (copy_main): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Nov 2015 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoUpdate translations.
Nick Clifton [Fri, 20 Nov 2015 12:43:14 +0000 (12:43 +0000)] 
Update translations.

binutils * po/ca.po: New Catalan translation.
* configure.ac (ALL_LINGUAS): Add ca.
* configure: Regenerate.

gas * po/fr.po: Updated French translation.
* po/uk.po: Updated Ukraninan translation.
* po/zh_CN.po: New simplified Chinese translation.
* configure.ac (ALL_LINGUAS): Add zh_CN.
* configure: Regenerate.

opcodes * po/zh_CN.po: Updated simplified Chinese translation.

9 years agoImport fix from mainline to allow the building of GAS for the microblaze architecture...
Mike Frysinger [Wed, 18 Nov 2015 13:08:51 +0000 (13:08 +0000)] 
Import fix from mainline to allow the building of GAS for the microblaze architecture on a 64-bit host.

* config/tc-microblaze.c (parse_imm): Add an offsetT cast.

9 years agoAdjust version on the 2.26 branch
Tristan Gingold [Fri, 13 Nov 2015 11:30:18 +0000 (12:30 +0100)] 
Adjust version on the 2.26 branch

bfd/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.25.90
* configure: Regenerate.

binutils/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoBump version to 2.26.51
Tristan Gingold [Fri, 13 Nov 2015 08:33:21 +0000 (09:33 +0100)] 
Bump version to 2.26.51

bfd/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.26.51
* configure: Regenerate.

binutils/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoAdd markers for release 2.26
Tristan Gingold [Fri, 13 Nov 2015 08:30:08 +0000 (09:30 +0100)] 
Add markers for release 2.26

binutils/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.26.

gas/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.26.

ld/
2015-11-13  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.26.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Nov 2015 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoRevert "[LD][AARCH64]Add TLSIE relaxation support under large memory model."
Marcus Shawcroft [Thu, 12 Nov 2015 15:15:28 +0000 (15:15 +0000)] 
Revert "[LD][AARCH64]Add TLSIE relaxation support under large memory model."

This reverts commit 3ebe65c0ff9f8f76c9971b1cc078273298f0c693.

Reverted due to PR19188

9 years ago[AArch64] Add support for Cortex-A35
James Greenhalgh [Thu, 12 Nov 2015 12:04:22 +0000 (12:04 +0000)] 
[AArch64] Add support for Cortex-A35

This patch adds support to the AArch64 back-end for the Cortex-A35
processor, as recently announced by ARM. The ARM Cortex-A35 provides
full support for the ARMv8-A architecture, including the CRC extension,
with optional Advanced-SIMD and Floating-Point support. We therefore set
feature flags for this CPU to AARCH64_ARCH_V8 and AARCH64_FEATURE_CRC, in
the same fashion as Cortex-A53 and Cortex-A57.

Tested in a cross environment for AArch64 with no issues.

9 years agoFix dates in Changelog for previous commit.
Ramana Radhakrishnan [Thu, 12 Nov 2015 11:13:58 +0000 (11:13 +0000)] 
Fix dates in Changelog for previous commit.

582cfe03cb7496371bc6d83af49b6324d0c36887

9 years agoAdd support for Cortex-A35
Ramana Radhakrishnan [Thu, 12 Nov 2015 11:12:53 +0000 (11:12 +0000)] 
Add support for Cortex-A35

2015-11-12  James Greenhalgh  <james.greenhalgh@arm.com>

* config/tc-arm.c (arm_cpus): Likewise.
* doc/c-arm.texi (-mcpu=): Likewise.

9 years agoFix PR gas/19217
Ramana Radhakrishnan [Thu, 12 Nov 2015 10:50:22 +0000 (10:50 +0000)] 
Fix PR gas/19217

2015-11-11  Matthew Wahab  <matthew.wahab@arm.com>

PR gas/19217
* config/tc-arm.c (move_or_literal_pool): Remove redundant feature
check.  Fix some code formatting.  Drop use of MOVT.  Add some
comments.

2015-11-11  Matthew Wahab  <matthew.wahab@arm.com>

PR gas/19217
        * gas/arm/thumb2_ldr_immediate_armv6t2.d: Update expected output.

9 years agoUse gdb_byte * instead of void * in push_stack_item
Yao Qi [Thu, 12 Nov 2015 09:14:20 +0000 (09:14 +0000)] 
Use gdb_byte * instead of void * in push_stack_item

gdb:

2015-11-12  Yao Qi  <yao.qi@linaro.org>

* arm-tdep.c (push_stack_item): Change contents type to
const gdb_byte *.

9 years agoAdd assembler, disassembler and linker support for power9.
Peter Bergner [Thu, 12 Nov 2015 01:52:52 +0000 (19:52 -0600)] 
Add assembler, disassembler and linker support for power9.

include/opcode/
* ppc.h (PPC_OPCODE_POWER9): New define.
(PPC_OPCODE_VSX3): Likewise.

opcodes/
* ppc-dis.c (ppc_opts): Add "power9" and "pwr9" entries.
Add PPC_OPCODE_VSX3 to the vsx entry.
(powerpc_init_dialect): Set default dialect to power9.
        * ppc-opc.c (insert_dcmxs, extract_dcmxs, insert_dxd, extract_dxd,
        insert_dxdn, extract_dxdn, insert_l0, extract_l0, insert_l1,
        extract_l1 insert_xtq6, extract_xtq6): New static functions.
        (insert_esync): Test for illegal L operand value.
(DCMX, DCMXS, DXD, NDXD, L0, L1, RC, FC, UIM6, X_R, RIC, PRS, XSQ6,
XTQ6, LRAND, IMM8, DQX, DQX_MASK, DX, DX_MASK, VXVAPS_MASK, VXVA,XVA,
XX2VA, XVARC, XBF_MASK, XX2UIM4_MASK, XX2BFD_MASK, XX2DCMXS_MASK,
XVA_MASK, XRLA_MASK, XBFRARB_MASK, XLRAND_MASK, POWER9, PPCVEC3,
PPCVSX3): New defines.
(powerpc_opcodes) <ps_cmpu0, ps_cmpo0, ps_cmpu1, ps_cmpo1, fcmpu,
fcmpo, ftdiv, ftsqrt>: Use XBF_MASK.
<mcrxr>: Use XBFRARB_MASK.
<addpcis, bcdcfn., bcdcfsq., bcdcfz., bcdcpsgn., bcdctn., bcdctsq.,
bcdctz., bcds., bcdsetsgn., bcdsr., bcdtrunc., bcdus., bcdutrunc.,
cmpeqb, cmprb, cnttzd, cnttzd., cnttzw, cnttzw., copy, copy_first,
cp_abort, darn, dtstsfi, dtstsfiq, extswsli, extswsli., ldat, ldmx,
lwat, lxsd, lxsibzx, lxsihzx, lxssp, lxv, lxvb16x, lxvh8x, lxvl, lxvll,
lxvwsx, lxvx, maddhd, maddhdu, maddld, mcrxrx, mfvsrld, modsd, modsw,
modud, moduw, msgsync, mtvsrdd, mtvsrws, paste, paste., paste_last,
rmieg, setb, slbieg, slbsync, stdat, stop, stwat, stxsd, stxsibx,
stxsihx, stxssp, stxv, stxvb16x, stxvh8x, stxvl, stxvll, stxvx,
subpcis, urfid, vbpermd, vclzlsbb, vcmpneb, vcmpneb., vcmpneh,
vcmpneh., vcmpnew, vcmpnew., vcmpnezb, vcmpnezb., vcmpnezh, vcmpnezh.,
vcmpnezw, vcmpnezw., vctzb, vctzd, vctzh, vctzlsbb, vctzw, vextractd,
vextractub, vextractuh, vextractuw, vextsb2d, vextsb2w, vextsh2d,
vextsh2w, vextsw2d, vextublx, vextubrx, vextuhlx, vextuhrx, vextuwlx,
vextuwrx, vinsertb, vinsertd, vinserth, vinsertw, vmul10cuq,
vmul10ecuq, vmul10euq, vmul10uq, vnegd, vnegw, vpermr, vprtybd,
vprtybq, vprtybw, vrldmi, vrldnm, vrlwmi, vrlwnm, vslv, vsrv, wait,
xsabsqp, xsaddqp, xsaddqpo, xscmpeqdp, xscmpexpdp, xscmpexpqp,
xscmpgedp, xscmpgtdp, xscmpnedp, xscmpoqp, xscmpuqp, xscpsgnqp,
xscvdphp, xscvdpqp, xscvhpdp, xscvqpdp, xscvqpdpo, xscvqpsdz,
xscvqpswz, xscvqpudz, xscvqpuwz, xscvsdqp, xscvudqp, xsdivqp,
xsdivqpo, xsiexpdp, xsiexpqp, xsmaddqp, xsmaddqpo, xsmaxcdp,
xsmaxjdp, xsmincdp, xsminjdp, xsmsubqp, xsmsubqpo, xsmulqp, xsmulqpo,
xsnabsqp, xsnegqp, xsnmaddqp, xsnmaddqpo, xsnmsubqp, xsnmsubqpo,
xsrqpi, xsrqpix, xsrqpxp, xssqrtqp, xssqrtqpo, xssubqp, xssubqpo,
xststdcdp, xststdcqp, xststdcsp, xsxexpdp, xsxexpqp, xsxsigdp,
xsxsigqp, xvcmpnedp, xvcmpnedp., xvcmpnesp, xvcmpnesp., xvcvhpsp,
xvcvsphp, xviexpdp, xviexpsp, xvtstdcdp, xvtstdcsp, xvxexpdp,
xvxexpsp, xvxsigdp, xvxsigsp, xxbrd, xxbrh, xxbrq, xxbrw, xxextractuw,
xxinsertw, xxperm, xxpermr, xxspltib>: New instructions.
<doze, nap, sleep, rvwinkle, waitasec, lxvx, stxvx>: Disable on POWER9.
<tlbiel, tlbie, sync, slbmfev, slbmfee>: Add additional operands.

include/elf/
* ppc.h (R_PPC_REL16DX_HA): New reloction.
* ppc64.h (R_PPC64_REL16DX_HA): Likewise.

bfd/
* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
(ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
(ppc_elf_addr16_ha_reloc): Likewise.
(ppc_elf_check_relocs): Likewise.
(ppc_elf_relocate_section): Likewise.
(is_insn_dq_form): Handle lxv and stxv instructions.
* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
(ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
(ppc64_elf_ha_reloc): Likewise.
(ppc64_elf_check_relocs): Likewise.
(ppc64_elf_relocate_section): Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.
* reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.

elfcpp/
* powerpc.h (R_POWERPC_REL16DX_HA): Define.

gas/
* doc/as.texinfo (Target PowerPC): Document -mpower9 and -mpwr9.
* doc/c-ppc.texi (PowerPC-Opts):  Likewise.
* config/tc-ppc.c (md_show_usage): Likewise.
(md_assemble): Handle BFD_RELOC_PPC_REL16DX_HA.
(md_apply_fix): Likewise.
(ppc_handle_align): Handle power9's group ending nop.

gas/testsuite/
* gas/ppc/altivec3.s: New test.
* gas/ppc/altivec3.d: Likewise.
* gas/ppc/vsx3.s: Likewise.
* gas/ppc/vsx3.d: Likewise.
* gas/ppc/power9.s: Likewise.
* gas/ppc/power9.d: Likewise.
* gas/ppc/ppc.exp: Run them.
* gas/ppc/power8.s <lxvx, lxvd2x, stxvx, stxvd2x>: Add new tests.
* gas/ppc/power8.d: Likewise.
* gas/ppc/vsx.s: <lxvx, stxvx>: Rename invalid mnemonics ...
<lxvd2x, stxvd2x>: ...to this.
* gas/ppc/vsx.d: Likewise.

gold/
* gold/powerpc.cc (Powerpc_relocate_functions::addr16_dq): New function.
(Powerpc_relocate_functions::addr16dx_ha): Likewise.
(Target_powerpc::Scan::local): Handle R_POWERPC_REL16DX_HA.
(Target_powerpc::Scan::global): Likewise.
(Target_powerpc::Relocate::relocate): Likewise.

ld/testsuite/
* ld-powerpc/addpcis.d: New test.
* ld-powerpc/addpcis.s: New test.
* ld-powerpc/powerpc.exp: Run it.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Nov 2015 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agogdb/testsuite/gdb.trace: Deduplicate set_point assembly.
Marcin Kościelnicki [Tue, 10 Nov 2015 11:12:00 +0000 (12:12 +0100)] 
gdb/testsuite/gdb.trace: Deduplicate set_point assembly.

The assembly code for emitting the proper tracepointable instruction
was duplicated in many places.  Keep it in one place, to reduce work
needed for new targets.

gdb/testsuite/ChangeLog:

* gdb.trace/change-loc.h: include "trace-common.h", remove SYMBOL
macro.
(func5): Removed.
(func4): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/ftrace-lock.c: include "trace-common.h", remove SYMBOL
macro.
(func): Removed.
(thread_function): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/ftrace.c: include "trace-common.h", remove SYMBOL macro.
(func): Remove.
(marker): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/pendshr1.c: include "trace-common.h", remove SYMBOL macro.
(pendfunc1): Remove.
(pendfunc): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/pendshr2.c: include "trace-common.h", remove SYMBOL macro.
(foo): Remove.
(pendfunc2): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/trace-break.c: include "trace-common.h", remove SYMBOL
macro.
(func): Remove.
(marker): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/trace-common.h: New header.
* gdb.trace/trace-condition.c: include "trace-common.h", remove SYMBOL
macro.
(func): Remove.
(marker): Use FAST_TRACEPOINT_LABEL.
* gdb.trace/trace-mt.c: include "trace-common.h", remove SYMBOL macro.
(func): Remove.
(thread_function): Use FAST_TRACEPOINT_LABEL.

9 years agoReplace long int * cast with PTRACE_TYPE_RET *
Simon Marchi [Wed, 11 Nov 2015 20:16:05 +0000 (15:16 -0500)] 
Replace long int * cast with PTRACE_TYPE_RET *

These casts uses the typedef target type (long int *) instead of the
typedef name.  This was a little mistake in one of the big C++ cast
patches.

gdb/ChangeLog:

* inf-ptrace.c (inf_ptrace_fetch_register): Change long int *
cast to PTRACE_TYPE_RET *.
(inf_ptrace_store_register): Likewise.

9 years agogdb: Make use of 'add_info' to create info sub-commands.
Andrew Burgess [Mon, 9 Nov 2015 20:27:55 +0000 (20:27 +0000)] 
gdb: Make use of 'add_info' to create info sub-commands.

Switch to using 'add_info' function for creating basic info
sub-commands.

gdb/ChangeLog:

* avr-tdep.c (_initialize_avr_tdep): Switch to 'add_info' for creating
info sub-commands.
* gnu-nat.c (add_task_commands): Likewise.
* macrocmd.c (_initialize_macrocmd): Likewise.

9 years agogdb: Use class_info when creating info commands.
Andrew Burgess [Sat, 7 Nov 2015 11:14:20 +0000 (11:14 +0000)] 
gdb: Use class_info when creating info commands.

The 'add_info' function is used for creating info commands, these
commands should be created as 'class_info' rather than 'no_class'.

gdb/ChangeLog:

* cli/cli-decode.c (add_info): Switch to class_info.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Nov 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agogdb/testsuite/gdb.trace: Deduplicate pcreg/spreg/fpreg.
Marcin Kościelnicki [Tue, 10 Nov 2015 08:52:29 +0000 (09:52 +0100)] 
gdb/testsuite/gdb.trace: Deduplicate pcreg/spreg/fpreg.

These variables were used in many gdb.trace tests.  Keep them in one place,
to reduce work needed for new targets.

gdb/testsuite/ChangeLog:

* gdb.trace/backtrace.exp: Use global fpreg/spreg definition, add $
in front.
* gdb.trace/change-loc.exp: Use global pcreg definition.
* gdb.trace/collection.exp: Use global pcreg/fpreg/spreg definition.
* gdb.trace/entry-values.exp: Use global spreg definition, add $
in front.
* gdb.trace/mi-trace-frame-collected.exp: Use global pcreg definition.
* gdb.trace/pending.exp: Likewise.
* gdb.trace/report.exp: Use global pcreg/fpreg/spreg definition.
* gdb.trace/trace-break.exp: Likewise.
* gdb.trace/trace-condition.exp: Use global pcreg definition, add $
in front.
* gdb.trace/unavailable.exp: Use global pcreg/fpreg/spreg definition.
* gdb.trace/while-dyn.exp: Use global fpreg definition, add $
in front.
* lib/trace-support.exp: Define fpreg, spreg, pcreg variables.

9 years agoAdd Qualcomm qdf24xx support.
Jim Wilson [Tue, 10 Nov 2015 17:19:45 +0000 (09:19 -0800)] 
Add Qualcomm qdf24xx support.

gas/
* config/tc-aarch64.c (aarch64_cpus): Add qdf24xx.
* config/tc-arm.c (arm_cpus): Likewise.
* doc/c-arm.texi, doc/c-aarch64.texi: Likewise.

9 years agoUpdate the RX simulator to handle the latest opcode types.
Nick Clifton [Tue, 10 Nov 2015 16:07:17 +0000 (16:07 +0000)] 
Update the RX simulator to handle the latest opcode types.

* rx.c (id_names): Add nop4, nop5, nop6 and nop7.
(decode_opcode): Likewise.
(get_op): Handle RX_Operand_Zero_Indirect.
Handle RX_Bad_Size and RX_MAX_SIZE.
(put_op): Likewise.
(N_MAP): Increase to 90.

9 years agoHandle x86 VTINHERIT/VTENTRY relocs when deleting relocations
H.J. Lu [Tue, 10 Nov 2015 12:26:55 +0000 (04:26 -0800)] 
Handle x86 VTINHERIT/VTENTRY relocs when deleting relocations

* elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
and VTENTRY relocations when deleting relocations.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.

9 years agoProperly move kept relocations when deleting relocations
H.J. Lu [Tue, 10 Nov 2015 07:49:02 +0000 (23:49 -0800)] 
Properly move kept relocations when deleting relocations

* elf32-i386.c (elf_i386_relocate_section): Properly move
kept relocations when deleting relocations.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.

9 years agoFix performance regression on x86 with ld -r
H.J. Lu [Tue, 10 Nov 2015 07:49:02 +0000 (23:49 -0800)] 
Fix performance regression on x86 with ld -r

Similar fix to "commit c316a17c40e44e8798b34ff84130904f2e7a53de".

* elf32-i386.c (elf_i386_relocate_section): Use read and write
pointers to reloc array, rather than memmove when deleting a
reloc.  Don't use RELOC_AGAINST_DISCARDED_SECTION.  Adjust
reloc counts at end of loop.
* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.

9 years agosim: cr16/d10v: localize translation funcs
Mike Frysinger [Tue, 10 Nov 2015 07:04:53 +0000 (23:04 -0800)] 
sim: cr16/d10v: localize translation funcs

These functions are only used in the interp module, so there's no point
in exporting them and declaring them in the external sim interface.

9 years agoFix performance regression due to ld -r memmove
Alan Modra [Mon, 9 Nov 2015 04:33:29 +0000 (15:03 +1030)] 
Fix performance regression due to ld -r memmove

The idea here is that instead of using memmove to shuffle the relocs
array every time one is deleted, to add a "wrel" pointer and copy from
rel[0] to wrel[0] as we go.

* elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
pointers to reloc array, rather than memmove when deleting a
reloc.  Don't use RELOC_AGAINST_DISCARDED_SECTION.  Adjust
reloc counts at end of loop.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.

9 years agosim: m32c: move test code to testsuite
Mike Frysinger [Mon, 9 Nov 2015 05:13:08 +0000 (00:13 -0500)] 
sim: m32c: move test code to testsuite

Various target code belongs in the testsuite/ subdir, so move the m32c
code to match all the other targets.

9 years agosim: m32c: drop redundant dependency info
Mike Frysinger [Mon, 9 Nov 2015 05:14:26 +0000 (00:14 -0500)] 
sim: m32c: drop redundant dependency info

9 years agosim: h8300: drop unused littleendian variable
Mike Frysinger [Mon, 9 Nov 2015 02:41:53 +0000 (21:41 -0500)] 
sim: h8300: drop unused littleendian variable

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Nov 2015 00:00:09 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoRecognize .pdr debug sections.
Vladimir Radosavljevic [Tue, 3 Nov 2015 16:18:09 +0000 (16:18 +0000)] 
Recognize .pdr debug sections.

gold/
* layout.h (Layout::is_debug_info_section): Recognize .pdr debug
sections.

9 years agoRemove unnecessary target dependencies on relocation format.
Cary Coutant [Mon, 9 Nov 2015 16:43:46 +0000 (08:43 -0800)] 
Remove unnecessary target dependencies on relocation format.

2015-11-09  Cary Coutant  <ccoutant@gmail.com>
    Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>

gold/
* copy-relocs.h (Copy_relocs::copy_reloc): Replace reloc parameter
with type, offset, addend.
(Copy_relocs::save): Likewise.
* copy-relocs.cc (Copy_relocs::copy_reloc): Likewise.
(Copy_relocs::save): Likewise.
* aarch64.cc (Target_aarch64::copy_reloc): Pass r_type, r_offset,
and r_addend to Copy_relocs::copy_reloc.
* arm.cc (Target_arm::copy_reloc): Likewise.
* i386.cc (Target_i386::copy_reloc): Likewise.
* mips.cc (Target_mips::copy_reloc): Likewise.
* powerpc.cc (Target_powerpc::copy_reloc): Likewise.
* s390.cc (Target_s390::copy_reloc): Likewise.
* sparc.cc (Target_sparc::copy_reloc): Likewise.
* tilegx.cc (Target_tilegx::copy_reloc): Likewise.
* x86_64.cc (Target_x86_64::copy_reloc): Likewise.

9 years ago[Ada] GDB crash during "finish" of function with out parameters
Joel Brobecker [Mon, 9 Nov 2015 17:58:16 +0000 (09:58 -0800)] 
[Ada] GDB crash during "finish" of function with out parameters

Consider a function with the following signature...

   function F (R : out Rec_Type) return Enum_Type;

... where Rec_Type is a simple record:

   type Rec_Type is record
      Cur : Integer;
   end record;

Trying to "finish" from that function causes GDB to SEGV:

    (gdb) fin
    Run till exit from #0  bar.f (r=...) at bar.adb:5
    0x00000000004022fe in foo () at foo.adb:5
    5          I : Enum_Type := F (R);
    [1]    18949 segmentation fault (core dumped)  /[..]/gdb

This is related to the fact that funtion F has a parameter (R)
which is an "out" parameter being passed by copy. For those,
GNAT transforms the return value to be a record with multiple
fields: The first one is called "RETVAL" and contains the return
value shown in the source, and the remaining fields have the same
name as the "out" or "in out" parameters which are passed by copy.
So, in the example above, function F returns a struct that has
one field who name is "r".

Because "RETVAL" starts with "R", GDB thinks it's a wrapper field,
because it looks like the encoding used for  variant records:

   --    member_name ::= {choice} | others_choice
   --    choice ::= simple_choice | range_choice
   --    simple_choice ::= S number
   --    range_choice  ::= R number T number   <<<<<-----  here
   --    number ::= {decimal_digit} [m]
   --    others_choice ::= O (upper case letter O)

See ada_is_wrapper_field:

  return (name != NULL
          && (startswith (name, "PARENT")
              || strcmp (name, "REP") == 0
              || startswith (name, "_parent")
              || name[0] == 'S' || name[0] == 'R' || name[0] == 'O'));

As a result of this, when trying to print the RETURN value,
we think that RETVAL is a wrapper, and thus recurse into
print_field_values...

      if (ada_is_wrapper_field (type, i))
        {
          comma_needed =
            print_field_values (TYPE_FIELD_TYPE (type, i),
                                valaddr,
                                (offset
                                 + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT),
                                stream, recurse, val, options,
                                comma_needed, type, offset, language);

... which is a problem since print_field_values assumes that
the type it is given ("TYPE_FIELD_TYPE (type, i)" here), is also
a record type. However, that's not the case, since RETVAL is
an enum. That eventually leads GDB to a NULL type when trying to
extract fields out of the enum, which then leads to a SEGV when
trying to dereference it.

Ideally, we'd want to be a little more careful in identifying
wrapper fields, by enhancing ada_is_wrapper_field to be a little
more complete in its analysis of the field name before declaring
it a variant record wrapper. However, it's not super easy to do
so, considering that the choices can be combined together when
complex choices are used. Eg:

   -- [...] the choice 1 .. 4 | 7 | -10 would be represented by
   --    R1T4S7S10m

Given that we are working towards getting rid of GNAT encodings,
which means that the above will eventually disappear, we took
the more pragmatic approach is just treating  RETVAL as a special
case.

gdb/ChangeLog:

        * ada-lang.c (ada_is_wrapper_field): Add special handling
        for fields called "RETVAL".

gdb/testsuite/ChangeLog:

        * gdb.ada/fin_fun_out: New testcase.

9 years agogas: Fix left shift of negative value.
Dominik Vogt [Mon, 9 Nov 2015 16:12:57 +0000 (17:12 +0100)] 
gas: Fix left shift of negative value.

This patch fixes all occurences of left-shifting negative constants in C cod
which is undefined by the C standard.

gas/ChangeLog:

        * read.c (parse_bitfield_cons): Fix left shift of negative value.
        * config/tc-xstormy16.c (md_section_align): Likewise.
        * config/tc-xgate.c (md_section_align): Likewise.
        * config/tc-visium.c (md_section_align): Likewise.
        * config/tc-v850.c (md_section_align): Likewise.
        * config/tc-tic6x.c (md_section_align): Likewise.
        * config/tc-sh.c (SH64PCREL32_M, SH64PCREL48_M, SH64PCREL32_M)
        (MOVI_32_M, MOVI_48_M, MOVI_32_M, md_section_align): Likewise.
        * config/tc-sh64.c (shmedia_md_estimate_size_before_relax): Likewise.
        * config/tc-score.c (s3_section_align): Likewise.
        * config/tc-score7.c (s7_section_align): Likewise.
        * config/tc-s390.c (md_section_align): Likewise.
        * config/tc-rx.c (md_section_align): Likewise.
        * config/tc-rl78.c (md_section_align): Likewise.
        * config/tc-ppc.c (md_section_align): Likewise.
        * config/tc-or1k.c (md_section_align): Likewise.
        * config/tc-nds32.c (md_section_align): Likewise.
        * config/tc-mt.c (md_section_align): Likewise.
        * config/tc-msp430.c (md_section_align): Likewise.
        * config/tc-mn10300.c (md_section_align): Likewise.
        * config/tc-mn10200.c (md_section_align): Likewise.
        * config/tc-mips.c (md_section_align): Likewise.
        * config/tc-microblaze.c (parse_imm): Likewise.
        * config/tc-mep.c (md_section_align): Likewise.
        * config/tc-m68k.c (md_section_align): Likewise.
        * config/tc-m68hc11.c (md_section_align): Likewise.
        * config/tc-m32r.c (md_section_align): Likewise.
        * config/tc-m32c.c (md_section_align): Likewise.
        * config/tc-lm32.c (md_section_align): Likewise.
        * config/tc-iq2000.c (md_section_align): Likewise.
        * config/tc-ip2k.c (md_section_align): Likewise.
        * config/tc-ia64.c (dot_save, dot_vframe): Likewise.
        * config/tc-i960.c (md_number_to_field, md_section_align): Likewise.
        * config/tc-i386.c (md_section_align): Likewise.
        * config/tc-i370.c (md_section_align): Likewise.
        * config/tc-frv.c (md_section_align): Likewise.
        * config/tc-fr30.c (md_section_align): Likewise.
        * config/tc-epiphany.c (md_section_align): Likewise.
        * config/tc-d30v.c (md_section_align): Likewise.
        * config/tc-d10v.c (md_section_align): Likewise.
        * config/tc-cr16.c (l_cons): Likewise.
        * config/tc-bfin.c (md_section_align): Likewise.
        * config/tc-arm.c (md_section_align): Likewise.
        * config/tc-arc.c (md_section_align): Likewise.
        * config/bfin-parse.y (expr_1): Likewise.

gas/testsuite/ChangeLog:

        * gas/all/test-gen.c (random_order_16s, random_order_24s)
        (random_order_32s): Fix left shift of negative value.

9 years agobinutils: Fix left shift of negative value.
Dominik Vogt [Mon, 9 Nov 2015 16:12:56 +0000 (17:12 +0100)] 
binutils: Fix left shift of negative value.

This patch fixes all occurences of left-shifting negative constants in C code
which is undefined by the C standard.

binutils/ChangeLog:

        * dwarf.c (read_leb128): Fix left shift of negative value.

9 years agobfd: Fix left shift of negative value.
Dominik Vogt [Mon, 9 Nov 2015 16:12:56 +0000 (17:12 +0100)] 
bfd: Fix left shift of negative value.

This patch fixes all occurences of left-shifting negative constants in C code
which is undefined by the C standard.

bfd/ChangeLog:

        * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
        shift of negative value.
        * libbfd.c (safe_read_leb128): Likewise.
        * dwarf2.c (place_sections): Likewise.
        * bfd-in.h (align_power): Likewise.
        * bfd-in2.h (align_power): Likewise.

9 years agoUse ELF_STRING_ARM_unwind in arm-tdep.c
Yao Qi [Mon, 9 Nov 2015 15:56:20 +0000 (15:56 +0000)] 
Use ELF_STRING_ARM_unwind in arm-tdep.c

We've already has the definition like this,

 #define ELF_STRING_ARM_unwind           ".ARM.exidx"

so it is better to use the macro rather than the string.

gdb:

2015-11-09  Yao Qi  <yao.qi@linaro.org>

* arm-tdep.c (arm_exidx_new_objfile): Use
ELF_STRING_ARM_unwind.

9 years agoNew function displaced_step_in_progress_thread
Yao Qi [Mon, 9 Nov 2015 14:39:56 +0000 (14:39 +0000)] 
New function displaced_step_in_progress_thread

This patch adds a new function displaced_step_in_progress_thread,
which returns whether the thread is in progress of displaced
stepping.

gdb:

2015-11-09  Yao Qi  <yao.qi@linaro.org>

* infrun.c (displaced_step_in_progress_thread): New function.
(handle_inferior_event_1): Call it.

9 years agoMove copy_u.w to MSA64 ASE, remove copy_u.d.
Robert Suchanek [Mon, 9 Nov 2015 08:43:09 +0000 (08:43 +0000)] 
Move copy_u.w to MSA64 ASE, remove copy_u.d.

opcodes/ChangeLog:

* mips-opc.c (mips_builtin_opcodes): Change "copy_u.w" to MSA64 ASE,
remove "copy_u.d".

gas/testsuite/ChangeLog:

* gas/mips/micromips@msa.d: Remove "copy_u.w".
* gas/mips/msa.d: Likewise.
* gas/mips/msa.s: Likweise.
* gas/mips/mipsr6@msa.d: Likewise.  Replace addresses with regex.
* gas/mips/msa64.d: Add "copy_u.w".  Remove "copy_u.d".
* gas/mips/msa64.s: Likewise.
* gas/mips/micromips@msa64.d: Likewise.

9 years agoConfigury changes for obstack optimization
Alan Modra [Mon, 9 Nov 2015 04:47:05 +0000 (15:17 +1030)] 
Configury changes for obstack optimization

Provides defines used to determine whether glibc obstacks are
compatible.  Generally speaking, 32-bit targets won't need to use
obstack.o from libiberty if glibc is used, while 64-bit targets will,
until glibc gets the new obstack code.

libiberty/
* configure.ac: Get size of size_t.
* config.in: Regenerate.
* configure: Regenerate.

9 years agoSilence obstack.c -Wc++compat warning
Alan Modra [Mon, 9 Nov 2015 04:45:51 +0000 (15:15 +1030)] 
Silence obstack.c -Wc++compat warning

Fixes
warning: request for implicit conversion from ‘void *’ to ‘struct _obstack_chunk *’ not permitted in C++ [-Wc++-compat]

I moved the assignment to h->chunk to fix an overlong line, then
decided it would be better after the alloc failure check just to do
things the same way as in _obstack_newchunk.

* obstack.c (_obstack_newchunk): Silence -Wc++compat warning.
(_obstack_begin_worker): Likewise.  Move assignment to h->chunk
after alloc failure check.

9 years agoModify obstack.[hc] to avoid having to include other gnulib files
Alan Modra [Mon, 9 Nov 2015 04:43:51 +0000 (15:13 +1030)] 
Modify obstack.[hc] to avoid having to include other gnulib files

Using the standard gnulib obstack source requires importing quite a
lot of other files from gnulib, and requires build changes.

include/
PR gdb/17133
* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
libiberty/
PR gdb/17133
* obstack.c (__alignof__): Expand alignof_type from alignof.h.
(obstack_exit_failure): Don't use exitfail.h.
(_): Include libintl.h when HAVE_LIBINTL_H and nls enabled.
Provide default.  Don't include gettext.h.
(_Noreturn): Define.
* obstacks.texi: Adjust node references to external libc info files.

9 years agoCopy gnulib obstack files
Alan Modra [Mon, 9 Nov 2015 04:42:45 +0000 (15:12 +1030)] 
Copy gnulib obstack files

This copies obstack.[ch] from gnulib, and updates the docs.  The next
patch should be applied if someone repeats the import at a later date.

include/
PR gdb/17133
* obstack.h: Import current gnulib file.
libiberty/
PR gdb/17133
* obstack.c: Import current gnulib file.
* obstacks.texi: Updated doc, from glibc's manual/memory.texi.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Nov 2015 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Nov 2015 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agogdb.dwarf2: Don't hardcode certain constants in Dwarf::assemble constructs
Kevin Buettner [Fri, 30 Oct 2015 04:53:51 +0000 (21:53 -0700)] 
gdb.dwarf2: Don't hardcode certain constants in Dwarf::assemble constructs

Two tests in gdb.dwarf2, data-loc.exp and dynarr-ptr.exp assume that
sizeof(int) is 4.  This patch looks up the integer size and uses this
constant for DW_AT_byte_size, DW_AT_lower_bound, and DW_AT_upper_bound.

I discovered this problem while looking at test results for this
msp430 multilib:

msp430-sim/-msim/-mcpu=msp430x/-mlarge/-mdata-region=either/-mcode-region=either

It fixes the following set of failures:

FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.three_ptr.all'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.three_ptr'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.three_ptr_tdef.all'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.three_ptr_tdef'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.five_ptr.all'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.five_ptr'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.five_ptr_tdef.all'first
FAIL: gdb.dwarf2/dynarr-ptr.exp: print foo.five_ptr_tdef'first
FAIL: gdb.dwarf2/data-loc.exp: print foo.three
FAIL: gdb.dwarf2/data-loc.exp: print foo.three(1)
FAIL: gdb.dwarf2/data-loc.exp: print foo.three(2)
FAIL: gdb.dwarf2/data-loc.exp: print foo.three(3)
FAIL: gdb.dwarf2/data-loc.exp: print foo.three_tdef
FAIL: gdb.dwarf2/data-loc.exp: print foo.three_tdef(1)
FAIL: gdb.dwarf2/data-loc.exp: print foo.three_tdef(2)
FAIL: gdb.dwarf2/data-loc.exp: print foo.three_tdef(3)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five
FAIL: gdb.dwarf2/data-loc.exp: print foo.five(2)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five(3)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five(4)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five(5)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five(6)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef(2)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef(3)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef(4)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef(5)
FAIL: gdb.dwarf2/data-loc.exp: print foo.five_tdef(6)
FAIL: gdb.dwarf2/data-loc.exp: print foo__three
FAIL: gdb.dwarf2/data-loc.exp: print foo__three_tdef
FAIL: gdb.dwarf2/data-loc.exp: print foo__five
FAIL: gdb.dwarf2/data-loc.exp: print foo__five_tdef

As I recall, there are still (other) problems with msp430 multilibs
which don't use -mlarge.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/data-loc.exp (Dwarf::assemble): Don't hardcode
value associated with DW_AT_byte_size.
* gdb.dwarf2/dynarr-ptr.exp (Dwarf::assemble): Don't hardcode
constants for DW_AT_byte_size, DW_AT_lower_bound, and
DW_AT_upper_bound.

9 years agotestsuite: Define and use gdb_target_symbol_prefix_flags_asm.
Kevin Buettner [Fri, 6 Nov 2015 04:40:53 +0000 (21:40 -0700)] 
testsuite: Define and use gdb_target_symbol_prefix_flags_asm.

Some of the source code for the test cases in the GDB testsuite
reside in .S files containing assembly code.  These files typically
define a symbol - such as main - which may, depending on the target,
require a prefix such as underscore.

For example, gdb.dwarf2/dw-compdir-oldgcc.S defines the symbol main:

main: .globl main

Some targets, such as rx-elf, require main to have an underscore
prefix.  (If it doesn't, a linker error results due to not being able
to find _main required by crt0.o.) So, instead, the above should look
like this for rx-elf and other targets with this same requirement:

_main: .globl _main

This patch defines a new tcl proc in lib/gdb named
gdb_target_symbol_prefix_flags_asm.  This proc returns a string
which will - assuming everything else is wired up correctly - cause
-DSYMBOL_PREFIX=_ to be passed on the command line to the compiler.

The test cases are augmented with a macro definition for SYMBOL
as follows:

    #define CONCAT1(a, b) CONCAT2(a, b)
    #define CONCAT2(a, b) a ## b

    #ifdef SYMBOL_PREFIX
    # define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
    #else
    # define SYMBOL(str)     str
    #endif

Symbols, such as main shown in the example earlier are then wrapped
with SYMBOL like this:

SYMBOL(main): .globl SYMBOL(main)

The net effect will be to add a prefix for those targets which need
it and add no prefix for those targets which do not.

It should be noted that there was already a proc in lib/gdb.exp
called gdb_target_symbol_prefix_flags.  It still exists, but has
been significantly rewritten.  (There is only one small difference
between the two versions.)

That proc used to explicitly list targets which were known to
require an underscore prefix.  This is no longer done; the recently
added proc, gdb_target_symbol_prefix, is now invoked to dynamically
discover whether or not a prefix is required for that particular
target.

The difference between gdb_target_symbol_prefix_flags_asm
and gdb_target_symbol_prefix_flags is that the former returns
a bare prefix while the latter returns the prefix enclosed in
double quotes.  I.e. assuming that the discovered prefix is
underscore, gdb_target_symbol_prefix_flags_asm returns:

    additional_flags=-DSYMBOL_PREFIX=_

while gdb_target_symbol_prefix_flags returns:

    additional_flags=-DSYMBOL_PREFIX="_"

The double-quoted version is not suitable for using with .S files
containing assembly code; there is no way to strip the double quotes
using C preprocessor constructs.

It would be possible to use the bare (non double quoted) version in
C source code.  However, the supporting macros become more complicated
and therefore more difficult to maintain.

gdb/testsuite/ChangeLog:

* lib/gdb (gdb_target_symbol_prefix_flags_asm): New proc.
(gdb_target_symbol_prefix_flags): Define in terms of _asm
version.
* gdb.arch/i386-float.exp, gdb.arch/i386-permbkpt.exp,
gdb.dwarf2/dw2-canonicalize-type.exp,
gdb.dwarf2/dw2-compdir-oldgcc.exp, gdb.dwarf2/dw2-minsym-in-cu.exp,
gdb.dwarf2/dw2-op-stack-value.exp, gdb.dwarf2/dw2-unresolved.exp,
gdb.dwarf2/fission-reread.exp, gdb.dwarf2/pr13961.exp: Use flags
provided by gdb_target_symbol_prefix_flags_asm.
* gdb.dwarf2/dw2-canonicalize-type.S, gdb.dwarf2/dw2-compdir-oldgcc.S,
testsuite/gdb.dwarf2/dw2-minsym-in-cu.S,
testsuite/gdb.dwarf2/dw2-unresolved-main.c,
testsuite/gdb.dwarf2/dw2-unresolved.S, gdb.dwarf2/fission-reread.S,
gdb.dwarf2/pr13961.S: Define and use SYMBOL macro (and supporting
macros where needed).  Use this macro for symbols which require
the prefix provided by SYMBOL_PREFIX.

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Nov 2015 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoDo not use libiberty's getpagesize on Android
Joel Brobecker [Fri, 6 Nov 2015 21:39:19 +0000 (13:39 -0800)] 
Do not use libiberty's getpagesize on Android

Building libiberty on Android currently fails with the error message
shown below.  This was discovered by trying to build GDBserver
for Android, which stopped building after libiberty became
a GDBserver dependency.

Here is the error message:

[...]/getpagesize.c:64:1: error: redefinition of 'getpagesize'
In file included from /[...]/getpagesize.c:34:0:
/[...]/usr/include/unistd.h:171:23: note: previous definition of 'getpagesize' was here

And looking at the definition, one can see that it defined as
a static inline function...

   static __inline__ int getpagesize(void) {
     extern unsigned int __page_size;
     return __page_size;
   }

... which explains why the AC_CHECK_FUNCS test failed to detect
the function, since there is no associated symbol to be linked in.

This patch prevents getpagesize.c to be compiled in by hard-coding
the fact that getpagesize is available on android hosts.

libiberty/ChangeLog:

        * configure.ac: Set AC_CV_FUNC_GETPAGESIZE to "yes" on
        Android hosts.
        * configure: Regenerate.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Nov 2015 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agogdb.dwarf2: Define and use gdb_target_symbol for symbol prefixes
Kevin Buettner [Wed, 28 Oct 2015 18:36:06 +0000 (11:36 -0700)] 
gdb.dwarf2: Define and use gdb_target_symbol for symbol prefixes

Some of the tests in gdb.dwarf2 which use Dwarf::assemble refer to
(minimal/linker) symbols created in the course of building a small
test program.  Some targets use a prefix such as underscore ("_") on
these symbols.  Many of the tests in gdb.dwarf2 do not take this into
account.  As a consequence, these tests fail to build, resulting
either in failures or untested testcases.

Here is an example from gdb.dwarf2/dw2-regno-invalid.exp:

    Dwarf::assemble $asm_file {
        cu {} {
            compile_unit {
                {low_pc main DW_FORM_addr}
                {high_pc main+0x10000 DW_FORM_addr}
            } {
            ...
            }

For targets which require an underscore prefix on linker symbols,
the two occurrences of "main" would have to have a prepended underscore,
i.e. _main instead of main.

For the above case, a call to the new proc gdb_target_symbol is used
prepend the correct prefix to the symbol.  I.e. the above code is
rewritten (as shown in the patch) as follows:

    Dwarf::assemble $asm_file {
        cu {} {
            compile_unit {
                {low_pc [gdb_target_symbol main] DW_FORM_addr}
                {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr}
            } {
            ...
            }

I also found it necessary to make an adjustment to lib/dwarf.exp so that
expressions of more than just one list element can be used in DW_TAG_...
constructs.  Both atomic-type.exp and dw2-bad-mips-linkage-name.exp require
this new functionality.

gdb/testsuite/ChangeLog:

* lib/gdb.exp (gdb_target_symbol_prefix, gdb_target_symbol):
New procs.
* lib/dwarf.exp (_handle_DW_TAG): Handle attribute values,
representing expressions, of more than one list element.
* gdb.dwarf2/atomic-type.exp (Dwarf::assemble): Use gdb_target_symbol
to prepend linker symbol prefix to f.
* gdb.dwarf2/data-loc.exp (Dwarf::assemble): Likewise, for
table_1 and table_2.
* gdb.dwarf2/dw2-bad-mips-linkage-name.exp (Dwarf::assemble):
Likewise, for f and g.
* gdb.dwarf2/dw2-ifort-parameter.exp (Dwarf::assemble): Likewise,
for ptr.
* gdb.dwarf2/dw2-regno-invalid.exp (Dwarf::assemble): Likewise,
for main.
* gdb.dwarf2/dynarr-ptr.exp (Dwarf::assemble): Likewise, for
table_1_ptr and table_2_ptr.

9 years agoRevert patch for PR 19119, which led to PR 19172 and 19197.
Cary Coutant [Thu, 5 Nov 2015 20:59:02 +0000 (12:59 -0800)] 
Revert patch for PR 19119, which led to PR 19172 and 19197.

Gold does not support all the emulations that Gnu ld does, and supports
only one spelling per target. The -m option is used only in the rare case
where there are no ELF input files, and we produce an empty output file.
In those cases, users are expected to supply a -m option naming one of
the supported emulations. In the many cases where a build script provides
an unnecessary -m option naming an emulation that gold does not support,
we will simply ignore the option, as we did before the reverted patch.

gold/
PR gold/19119
PR gold/19172
PR gold/19197
Revert commit 6457197210144f50a696097c0d308d81d46d5510:

2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>

* options.h (General_options): Remove "obsolete" from -m.
* parameters.cc (set_parameters_target): Check if input target
is compatible with output emulation set by "-m emulation".

9 years agoAdd aarch64-specific --no-apply-dynamic-relocs option.
Cary Coutant [Thu, 5 Nov 2015 20:24:14 +0000 (12:24 -0800)] 
Add aarch64-specific --no-apply-dynamic-relocs option.

With --no-apply-dynamic-relocs on aarch64 targets, gold will not apply
link-time values for absolute relocations that become dynamic relocations.
This provides a workaround for broken Android dynamic linkers that use
the link-time value as an extra addend to the relocation.

gold/
PR gold/19163
* aarch64.cc (Target_aarch64::Relocate::relocate): Don't apply
certain relocations if --no-apply-dynamic-relocs is set.
* options.h (--apply-dynamic-relocs): New aarch64-specific option.

9 years agoUse aarch64_decode_insn in aarch64_displaced_step_copy_insn
Yao Qi [Thu, 5 Nov 2015 09:44:32 +0000 (09:44 +0000)] 
Use aarch64_decode_insn in aarch64_displaced_step_copy_insn

gdb:

2015-11-05  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (aarch64_displaced_step_copy_insn): Call
aarch64_decode_insn and decode instruction by aarch64_inst.

9 years agoUse aarch64_decode_insn in aarch64_analyze_prologue
Yao Qi [Thu, 5 Nov 2015 09:44:32 +0000 (09:44 +0000)] 
Use aarch64_decode_insn in aarch64_analyze_prologue

This patch convert aarch64_analyze_prologue to using aarch64_decode_insn
to decode instructions.  After this change, aarch64_analyze_prologue
looks much simple, and some aarch64_decode_* functions are removed
accordingly.

gdb:

2015-11-05  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (extract_signed_bitfield): Remove.
(decode_masked_match): Remove.
(aarch64_decode_add_sub_imm): Remove.
(aarch64_decode_br): Remove.
(aarch64_decode_eret): Remove.
(aarch64_decode_movz): Remove.
(aarch64_decode_orr_shifted_register_x): Remove.
(aarch64_decode_ret): Remove.
(aarch64_decode_stp_offset): Remove.
(aarch64_decode_stur): Remove.
(aarch64_analyze_prologue): Call aarch64_decode_insn
and use aarch64_inst to decode instructions.

9 years agoCombine aarch64_decode_stp_offset_wb and aarch64_decode_stp_offset
Yao Qi [Thu, 5 Nov 2015 09:44:32 +0000 (09:44 +0000)] 
Combine aarch64_decode_stp_offset_wb and aarch64_decode_stp_offset

This patch combines both aarch64_decode_stp_offset_wb and
aarch64_decode_stp_offset together.

gdb:

2015-11-05  Yao Qi  <yao.qi@linaro.org>

* aarch64-tdep.c (aarch64_decode_stp_offset): New argument
wback.
(aarch64_decode_stp_offset_wb): Removed.
(aarch64_analyze_prologue): Don't use
aarch64_decode_stp_offset_wb.