aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-10Change return type of ui_out redirect to voidSimon Marchi11-32/+34
All implementations of redirect/do_redirect in the ui_out subsystem always return 0 (success). We can therefore clean it up and make them return void. gdb/ChangeLog: * cli-out.c (cli_ui_out::do_redirect): Change return type to void. * cli-out.h (cli_ui_out::do_redirect): Likewise. * mi/mi-out.c (mi_ui_out::do_redirect): Likewise. * mi/mi-out.h (mi_ui_out::do_redirect): Likewise. * ui-out.c (ui_out::redirect): Likewise. * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise. * cli/cli-logging.c (set_logging_redirect): Update call site of ui_out::redirect. (handle_redirections): Likewise. * scm-ports.c (ioscm_with_output_to_port_worker): Likewise. * top.c (execute_command_to_string): Likewise. * utils.c (do_ui_out_redirect_pop): Likewise.
2017-01-10Refactor Sized_relobj_file::do_relocate_sections.Cary Coutant5-9/+93
gold/ * aarch64.cc (AArch64_relobj::do_relocate_sections): Call Sized_relobj_file::relocate_section_range(). * arm.cc (Arm_relobj::do_relocate_sections): Likewise. * object.h (Sized_relobj_file::relocate_section_range): New method. * reloc.cc (Sized_relobj_file::do_relocate_sections): Move implementation... (Sized_relobj_file::relocate_section_range): ...to new method.
2017-01-10Update help of the "frame" commandSimon Marchi2-3/+5
The help message of the "frame" command states that nothing is printed if the command is executed from the command file or user-defined command. My testing leads me to think that this is not true (at least today). (gdb) bt #0 bar (n=17) at test.c:9 #1 0x00000000004006e0 in foo (v=17) at test.c:13 #2 0x00000000004006f0 in main () at test.c:21 (gdb) frame #0 bar (n=17) at test.c:9 9 baz(n); (gdb) define foo Type commands for definition of "foo". End with a line saying just "end". >frame 1 >end (gdb) foo #1 0x00000000004006e0 in foo (v=17) at test.c:13 13 bar(v); This patch simply removes that bit from the help message. I didn't find anything corresponding to this in the documentation that needs to be fixed. The behavior change corresponding to this documentation change was done in commit b00771232fab861fb31e42dfd5f6643ba1b43cc9. gdb/ChangeLog: * stack.c (_initialize_stack): Update "frame" command help message.
2017-01-10Fix sleb128-8 regressions.Tristan Gingold3-2/+7
gas/ * testsuite/gas/all/sleb128-8.d: Adjust test. * testsuite/gas/all/gas.exp (test_cond): Likewise.
2017-01-10Fix compile time warning about pointer comparison.Nick Clifton2-1/+7
PR 21034 * stabs.c (parse_stab_members): Fix thinko checking for g++ version 1 stabs information.
2017-01-10Updated Swedish translations for GAS and LDNick Clifton5-1529/+2157
2017-01-10[ARC] Add new linker emulation for npsGraham Markall8-2/+205
The arc700 nps variant uses some specific named sections to facilitate its CMEM based instructions, which operate on memory regions fixed at specific addresses. This commit adds the arclinux_nps emulation, which is based on the arclinux emulation. The new emulation uses the OTHER_SECTIONS variable in the emulation parameters script to provide symbols mapping to various locations in the CMEM space on nps. The accompanying test ensures that all symbols are provided at the correct address in the linker script. ld/ChangeLog: * Makefile.am: Add earclinux_nps.c target and add to ALL_EMULATION_SOURCES. * Makefile.in: Likewise, regenerated. * configure.tgt: Add arclinux_nps as an extra emulation for arc*-*-elf* and arc*-*-linux*. * emulparams/arc-nps.sh: New file. * emulparams/arclinux_nps.sh: New file. * testsuite/ld-arc/arclinux-nps.d, * testsuite/ld-arc/arclinux-nps.s: New test.
2017-01-10This patch ensure same output for sleb128 with large number.Tristan Gingold5-3/+29
gas/ * read.c (emit_leb128_expr): Extended unsigned big number for sleb128. * testsuite/gas/all/gas.exp (test_cond): Add sleb128-8 test. * testsuite/gas/all/sleb128.d: New test. * testsuite/gas/all/sleb128.s: New test source.
2017-01-10[GOLD] Fix tests for powerpc64Alan Modra4-10/+54
PowerPC64 defines .TOC. rather than _GLOBAL_OFFSET_TABLE_, and what's more, doesn't define it at all unless referenced. For ELFv1 ABI the symbol isn't normally referenced, so modify the test to accept .TOC. as a variant of _GLOBAL_OFFSET_TABLE_ and 0 or 1 occurrences. copy_test_relro as written doesn't need copy relocs on PowerPC64. PowerPC64 is always PIC. So, modify copy_test_relro to test that the existing vars are in fact read-only directly by deliberately causing a sigsegv, and add another couple of vars that do cause copy relocs even when PIC. * testsuite/ver_test_8.sh: Accept .TOC. in lieu of _GLOBAL_OFFSET_TABLE_. Allow zero count. * testsuite/copy_test_relro_1.cc (c, q): New vars. * testsuite/copy_test_relro.cc: Rewrite to test read-only status of variables directly. Reference new vars in read-only data.
2017-01-10[GOLD] Add --secure-plt option for ppc32Alan Modra3-0/+48
Added just to accept, and ignore. gcc since 2015-10-21, when configured with --enable-secureplt passes this option to the linker. As powerpc gold cannot link --bss-plt code successfully, gold needs to accept the option or the gcc specs file needs to be changed. The patch also make gold detect --bss-plt code and error out rather than producing a binary that crashes. * options.h: Add --secure-plt option. * powerpc.cc (Target_powerpc::Scan::local): Detect and error on -fPIC -mbss-plt code. (Target_powerpc::Scan::global): Likewise.
2017-01-10Automatic date update in version.inGDB Administrator1-1/+1
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.