aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-09Fix problems with the implementation of the uzp1 and uzp2 instructions.Jim Wilson4-17/+273
sim/aarch64/ * simulator.c (do_vec_UZP): Rewrite. sim/testsuite/sim/aarch64/ * uzp.s: New.
2017-01-09Fix inferior memory reading in GDBServer for arm/aarch32Antoine Tremblay3-4/+12
Before this patch, some functions would read the inferior memory with (*the_target)->read_memory, which returns the raw memory, rather than the shadowed memory. This is wrong since these functions do not expect to read a breakpoint instruction and can lead to invalid behavior. Use of raw memory in get_next_pcs_read_memory_unsigned_integer for example could lead to get_next_pc returning an invalid pc. Here's how this would happen: In non-stop: the user issues: thread 1 step& thread 2 step& thread 3 step& In a similar way as non-stop-fair-events.exp (threads are looping). GDBServer: linux_resume is called GDBServer has pending events, threads are not resumed and single-step breakpoint for thread 1 not installed. linux_wait_1 is called with a pending event on thread 2 at pc A GDBServer handles the event and calls proceed_all_lwps This calls proceed_one_lwp and installs single-step breakpoints on all the threads that need one. Now since thread 1 needs to install a single-step breakpoint and is at pc B (different than thread 2), a step-over is not initiated and get_next_pc is called to figure out the next instruction from pc B. However it may just be that thread 3 as a single step breakpoint at pc B. And thus get_next_pc fails. This situation is tested with non-stop-fair-events.exp. In other words, single-step breakpoints are installed in proceed_one_lwp for each thread. GDBserver proceeds two threads for resume_step, as requested by GDB, and the thread proceeded later may see the single-step breakpoints installed for the thread proceeded just now. Tested on gdbserver-native/-m{thumb,arm} no regressions. gdb/gdbserver/ChangeLog: * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use target_read_memory. * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise. (get_next_pcs_syscall_next_pc): Likewise.
2017-01-09RISC-V/GAS: Support more relocs against constant addressesAndrew Waterman2-3/+8
Previously, some pseudoinstructions like "call" only accepted symbolic addresses and rejected constant addresses with an esoteric internal error. This patch enables them by deferring application of constant relocations to md_apply_fix, rather than eagerly applying them during instruction assembly. gas/ChangeLog 2017-01-09 Andrew Waterman <andrew@sifive.com> * config/tc-riscv.c (append_insn): Don't eagerly apply relocations against constants. (md_apply_fix): Mark relocations against constants as "done."
2017-01-09RISC-V/GAS: Improve handling of invalid relocsAndrew Waterman2-1/+15
TLS relocs against constants previously segfaulted, and illegal symbol subtractions were silently ignored. The previous behavior was to segfault. gas/ChangeLog 2017-01-09 Andrew Waterman <andrew@sifive.com> * config/tc-riscv.c (md_apply_fix): Report TLS relocations against constants. Report disallowed symbol subtractions.
2017-01-09Remove some custom sections from RISC-V's default linker scriptsPalmer Dabbelt2-12/+7
This was added so compressed loads could have smaller offsets for accessing the data section, but the result was that writable sections ended up in INITIAL_READONLY_SECTIONS. This is a bad idea. The fix is to just remove this micro-optimization. Thanks to Alan Morda for finding the problem! ld/ChangeLog 2017-01-09 Palmer Dabbelt <palmer@dabbelt.com> Kito Cheng <kito.cheng@gmail.com> * emulparams/elf32lriscv-defs.sh (INITIAL_READONLY_SECTIONS): Removed. (SDATA_START_SYMBOLS): Likewise.
2017-01-09Speed up objdump when displaying disassembly mixed with line number and ↵Nick Clifton4-4/+39
source code information. bfd * dwarf2.c (lookup_address_in_function_table): Return early if there are no functions in the given comp unit, or if the high address of the last function in the comp unit is less than the desired address. binutils * objdump.c (display_file): Add new parameter 'last_file'. If last_file is true, do not call bfd_close at the end of the function. (main): Set the value of the last_file parameter when calling display_file.
2017-01-09Add Swedish translation for GAS.Nick Clifton4-2/+19967
* po/sv.po: New Swedish translation. * configure.ac (ALL_LINGUAS): Add sv. * configure: Regenerate.
2017-01-09Improve objdump's behaviour when it encounters a corrupt binary with an ↵Nick Clifton2-1/+12
excessively large symbol table. PR binutils/21013 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error message if there are too many symbols to load.
2017-01-09RISC-V/GAS: Correct branch relaxation for weak symbols.Andrew Waterman2-0/+6
* config/tc-riscv.c (relaxed_branch_length): Use the long sequence when the target is a weak symbol.
2017-01-09[GOLD] Set sh_info of .rela.plt for powerpcAlan Modra2-0/+8
* powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of ".rela.plt" at ".plt".
2017-01-09.rela.dyn comment fix and add missing ChangeLog entryAlan Modra3-2/+10
ChangeLog entry missed from commit dd90581873. * readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn comment.
2017-01-09Automatic date update in version.inGDB Administrator1-1/+1
2017-01-08[D] Fix crash when debug expression enabled.Iain Buclaw4-6/+51
While casting works as expected with expression debugging turned off, this seems to be an indication that the D language parser function is doing something wrong in the building of the expression. Without changing the grammar, using UNOP_CAST_TYPE is the right thing to do here, as the TypeExp handler has already wrapped the type around a pair of OP_TYPE opcodes. gdb/ChangeLog: * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE. gdb/testsuite/ChangeLog: * gdb.dlang/debug-expr.exp: New file.
2017-01-08Automatic date update in version.inGDB Administrator1-1/+1
2017-01-07S/390: Issue error for overflowing relocs.Andreas Krebbel1-0/+12
Building PIE executable from non-PIC code results in broken binaries. With this patch the problem is detected at link-time. bfd/ChangeLog: 2017-01-07 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * elf64-s390.c (elf_s390_relocate_section): Issue error for non-PLT relocs of shared libary symbol in exectuable.
2017-01-07[GOLD] powerpc.cc tidiesAlan Modra2-38/+37
Plus some paranoia in symval_for_branch. We shouldn't get there with dynamic symbols, but if we ever did the static_cast to Powerpc_relobj would be wrong. * powerpc.cc: Use shorter equivalent elfcpp typedef for Reltype and reloc_size throughout. (Target_powerpc::symval_for_branch): Exclude dynamic symbols. (Target_powerpc::Scan::local): Use local var r_sym. (Target_powerpc::Scan::global: Likewise. (Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
2017-01-07Automatic date update in version.inGDB Administrator1-1/+1
2017-01-06Include gdb_proc_service.h in x86-linux-nat.hYao Qi2-0/+6
$ make check-headers CHECK_HEADERS="x86-linux-nat.h" ... ../../binutils-gdb/gdb/x86-linux-nat.h:29:8: error: 'ps_err_e' does not name a type extern ps_err_e x86_linux_get_thread_area (pid_t pid, void *addr, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * x86-linux-nat.h: Include gdb_proc_service.h.
2017-01-06Include serial.h in ser-base.h.Yao Qi2-0/+6
$ make check-headers CHECK_HEADERS="ser-base.h" ... ../../binutils-gdb/gdb/ser-base.h:33:8: error: 'serial_ttystate' does not name a type extern serial_ttystate ser_base_get_tty_state (struct serial *scb); ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * ser-base.h: Include serial.h.
2017-01-06Include ppc-tdep.h in ppc-linux-tdep.hYao Qi2-0/+6
$ make check-headers CHECK_HEADERS="ppc-linux-tdep.h" ... ../../binutils-gdb/gdb/ppc-linux-tdep.h:34:24: error: 'PPC_NUM_REGS' was not declared in this scope PPC_ORIG_R3_REGNUM = PPC_NUM_REGS, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * ppc-linux-tdep.h: Include ppc-tdep.h.
2017-01-06Include signal.h in nat/amd64-linux-siginfo.hYao Qi2-0/+6
$ make check-headers CHECK_HEADERS="nat/amd64-linux-siginfo.h" .... ../../binutils-gdb/gdb/nat/amd64-linux-siginfo.h:52:39: error: 'siginfo_t' was not declared in this scope int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * nat/amd64-linux-siginfo.h: Include signal.h.
2017-01-06Include break-common.h in nat/aarch64-linux-hw-point.hYao Qi2-0/+6
$ make check-headers CHECK_HEADERS="nat/aarch64-linux-hw-point.h" ... ../../binutils-gdb/gdb/nat/aarch64-linux-hw-point.h:169:37: error: use of enum 'target_hw_bp_type' without previous declaration int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * nat/aarch64-linux-hw-point.h: Include break-common.h.
2017-01-06Include mi-cmds.h in mi-parse.hYao Qi2-0/+5
$ make check-headers CHECK_HEADERS="mi/mi-parse.h" ... ../../binutils-gdb/gdb/mi/mi-parse.h:77:6: error: use of enum 'print_values' without previous declaration enum print_values mi_parse_print_values (const char *name); ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * mi/mi-parse.h: Include mi-cmds.h.
2017-01-06Include target.h in inf-loop.hYao Qi3-1/+7
$ make check-headers CHECK_HEADERS="target.h inf-loop.h" ... ../../binutils-gdb/gdb/inf-loop.h:23:42: error: use of enum 'inferior_event_type' without previous declaration extern void inferior_event_handler (enum inferior_event_type event_type, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * inf-loop.c: Don't include "target.h". * inf-loop.h: Include it here.
2017-01-06Include doublest.h and expression.h in dfp.hYao Qi2-0/+7
$ make check-headers CHECK_HEADERS="dfp.h" ... ../../binutils-gdb/gdb/dfp.h:39:8: error: 'DOUBLEST' does not name a type extern DOUBLEST decimal_to_doublest (const gdb_byte *from, int len, ^ ../../binutils-gdb/gdb/dfp.h:41:33: error: use of enum 'exp_opcode' without previous declaration extern void decimal_binop (enum exp_opcode, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * dfp.h: Include "dboulest.h" and "expression.h".
2017-01-06Include ax.h in ax-gdb.hYao Qi2-0/+6
$ make check-headers CHECK_HEADERS="ax-gdb.h" ... ../../binutils-gdb/gdb/ax-gdb.h:104:8: error: 'agent_expr_up' does not name a type extern agent_expr_up gen_trace_for_expr (CORE_ADDR, struct expression *, ^ gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * ax-gdb.h: Include "ax.h"
2017-01-06Update gdb_ptrace.h in HFILES_NO_SRCDIRYao Qi2-1/+6
Commit e379037 (Move gdb_ptrace.h to nat/), so we should update file name in HFILES_NO_SRCDIR too. Otherwise, 'make tags' complains, $ make tags make: *** No rule to make target `gdb_ptrace.h', needed by `TAGS'. Stop. gdb: 2017-01-06 Yao Qi <yao.qi@linaro.org> * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h with nat/gdb_ptrace.h.
2017-01-06Retire Paul Brook as an ARM maintainer.Nick Clifton2-1/+5
* MAINTAINERS: Move Paul Brook to the Past Maintainers section.
2017-01-06Automatic date update in version.inGDB Administrator1-1/+1
2017-01-05Fix ARI warningYao Qi2-4/+10
This patch splits the expression before the && operator instead of after it. gdb: 2017-01-05 Yao Qi <yao.qi@linaro.org> * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to new line. (mips64_fbsd_sigframe_init): Likewise.
2017-01-05Prevent an abort in the FRV disassembler if the target bfd name is unknown.Nick Clifton2-3/+11
PR 20946 * frv-desc.c (lookup_mach_via_bfd_name): Return NULL if the name could not be matched. (frv_cgen_cpu_open): Allow for lookup_mach_via_bfd_name returning NULL.
2017-01-04Five fixes, for fcsel, fcvtz, fminnm, mls, and non-widening mul.Jim Wilson9-33/+618
sim/aarch64/ * cpustate.c: Include math.h. (aarch64_set_FP_float): Use signbit to check for signed zero. (aarch64_set_FP_double): Likewise. * simulator.c (do_vec_MOV_immediate, case 0x8): Add missing break. (do_vec_mul): In all DO_VEC_WIDENING_MUL calls, make second and fourth args same size as third arg. (fmaxnm): Use isnan instead of fpclassify. (fminnm, dmaxnm, dminnm): Likewise. (do_vec_MLS): Reverse order of subtraction operands. (dexSimpleFPCondSelect): Call aarch64_get_FP_double or aarch64_get_FP_float to get source register contents. (UINT_MIN, ULONG_MIN, FLOAT_UINT_MAX, FLOAT_UINT_MIN, DOUBLE_UINT_MAX, DOUBLE_UINT_MIN, FLOAT_ULONG_MAX, FLOAT_ULONG_MIN, DOUBLE_ULONG_MAX, DOUBLE_ULONG_MIN): New. (do_fcvtzu): Use ULONG instead of LONG, and UINT instead of INT in raise_exception calls. sim/testsuite/sim/aarch64/ * fcsel.s: New. * fcvtz.s: New. * fminnm.s: New. * mls.s: New. * mul.s: New.
2017-01-05Automatic date update in version.inGDB Administrator1-1/+1
2017-01-04Use correct OSABI constant for FreeBSD/mips binaries.John Baldwin2-1/+6
gdb/ChangeLog: * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
2017-01-04Add native target for FreeBSD/mips.John Baldwin6-0/+154
This supports the o32 and n64 ABIs. gdb/ChangeLog: * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c. * NEWS: Mention new FreeBSD/mips native configuration. * config/mips/fbsd.mh: New file. * configure.host: Add mips*-*-freebsd*. * mips-fbsd-nat.c: New file.
2017-01-04Add FreeBSD/mips architecture.John Baldwin8-0/+615
This has been tested for the n64 and o32 ABIs. Signal frame unwinders for both ABIs are provided. FreeBSD/mips requires custom linkmap offsets since it contains an additional l_off member in 'struct link_map' that other FreeBSD platforms do not have. Support for collecting and supplying general purpose and floating point register sets are provided. Common routines for working with native format register sets are exported for use by the native target. gdb/ChangeLog: * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o. (ALLDEPFILES): Add mips-fbsd-tdep.c. * NEWS: Mention new FreeBSD/mips target. * configure.tgt: Add mips*-*-freebsd*. * mips-fbsd-tdep.c: New file. * mips-fbsd-tdep.h: New file. gdb/doc/ChangeLog: * gdb.texinfo (Contributors): Add SRI International and University of Cambridge for FreeBSD/mips.
2017-01-04Use noyywrap option in lex files.Dilan Palauzov5-13/+15
ld PR 20958 * ldlex.l (option): Add noyywrap (yywrap): Delete. * ldlex.h (yywrap): Delete prototype. binutils PR 20958 * syslex.l (option): Add noyywrap (yywrap): Delete.
2017-01-04[DWARF] Sync GCC dwarf.def change on AArch64Jiong Wang2-1/+18
include/ * dwarf2.def: Sync with mainline gcc sources.
2017-01-05update-copyright.py for binutilsAlan Modra4-2/+628
This is a modified form of gcc's contrib/update-copyright.py. * update-copyright.py: New file. * add-log.el: Update copyright year range. * texi2pod.pl: Likewise.
2017-01-05Sync libiberty from gccAlan Modra95-134/+113
Picks up copyright year update and other recent fixes.
2017-01-05picflag.m4 high bit set in commentAlan Modra2-1/+5
* picflag.m4: Import from gcc.
2017-01-04[AArch64] Add separate feature flag for weaker release consistent load insnsSzabolcs Nagy9-4/+54
The weaker release consistency support of ARMv8.3-A is allowed as an optional extension for ARMv8.2-A, so separate command line option and feature flag is added: -march=armv8.2-a+rcpc turns LDAPR, LDAPRB, LDAPRH instructions on. opcodes/ * aarch64-tbl.h (RCPC, RCPC_INSN): Define. (aarch64_opcode_table): Use RCPC_INSN. include/ * opcode/aarch64.h (AARCH64_FEATURE_RCPC): Define. (AARCH64_ARCH_V8_3): Update. gas/ * config/tc-aarch64.c (aarch64_features): Add rcpc. * doc/c-aarch64.texi (AArch64 Extensions): Document rcpc. * testsuite/gas/aarch64/ldst-exclusive-armv8_3.d: Rename to ... * testsuite/gas/aarch64/ldst-rcpc.d: This. * testsuite/gas/aarch64/ldst-exclusive-armv8_3.s: Rename to ... * testsuite/gas/aarch64/ldst-rcpc.s: This. * testsuite/gas/aarch64/ldst-rcpc-armv8_2.d: New test.
2017-01-04When configuring GAS treat as sparcv9 target the same way as a sparc64 target.Norm Jacobs2-1/+6
PR gas/20992 * configure.tgt: Treat sparcv9 as sparc64.
2017-01-04Fix an internal error on writing pieced valueYao Qi2-12/+6
In ee40d8d (Move computed value's frame id to piece_closure), I only updated read_pieced_value to use frame_id from piece_closure, but forgot to update write_pieced_value, so it causes the following internal error on arm-linux, set variable l = 4^M gdb/git/gdb/value.c:1579: internal-error: frame_id* deprecated_value_next_frame_id_hack(value*): Assertion `value->lval == lval_register' failed.^M A problem internal to GDB has been detected,^M further debugging may prove unreliable.^M Quit this debugging session? (y or n) FAIL: gdb.base/store.exp: var longest l; setting l to 4 (GDB internal error) This patch fixes the internal error. gdb: 2017-01-04 Yao Qi <yao.qi@linaro.org> * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to), use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
2017-01-04Automatic date update in version.inGDB Administrator1-1/+1
2017-01-04Check for shared lib support before running ld tests with -sharedAlan Modra8-2/+48
Another fix now that we run these tests non-native. * testsuite/ld-elf/audit.exp: Check for shared lib support. * testsuite/ld-elf/compress.exp: Likewise. * testsuite/ld-elf/dwarf.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elf/wrap.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-plugin/lto.exp: Check $CXX exists.
2017-01-04bfd: alpha: Fix crash caused by double free with --no-keep-memoryJames Clarke2-1/+8
Without this, ld has been seen to crash in libc when freeing tsec_free: *** Error in `/usr/bin/ld': double free or corruption (!prev): 0x0000000120ceb6a0 *** _bfd_elf_link_read_relocs will always return the cached value if present, even if keep_memory is false, therefore setting tsec_free to NULL only when keep_memory is true is not sufficient. * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free if relocs are cached.
2017-01-03Add support for the Q extension to the RISCV ISA.Kito Cheng7-2/+193
gas * config/tc-riscv.c (riscv_set_arch): Whitelist the "q" ISA extension. (riscv_after_parse_args): Set FLOAT_ABI_QUAD when the Q ISA is enabled and no other ABI is specified. include * opcode/riscv-opc.h: Add support for the "q" ISA extension. opcodes * riscv-opc.c (riscv-opcodes): Add support for the "q" ISA extension. * riscv-opcodes/all-opcodes: Likewise.
2017-01-03Fix generation of GOT table when only GOT-relative relocs are used.Rich Felker2-0/+7
PR ld/21017 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry for R_MICROBLAZE_GOTOFF_64.
2017-01-03Add fall through comment.Dilyan Palauzov2-0/+5
* riscv-dis.c (print_insn_args): Add fall through comment.