aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-21Automatic date update in version.inGDB Administrator1-1/+1
2017-01-20Fix uppercase test names in gdb.python/py-xmethods.expLuis Machado2-20/+31
Some leftover uppercase test names in py-xmethods.exp. The patch also replaces two "continue" calls with untested calls to make things a bit more clear. gdb/testsuite/ChangeLog: 2017-01-20 Luis Machado <lgustavo@codesourcery.com> * gdb.python/py-xmethods.exp: Fix test names starting with lowercase and add untested calls.
2017-01-20Make gdb.python/python.exp more robustLuis Machado2-1/+20
I noticed gdb.python/python.exp failing on aarch64-elf like so: FAIL: gdb.python/python.exp: Test decode_line func1 line number This particular test expects the line number for func1 to be 19, hardcoded. In my aarch64-elf tests gdb thinks func1 is at line 20, making the test fail. The following patch addresses this by reading the line number information from GDB and comparing it against the python decoded symtab information. gdb/testsuite/ChangeLog: 2017-01-20 Luis Machado <lgustavo@codesourcery.com> * gdb.python/python.exp: Check line number against what GDB thinks the line number is for func1.
2017-01-20Add command to erase all flash memory regionsLuis Machado9-0/+122
Changes in v4: - Replaced phex call with hex_string. Changes in v3: - Addressed comments by Pedro. - Output of memory region size now in hex format. - Misc formatting fixups. - Addressed Simon's comments on formatting. - Adjusted command text in the manual entry. - Fixed up ChangeLog. - Renamed flash_erase_all_command to flash_erase_command. Changes in v2: - Added NEWS entry. - Fixed long lines. - Address printing with paddress. Years ago we contributed flash programming patches upstream. The following patch is a leftover one that complements that functionality by adding a new command to erase all reported flash memory blocks. The command is most useful when we're dealing with flash-enabled targets (mostly bare-metal) and we need to reset the board for some reason. The wiping out of flash memory regions should help the target come up with a known clean state from which the user can load a new image and resume debugging. It is convenient enough to do this from the debugger, and there is also an MI command to expose this functionality to the IDE's. gdb/doc/ChangeLog: 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com> Luis Machado <lgustavo@codesourcery.com> * gdb.texinfo (-target-flash-erase): New MI command description. (flash-erase): New CLI command description. gdb/ChangeLog: 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com> Luis Machado <lgustavo@codesourcery.com> * NEWS (New commands): Mention flash-erase. (New MI commands): Mention target-flash-erase. * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI command. * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration. * mi/mi-main.c (mi_cmd_target_flash_erase): New function. * target.c (flash_erase_command): New function. (initialize_targets): Add new flash-erase command. * target.h (flash_erase_command): New declaration.
2017-01-20[AArch64] Optimize .gnu.hash table size for executableJiong Wang7-0/+53
bfd/ * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function. (elf_backend_hash_symbol): Define. ld/ * testsuite/ld-aarch64/aarch64-elf.exp (aarch64elflinktests): New tests. * testsuite/ld-aarch64/func-in-so.s: New test source file. * testsuite/ld-aarch64/func-sym-hash-opt.s: Likewise. * testsuite/ld-aarch64/func-sym-hash-opt.d: New expected test result.
2017-01-20Updated Irish translation for the opcodes library.Nick Clifton2-458/+813
* po/ga.po: Updated Irish translation.
2017-01-20Fix potential array overrun in x86 assembler.Nick Clifton2-1/+6
* config/tc-i386.c (parse_operands): Check for operand overflow before setting the unspecified bit.
2017-01-20Fix problem in aarch64 gold sources uncovered by Coverty - using sizeof on a ↵Nick Clifton2-2/+13
pointer instead of an array. * aarch64.cc (Stub_template_repertoire): Change ST_E_835769_INSNS from a pointer to an array.
2017-01-20Sync zlib sources with GCC, upgrading to 1.2.10.Nick Clifton97-1747/+8409
Changes in 1.2.10 (2 Jan 2017) - Avoid warnings on snprintf() return value - Fix bug in deflate_stored() for zero-length input - Fix bug in gzwrite.c that produced corrupt gzip files - Remove files to be installed before copying them in Makefile.in - Add warnings when compiling with assembler code Changes in 1.2.9 (31 Dec 2016) - Fix contrib/minizip to permit unzipping with desktop API [Zouzou] - Improve contrib/blast to return unused bytes - Assure that gzoffset() is correct when appending - Improve compress() and uncompress() to support large lengths - Fix bug in test/example.c where error code not saved - Remedy Coverity warning [Randers-Pehrson] - Improve speed of gzprintf() in transparent mode - Fix inflateInit2() bug when windowBits is 16 or 32 - Change DEBUG macro to ZLIB_DEBUG - Avoid uninitialized access by gzclose_w() - Allow building zlib outside of the source directory - Fix bug that accepted invalid zlib header when windowBits is zero - Fix gzseek() problem on MinGW due to buggy _lseeki64 there - Loop on write() calls in gzwrite.c in case of non-blocking I/O - Add --warn (-w) option to ./configure for more compiler warnings - Reject a window size of 256 bytes if not using the zlib wrapper - Fix bug when level 0 used with Z_HUFFMAN or Z_RLE - Add --debug (-d) option to ./configure to define ZLIB_DEBUG - Fix bugs in creating a very large gzip header - Add uncompress2() function, which returns the input size used - Assure that deflateParams() will not switch functions mid-block - Dramatically speed up deflation for level 0 (storing) - Add gzfread(), duplicating the interface of fread() - Add gzfwrite(), duplicating the interface of fwrite() - Add deflateGetDictionary() function - Use snprintf() for later versions of Microsoft C - Fix *Init macros to use z_ prefix when requested - Replace as400 with os400 for OS/400 support [Monnerat] - Add crc32_z() and adler32_z() functions with size_t lengths - Update Visual Studio project files [AraHaan]
2017-01-20objdump: Better objdump section headers in wide modeAndrew Burgess4-9/+59
When displaying the section headers table using objdump (-h), the column containing the section header name is currently fixed at 13 characters. A section name that is longer than 13 characters will overflow the column causing the table to become miss-aligned. In this commit I change the behaviour so that _in wide mode_ (-w -h) the section name column is dynamically resized to fit the longest section name we plan to display. In wide mode the column still retains a minimum width of 13 characters. In non-wide more the behaviour is completely unchanged. While I was changing the dump_headers function I have unified the two printf lines that handled the different address widths into a single printf, the address width is now passed into printf using the '*' field width format character. binutils/ChangeLog: * objdump.c (dump_section_header): Extract max section name length from data parameter, use this when formatting output. (find_longest_section_name): New function. (dump_headers): Calculate longest section name when in wide mode, reformat to unify printing of header line. ld/ChangeLog: * testsuite/ld-elf/eh-frame-hdr.d: Update expected results.
2017-01-20fix gdbserver build in nat/linux-ptrace.c on arm-androidJoel Brobecker2-0/+7
The following change replaced an include of gregset.h by an include of <sys/procfs.h>: commit 39b22471578843019026c50fcdbe0483a6045970 Date: Thu Aug 11 12:01:22 2016 +0100 Subject: Fix fallout from gdb/20413's fix (x32: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER) Unfortunately, this broke gdbserver on Android, because that file does not exist on this platform. This patch fixes the issue by conditionalizing its include with HAVE_SYS_PROCFS_H (which we check both in gdb/configure and gdbserver/configure). gdb/ChangeLog: * nat/linux-ptrace.c: Only include <sys/procfs.h> if HAVE_SYS_PROCFS_H is defined. Tested by rebuilding gdbserver on arm-android and GNU/Linux.
2017-01-20Automatic date update in version.inGDB Administrator1-1/+1
2017-01-19Automatic date update in version.inGDB Administrator1-1/+1
2017-01-18PR ld/20995: MIPS: Set GAS flags correctly for testsMaciej W. Rozycki2-10/+23
Complement commit 9acc85a62eb7 ("Use dynrelro for symbols in relro sections too"). ld/ PR ld/20995 * testsuite/ld-elf/elf.exp: Set GAS flags correctly for the `mips*-*-*' target and `pr20995' and `pr20995-2' tests.
2017-01-18PR ld/20828: Fix linker script symbols wrongly forced local with section GCMaciej W. Rozycki10-3/+123
Fix a generic ELF linker regression introduced with a chain of changes made to unused input section garbage collection: - commit 1a766c6843ce ("Also hide symbols without PLT nor GOT references."), <https://sourceware.org/ml/binutils/2011-09/msg00076.html>, - commit 1d5316ab67e1 ("PR ld/13177: garbage collector retains zombie references to external libraries"), <https://sourceware.org/ml/binutils/2011-10/msg00161.html>, - commit 6673f753c019 ("Fix PR 12772, garbage collection of dynamic syms"), <https://sourceware.org/ml/binutils/2011-12/msg00077.html>, causing the garbage collection of unused symbols present in a DSO involved in a link to make identically named symbols ordinarily defined (i.e. not hidden or PROVIDEd) by a linker script local, even though the latter symbols are supposed to be global as if no DSO defined them as well. This is because linker script assignments are processed very late as `lang_process' proceeds, down in the call to `ldemul_before_allocation', which is made after the call to `lang_gc_sections' to do input section garbage collecting. Consequently if unused, then any such DSO-defined symbol has already been garbage-collected and internally marked local. It would ordinarily be removed from dynamic symbol table output, however a linker script assignment correctly replaces its original definition with the new one and enters it into the dynamic symbol table produced as it is supposed to be exported. The original local marking is however retained making the symbol local in the dynamic symbol table and therefore not available externally. This also causes a sorting problem with the MIPS target, which does not expect non-section local dynamic symbols to be output and produces an invalid binary. Fix the problem then, by removing the `forced_local' marking for the offending case and add suitable test cases. First to verify that unused symbols ordinarily defined with linker script assignments remain exported in the context of input section garbage collection whether or not a DSO defining identically named symbols is present in the link. Second that a linker version script still correctly retains or removes such symbols as requested. bfd/ PR ld/20828 * elflink.c (bfd_elf_record_link_assignment): Clear any `forced_local' marking for DSO symbols that are not being provided. ld/ PR ld/20828 * testsuite/ld-elf/pr20828-1.sd: New test. * testsuite/ld-elf/pr20828-2a.sd: New test. * testsuite/ld-elf/pr20828-2b.sd: New test. * testsuite/ld-elf/pr20828.ld: New test linker script. * testsuite/ld-elf/pr20828.ver: New test version script. * testsuite/ld-elf/pr20828.s: New test source. * testsuite/ld-elf/shared.exp: Run the new test.
2017-01-18PR gas/20649: MIPS: Fix GOT16/LO16 reloc pairing with comdat sectionsMaciej W. Rozycki7-5/+102
Correct a regression from commit 8614eeee67f9 ("Traditional MIPS patches"), <https://sourceware.org/ml/binutils/2000-07/msg00018.html>, which caused symbols in linkonce or what is these days known as comdat sections to be treated as external for the purpose of PIC relocation generation even if their binding remains STB_LOCAL. This in turn disabled GOT16/LO16 relocation pairing with references to such symbols, as no complementing LO16 relocation is expected for external GOT16 references in the o32 ABI, which ultimately leads to link errors, e.g.: ld: comdat-reloc.o: Can't find matching LO16 reloc against `foo' for R_MIPS_GOT16 at 0x24 in section `.text.bar[bar]' as with the LD test case included with this change. Revert the special case for symbols in comdat sections then, making code actually match `adjust_reloc_syms' as indicated in its explanatory comment, and adjust calling code accordingly. Also bring back the corresponding description of what now is `s_is_linkonce', lost with commit 5f0fe04bc550 ("Improved MIPS16/MIPS32 code intermixing for gas."), <https://www.sourceware.org/ml/binutils/2006-07/msg00039.html>. gas/ PR gas/20649 * config/tc-mips.c (pic_need_relax): Don't check for linkonce symbols, remove the `segtype' parameter. (mips_frob_file, md_estimate_size_before_relax): Adjust accordingly. (s_is_linkonce): Add an explanatory comment. * testsuite/gas/mips/comdat-reloc.d: New test. * testsuite/gas/mips/comdat-reloc.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test. ld/ PR gas/20649 * testsuite/ld-mips-elf/mips-elf.exp: Add PIC comdat GOT16/LO16 relocation pairing link test.
2017-01-18[ARM] Fix the decoding of indexed element VCMLA instructionSzabolcs Nagy5-4/+39
Bit 24 of the indexed element vcmla decode mask was incorrectly left unset. This could cause incorrect disassembly of some currently undefined instructions as vcmla. Rotatation immediates were not printed correctly in the disassembly (could print 170 and 280 instead of 180 and 270). opcodes/ * arm-dis.c (coprocessor_opcodes): Fix vcmla mask and disassembly. gas/ * testsuite/gas/arm/armv8_3-a-simd.s: Add vcmla tests. * testsuite/gas/arm/armv8_3-a-simd.d: Update.
2017-01-18Allocate data in cached_reg_tAlan Hayward2-6/+25
2017-01-18 Alan Hayward <alan.hayward@arm.com> * remote.c (struct cached_reg): Change data into a pointer. * (stop_reply_dtr): Free data pointers before deleting vector. (process_stop_reply): Likewise. (remote_parse_stop_reply): Allocate space for data
2017-01-18Use register_size () instead of MAX_REGISTER_SIZEAlan Hayward4-5/+16
2017-01-18 Alan Hayward <alan.hayward@arm.com> * amd64-tdep.c (amd64_pseudo_register_read_value): remove MAX_REGISTER_SIZE. (amd64_pseudo_register_read_value): Likewise. * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE. (store_register_using_P): Likewise. * regcache.c (regcache_xfer_part): Likewise.
2017-01-18Add support for processing lex source files with flex v 2.6.3Bernhard Rosenkranzer6-27/+18
PR 21059 binutils* arlex.l: Support processing with flex 2.6.3. * deflex.l: Likewise. gas * config/bfin-lex.l: Support processing with flex 2.6.3. * itbl-lex.l: Likewise.
2017-01-18Catch gas exit-via-signalNathan Sidwell7-24/+88
gas/ * as.h (gas_assert): Use abort. (as_assert): Remove. (signal_init): Declare. * as.c (main): Call signal_init. * messages.c: #include <signal.h> (as_assert): Delete. (as_abort): Allow NULL FILE. (signal_crash): New. (signal_init): Register fatal signal handlers. * configure.ac: Check for strsignal. * config.in: Rebuilt. * configure: Rebuilt.
2017-01-18Skip linker tests for unique symbols in shared libraries if the target does ↵Dimitar Dimitrov2-24/+41
not support building shared libraries. ld * testsuite/ld-unique/unique.exp: Filter shared lib cases in uniqeue.exp, as not all targets have such support.
2017-01-18Stop the (optional) dialong control data from being aligned when ↵Dmitry Timoshkov4-5/+34
parsing/writing windows resource files. binutils* resbin.c: Optional dialog control data immediately follow the control description without alignment. * testsuite/binutils-all/windres/controldata.rc: New test. source. * testsuite/binutils-all/windres/controldata.rsd: New test.
2017-01-18Updated Swedish translation for GAS.Nick Clifton2-203/+205
2017-01-17Fixes for addv and xtn2 instructions.Jim Wilson5-31/+158
sim/aarch64/ * simulator.c (do_vec_ADDV): Call aarch64_set_vec_u64 instead of aarch64_set_reg_u64. In case 2, call HALT_UNALLOC if not full. In case 3, call HALT_UNALLOC unconditionally. (do_vec_XTN): Delete shifts. In case 2, change index from i + 4 to i + 2. Delete if on bias, change index to i + bias * X. sim/testsuite/sim/aarch64/ * addv.s: New. * xtn.s: New.
2017-01-18Automatic date update in version.inGDB Administrator1-1/+1
2017-01-17RISC-V/bfd: Hook elf_backend_object_p to set the mach type.Kuan-Lin Chen2-0/+18
2017-01-17Automatic date update in version.inGDB Administrator1-1/+1
2017-01-16gdb: sparc: split real and pseudo registers.Ivo Raisr5-87/+190
gdb/ChangeLog: 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com> Split real and pseudo registers. * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro. (sparc32_pseudo_regnum): New enum. * sparc64-tdep.h (sparc64_pseudo_regnum): New enum. * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro. (SPARC32_CP0_REGISTERS): New macro. (sparc32_pseudo_register_name): New function. (sparc32_register_name): Use sparc32_pseudo_register_name. (sparc32_pseudo_register_type): New function. (sparc32_register_type): Use sparc32_pseudo_register_type. (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle pseudo register numbers. * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro. (SPARC64_CP0_REGISTERS): New macro. (sparc64_pseudo_register_name): New function. (sparc64_register_name): Use sparc64_pseudo_register_name. (sparc64_pseudo_register_type): New function. (sparc64_register_type): Use sparc64_pseudo_register_type. (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle pseudo register numbers. (sparc64_store_floating_fields, sparc64_extract_floating_fields, sparc64_store_arguments): Handle pseudo register numbers.
2017-01-16Updated Swedish translations for GAS and LD subdirectories.Nick Clifton4-864/+896
gas * po/sv.po: Updated Swedish translation. ld * po/sv.po: Updated Swedish translation.
2017-01-16Automatic date update in version.inGDB Administrator1-1/+1
2017-01-15Automatic date update in version.inGDB Administrator1-1/+1
2017-01-14Automatic date update in version.inGDB Administrator1-1/+1
2017-01-13Gold: Fix build with GCC 4.2H.J. Lu2-1/+7
PR gold/21040 * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative): Cast 0x80008000 to uint64_t.
2017-01-13Don't print too much if remote_debug is onYao Qi2-4/+39
If we turn "remote debug" on and GDB does some vFile operations, a lot of things will be printed in the screen, which makes "remote debug" useless. This patch changes the code that we only print 512 chars in max in debugging messages, like this, Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Packet received: l<?xml version="1.0"?>\n<!-- Copyright (C) 2010-2016 Free Software Foundation, Inc.\n\n Copying and distribution of this file, with or without modification,\n are permitted in any medium without royalty provided the copyright\n notice and this notice are preserved. -->\n\n<!-- AMD64 with AVX - Includes Linux-only special "register". -->\n\n<!DOCTYPE target SYSTEM "gdb-target.dtd">\n<target>\n <architecture>i386:x86-64</architecture>\n <osabi>GNU/Linux</osabi>\n <xi:include href="64bit-core.xml"/>\n <xi:[14 bytes omitted] Sending packet: $qXfer:auxv:read::0,1000#6b...Packet received: l!\000\000\000\000\000\000\000\000d\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000@\000@\000\000\000\000\000\004\000\000\000\000\000\000\0008\000\000\000\000\000\000\000\005\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\a\000\000\000\000\000\000\000\177\000\000\b\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\000\004@\000\000\000\000\000\013\000\000\000\000\000\000\003\000\000\000\000\000\000\f\000\000\000\000\000\000\003\000\000\000\000\000\000\r\000\000\000\000\000\000\003\000\000\000\000\000\000\016\000\000\000\000\000\000\003\000\000\000\000\000\000\027\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\000\000\000\000\000\000\177\000\000\037\000\000\000\000\000\000\000\000\017\000\000\000\000\000\000\00\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000[582 bytes omitted] gdb: 2017-01-13 Yao Qi <yao.qi@linaro.org> * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro. (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug output. (getpkt_or_notif_sane_1): Likewise.
2017-01-13'make check-headers' for c++ headerYao Qi2-2/+7
If I run 'make check-headers', I get these errors, .... In file included from ../../binutils-gdb/gdb/common/common-defs.h:78:0, from ../../binutils-gdb/gdb/defs.h:28, from <command-line>:0: ../../binutils-gdb/gdb/common/common-utils.h:23:18: fatal error: string: No such file or directory #include <string> ^ because we still parse headers as c file with a c compiler, which is no longer true after we moved to C++. This patch changes it to use C++ compiler and parse headers as c++ headers. gdb: 2017-01-13 Yao Qi <yao.qi@linaro.org> * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead of CC. Pass "-x c++-header" instead of "-x c".
2017-01-13Return -1 on memory error in print_insn_m68kYao Qi2-7/+19
m68k-dis.c:print_insn_m68k doesn't return -1 on memory error, but GDB expects it returning -1 on memory error. opcodes: 2017-01-13 Yao Qi <yao.qi@linaro.org> * m68k-dis.c (match_insn_m68k): Extend comments. Return -1 if FETCH_DATA returns 0. (m68k_scan_mask): Likewise. (print_insn_m68k): Update code to handle -1 return value.
2017-01-13Remove magic numbers in m68k-dis.c:print_insn_argYao Qi2-41/+72
When I inspect the return values of disassmblers, I happen to see various -1/-2/-3 magic numbers are used in m68k-dis.c. This patch is to replace them with enum. -1 and -2 is "clearly documented" in print_ins_arg's comments, but -3 isn't. In fact, -3 is returned when FETCH_DATA returns false, which means memory error (because fetch_data return 0 on memory error). So I name enum PRINT_INSN_ARG_MEMORY_ERROR for -3. This patch is a refactor patch, doesn't affect any functionality. opcodes: 2017-01-13 Yao Qi <yao.qi@linaro.org> * m68k-dis.c (enum print_insn_arg_error): New. (NEXTBYTE): Replace -3 with PRINT_INSN_ARG_MEMORY_ERROR. (NEXTULONG): Likewise. (NEXTSINGLE): Likewise. (NEXTDOUBLE): Likewise. (NEXTDOUBLE): Likewise. (NEXTPACKED): Likewise. (FETCH_ARG): Likewise. (FETCH_DATA): Update comments. (print_insn_arg): Update comments. Replace magic numbers with enum. (match_insn_m68k): Likewise.
2017-01-13Automatic date update in version.inGDB Administrator1-1/+1
2017-01-12Fix incorrect byte counts.Cary Coutant2-3/+7
gold/ * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
2017-01-12x86-64: Also generate unwind info for .plt.bndH.J. Lu7-30/+205
Also generate unwind info for the .plt.bnd section. Sine it is the same as unwind info for the .plt.got section, we use unwind info for the .plt.got section to cover the the .plt.bnd section. bfd/ PR ld/21038 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add plt_bnd_eh_frame. (elf_x86_64_check_relocs): Create .eh_frame section for the .plt.bnd section. (elf_x86_64_size_dynamic_sections): Allocate and initialize .eh_frame section for the .plt.bnd section. (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section for the .plt.bnd section. ld/ PR ld/21038 * testsuite/ld-x86-64/pr21038b.d: Updated. * testsuite/ld-x86-64/pr21038c.d: New file. * testsuite/ld-x86-64/pr21038c.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr21038c.
2017-01-12Add support for locating separate debug info files via the build-id method.Nick Clifton7-40/+456
PR binutils/20876 bfd * opncls.c (find_separate_debug_file): Add include_dirs parameter. Only include the directory part of the bfd's filename in search paths if include_dirs is true. Add a couple of extra locations for looking for debug files. ( bfd_follow_gnu_debuglink): Update invocation of find_separate_debug_file. (bfd_follow_gnu_debugaltlink): Likewise. (get_build_id): New function: Finds the build-id of the given bfd. (get_build_id_name): New function: Computes the name of the separate debug info file for a bfd, based upon its build-id. (check_build_id_file): New function: Checks to see if a separate debug info file exists at the given location, and that its build-id matches that of the original bfd. (bfd_follow_build_id_debuglink): New function: Finds a separate debug info file for a given bfd by using the build-id method. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id method of locating a separate debug info file before using the debuglink method. * bfd-in2.h: Regenerate. binutils * NEWS: Mention the new feature. * testsuite/binutils-all/objdump.exp (test_build_id_debuglink): New proc to test the location of separate debug info files using the build-id method.
2017-01-12Enable Intel AVX512_VPOPCNTDQ instructionsIgor Tsimbalist18-5345/+5853
gas/ 2017-01-12 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * config/tc-i386.c (cpu_arch): Add .avx512_vpopcntdq. (cpu_noarch): Add noavx512_vpopcntdq. * doc/c-i386.texi: Document avx512_vpopcntdq, noavx512_vpopcntdq. * testsuite/gas/i386/i386.exp: Run AVX512_VPOPCNTDQ tests. * testsuite/gas/i386/avx512_vpopcntdqd-intel.d: New file. * testsuite/gas/i386/avx512_vpopcntdqd.d: Ditto. * testsuite/gas/i386/avx512_vpopcntdqd.s: Ditto. * testsuite/gas/i386/x86-64-avx512_vpopcntdqd-intel.d: Ditto. * testsuite/gas/i386/x86-64-avx512_vpopcntdqd.d: Ditto. * testsuite/gas/i386/x86-64-avx512_vpopcntdqd.s: Ditto. opcodes/ 2017-01-12 Igor Tsimbalist <igor.v.tsimbalist@intel.com> * i386-dis.c (enum): Add PREFIX_EVEX_0F3855, EVEX_W_0F3855_P_2. * i386-dis-evex.h (evex_table): Updated. * i386-gen.c (cpu_flag_init): Add CPU_AVX512_VPOPCNTDQ_FLAGS, CPU_ANY_AVX512_VPOPCNTDQ_FLAGS. Update CPU_ANY_AVX512F_FLAGS. (cpu_flags): Add CpuAVX512_VPOPCNTDQ. * i386-opc.h (enum): (AVX512_VPOPCNTDQ): New. (i386_cpu_flags): Add cpuavx512_vpopcntdq. * i386-opc.tbl: Add Intel AVX512_VPOPCNTDQ instructions. * i386-init.h: Regenerate. * i386-tbl.h: Ditto.
2017-01-12Update comment in remote_can_async_pSimon Marchi2-1/+6
I find this comment counter intuitive, and it probably predates the always-target-async change. AFAIK, remote will always be async, unless the user explicitly prevents it with "maint set target-async off". gdb/ChangeLog: * remote.c (remote_can_async_p): Update comment.
2017-01-12Update comment in linux_nat_can_async_pSimon Marchi2-3/+6
I think this comment is outdated. Nowadays, linux-nat is always async, unless the user has explictly turned it off with "maint set target-async off". gdb/ChangeLog: * linux-nat.c (linux_nat_can_async_p): Update comment.
2017-01-12Remove dead serial_interface_lookup callsSimon Marchi2-5/+5
By inspecting the serial_add_interface calls, I found that the serial interface names that we have today are: - hardwire - terminal - pipe - tcp - event The calls to serial_interface_lookup with any other names are most likely leftovers which can be removed since these serial interfaces don't exist anymore. The commits that removed the "pc" and "parallel" interfaces are respectively: cb2a4ac5dae478fcd9d6e772530c3aba0576fc7a and e386d4d2fb55042f77d0557a0849ed2464aee7b3 gdb/ChangeLog: * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
2017-01-12Prevent internal assembler errors if a stabs creation function builds an ↵Nick Clifton4-25/+81
badly formatted input string. * read.c (temp_ilp): New function. Installs a temporary input line pointer. (restore_ilp): New function. Restores the original input line pointer. * read.h (temp_ilp): Prototype. (restore_ilp): Prototype. * stabs.c (dot_func_p): Use bfd_boolean type. (generate_asm_file): Use temp_ilp and restore_ilp. (stabs_generate_asm_lineno): Likewise. (stabs_generate_asm_endfunc): Likewise.
2017-01-12Return -1 on memory error in print_insn_msp430Yao Qi2-14/+99
Disassemblers in opcodes return -1 on memory error, but msp430 doesn't follow this convention. If I change GDB not to throw exception in disassemble_info.memory_error_func and rely on the return value of disassembler, I'll get the following output. (gdb) disassemble 0x0,+8 Dump of assembler code from 0x0 to 0x8: 0x00000000: .word 0xffff; ???? 0x00000002: .word 0xffff; ???? 0x00000004: .word 0xffff; ???? 0x00000006: .word 0xffff; ???? End of assembler dump. This patch teaches print_insn_msp430 and its callees to return -1 on memory error. opcodes: 2017-01-12 Yao Qi <yao.qi@linaro.org> * msp430-dis.c (msp430_singleoperand): Return -1 if msp430dis_opcode_signed returns false. (msp430_doubleoperand): Likewise. (msp430_branchinstr): Return -1 if msp430dis_opcode_unsigned returns false. (msp430x_calla_instr): Likewise. (print_insn_msp430): Likewise.
2017-01-12Automatic date update in version.inGDB Administrator1-1/+1
2017-01-11Fix more compile errors with GCC 4.2.Cary Coutant2-12/+22
gold/ PR gold/21040 * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry): Remove unnecessary 'typename' keyword. (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise. (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise. (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise. (Output_data_plt_x86_64_bnd::do_write): Likewise.