aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-20Remove x86 gc_sweep_hookH.J. Lu3-327/+7
Since x86 backends never see the removed sections, there is no need for gc_sweep_hook. * elf32-i386.c (elf_i386_gc_sweep_hook): Removed. (elf_backend_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. (elf_backend_gc_sweep_hook): Likewise.
2016-04-20Don't check relocations in excluded sectionsH.J. Lu2-0/+7
When checking relocations after gc-sections has run, the unused sections have been removed. Don't check relocations in excluded sections. * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations in excluded sections
2016-04-20Move ELF relocation check after lang_gc_sectionsH.J. Lu3-14/+31
Move ELF relocation check after lang_gc_sections so that all the reference counting code for plt and got relocs can be removed. This only affects ELF targets which check relocations after opening all input file. * ldlang.c (lang_check_relocs): New function. (lang_process): Call lang_check_relocs after lang_gc_sections. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Don't call _bfd_elf_link_check_relocs here.
2016-04-21Automatic date update in version.inGDB Administrator1-1/+1
2016-04-20Build GDB as a C++ program by defaultPedro Alves5-3/+12
This makes --enable-build-with-cxx be "yes" by default. One must now configure with --enable-build-with-cxx=no in order to build with a C compiler. gdb/ChangeLog: 2016-04-20 Pedro Alves <palves@redhat.com> * build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Default to yes. * configure: Renegerate. gdb/gdbserver/ChangeLog: 2016-04-20 Pedro Alves <palves@redhat.com> * configure: Renegerate.
2016-04-20Fix host signal vs gdb signal mixup in gdb/darwin-nat.cPedro Alves2-1/+5
Building in C++ mode caught a bug here: .../src/gdb/darwin-nat.c: In function 'ptid_t darwin_decode_message(mach_msg_header_t*, darwin_thread_t**, inferior**, target_waitstatus*)': .../src/gdb/darwin-nat.c:1016:25: error: invalid conversion from 'int' to 'gdb_signal' [-fpermissive] status->value.sig = WTERMSIG (wstatus); ^ gdb/ChangeLog: 2016-04-20 Pedro Alves <palves@redhat.com> * darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host.
2016-04-20Fix "incompatible pointer type" warning in gdb/aarch64-tdep.cPedro Alves2-1/+7
Fixes, with x86_64-apple-darwin15-gcc (gcc 5.3.0): .../src/gdb/aarch64-tdep.c: In function 'aarch64_record_load_store': .../src/gdb/aarch64-tdep.c:3479:67: error: passing argument 3 of 'regcache_raw_read_unsigned' from incompatible pointer type [-Werror=incompatible-pointer-types] bits (aarch64_insn_r->aarch64_insn, 16, 20), &reg_rm_val); ^ In file included from .../src/gdb/regcache.h:23:0, from .../src/gdb/gdbarch.h:69, from .../src/gdb/defs.h:620, from .../src/gdb/aarch64-tdep.c:21: .../src/gdb/common/common-regcache.h:60:29: note: expected 'ULONGEST * {aka long unsigned int *}' but argument is of type 'uint64_t * {aka long long unsigned int *}' extern enum register_status regcache_raw_read_unsigned ^ gdb/ChangeLog: 2016-04-20 Pedro Alves <palves@redhat.com> * aarch64-tdep.c (aarch64_record_load_store): Change type of 'reg_rm_val' local to ULONGEST.
2016-04-20gdb/darwin-nat.c: Fix "cast to pointer from integer of different size" warningPedro Alves2-1/+5
Fixes, with gcc 5.3.0: .../src/gdb/darwin-nat.c: In function 'void darwin_resume_thread(inferior*, darwin_thread_t*, int, int)': .../src/gdb/darwin-nat.c:731:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (caddr_t)thread->gdb_port, nsignal); ^ .../src/gdb/darwin-nat.c:84:35: note: in definition of macro 'PTRACE' darwin_ptrace(#CMD, CMD, (PID), (ADDR), (SIG)) ^ thread->gdb_port is an unsigned int, caddr_t is a void pointer. gdb/ChangeLog: 2016-04-20 Pedro Alves <palves@redhat.com> * darwin-nat.c (darwin_resume_thread): Add uintptr_t cast.
2016-04-20Check R_386_NONE/R_X86_64_NONE in eh6.dH.J. Lu2-1/+10
There is no need for run-time relocation when converting pointers in .eh_frame section to DW_EH_PE_pcrel encoding. R_386_NONE and R_X86_64_NONE are expected since the space for run-time relocation has been allocated. This is an optimization. PR ld/19972 * testsuite/ld-elf/eh6.d: Pass -rW to readelf and check for R_386_NONE or R_X86_64_NONE.
2016-04-20Add ld-x86-64/pic1 testH.J. Lu4-0/+12
* testsuite/ld-x86-64/pic1.d: New file. * testsuite/ld-x86-64/pic1.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pic1.
2016-04-20Add ld-x86-64/pie2 testH.J. Lu4-0/+18
* testsuite/ld-x86-64/pie2.d: New file. * testsuite/ld-x86-64/pie2.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pie2.
2016-04-20Check run-time R_X86_64_32 relocation overflowH.J. Lu7-74/+118
Since elf_x86_64_check_relocs is called after opening all input files, we can detect dynamic R_X86_64_32 relocation overflow there. bfd/ PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. ld/ PR ld/19969 * testsuite/ld-x86-64/pr19969.d: New file. * testsuite/ld-x86-64/pr19969a.S: Likewise. * testsuite/ld-x86-64/pr19969b.S: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr19969 tests.
2016-04-20symmisc.c (dump_symtab_1): Print owning compunit for identical blockvectors.Doug Evans2-1/+11
* symmisc.c (dump_symtab_1): Print owning compunit for identical blockvectors.
2016-04-20Include arch/arm-linux.h in aarch32-linux-nat.cYao Qi2-0/+5
Fix the compilation failure by including arch/arm-linux.h in aarch32-linux-nat.c. gdb: 2016-04-20 Yao Qi <yao.qi@linaro.org> * aarch32-linux-nat.c: Include "arch/arm-linux.h".
2016-04-20Call _bfd_elf_create_ifunc_sections only for ifuncH.J. Lu3-10/+14
Since x86 check_relocs is called after opening all input files, we need to call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbols. * elf32-i386.c (elf_i386_check_relocs): Call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2016-04-20Check ELF relocs after opening all input filesH.J. Lu15-51/+131
Delaying checking ELF relocations until opening all input files so that symbol information is final when relocations are checked. This is only enabled for x86 targets. bfd/ * elf-bfd.h (_bfd_elf_link_check_relocs): New. * elflink.c (_bfd_elf_link_check_relocs): New function. (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs if check_relocs_after_open_input is FALSE. include/ * bfdlink.h (bfd_link_info): Add check_relocs_after_open_input. ld/ * emulparams/elf32_x86_64.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): New. * emulparams/elf_i386.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/elf_i386_be.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/elf_i386_chaos.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/elf_i386_ldso.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/elf_i386_vxworks.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/elf_x86_64.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emulparams/i386nto.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Likewise. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set check_relocs_after_open_input to TRUE if CHECK_RELOCS_AFTER_OPEN_INPUT is yes. (gld${EMULATION_NAME}_after_open): Call _bfd_elf_link_check_relocs on all inputs if check_relocs_after_open_input is TRUE.
2016-04-20Move ARM_CPSR_GREGNUM to arch/arm-linux.hYao Qi5-5/+18
This patch moves macro ARM_CPSR_GREGNUM to arch/arm-linux.h so that it can be used in GDBserver side. gdb: 2016-04-20 Yao Qi <yao.qi@linaro.org> * arm-linux-tdep.h (ARM_CPSR_GREGNUM): Move it to ... * arch/arm-linux.h: ... here. gdb/gdbserver: 2016-04-20 Yao Qi <yao.qi@linaro.org> * linux-aarch32-low.c: Include "arch/arm-linux.h". (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic number 16. (arm_store_gregset): Likewise.
2016-04-20Replace .long with .dc.a on my_personality_v0H.J. Lu2-1/+6
We should use .dc.a instead of .long to take address of a symbol. * testsuite/ld-elf/eh6.s: Replace .long with .dc.a on my_personality_v0.
2016-04-20update many old style function definitionsTrevor Saunders47-193/+171
This includes regenerating a bunch of files in opcodes/ with trunk cgen. gprof/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * basic_blocks.c: Update old style function definitions. * cg_arcs.c: Likewise. * cg_print.c: Likewise. * gen-c-prog.awk: Likewise. * gmon_io.c: Likewise. * hertz.c: Likewise. * hist.c: Likewise. * sym_ids.c: Likewise. bfd/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * cache.c: Update old style function definitions. * elf32-m68k.c: Likewise. * elf64-mmix.c: Likewise. * stab-syms.c: Likewise. opcodes/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * alpha-dis.c: Regenerate. * crx-dis.c: Likewise. * disassemble.c: Likewise. * epiphany-opc.c: Likewise. * fr30-opc.c: Likewise. * frv-opc.c: Likewise. * ip2k-opc.c: Likewise. * iq2000-opc.c: Likewise. * lm32-opc.c: Likewise. * lm32-opinst.c: Likewise. * m32c-opc.c: Likewise. * m32r-opc.c: Likewise. * m32r-opinst.c: Likewise. * mep-opc.c: Likewise. * mt-opc.c: Likewise. * or1k-opc.c: Likewise. * or1k-opinst.c: Likewise. * tic80-opc.c: Likewise. * xc16x-opc.c: Likewise. * xstormy16-opc.c: Likewise. ld/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * emultempl/scoreelf.em: Likewise. binutils/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * resres.c: Likewise. gas/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * cgen.c: Likewise. * config/tc-bfin.c: Likewise. * config/tc-ia64.c: Likewise. * config/tc-mep.c: Likewise. * config/tc-metag.c: Likewise. * config/tc-nios2.c: Likewise. * config/tc-rl78.c: Likewise.
2016-04-20change argument type to bfd_byteTrevor Saunders2-1/+5
We operate on the pointer's target as a set of bytes, and this avoids doing arithmetic on void * which is undefined in ISO C. bfd/ChangeLog: 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
2016-04-20gas/doc/arc: Add nps400 references into the documentationAndrew Burgess2-2/+14
Add nps400 to the list of acceptable values for the -mcpu command line switch, and to the .cpu directive. I've added an extra cross reference from -mcpu to .cpu to improve navigation of the documentation. gas/ChangeLog: * doc/c-arc.texi (ARC Options): Add nps400 to list of valus for -mcpu. Add cross reference to .cpu directive from -mcpu option. (ARC Directives): Add NPS400 to .cpu directive list.
2016-04-20arc: Fix relocation formula for ARC_NPS_CMEM16 relocationAndrew Burgess2-1/+5
The ME modifier was missing from the relocation formula for the ARC_NPS_CMEM16 relocation, and as such the relocation would not patch correctly on little endian targets. include/ChangeLog: * elf/arc-reloc.def (ARC_NPS_CMEM16): Add ME modifier to formula.
2016-04-20[AArch64] Support RAS extension for ARMv8 onwards.Matthew Wahab8-0/+249
The RAS extension was introduced as part of the ARMv8.2 architecture where it is a required feature. It is also available as an optional feature for ARMv8 and ARMv8.1. In binutils, the RAS extension is currently enabled by default for -march=armv8.2-a but is not available for -march=armv8 or -march=armv8.1-a. This patch adds the feature extension '+ras' to enable the RAS extension for ARMv8 and ARMv8.1, it is disabled by default. gas/ 2016-04-20 Matthew Wahab <matthew.wahab@arm.com> * config/tc-aarch64.c (aarch64_features): Add "ras". * doc/c-aarch64.texi (AArch64 Extensions): Add "ras". * testsuite/gas/aarch64/armv8-ras-1.d: New. * testsuite/gas/aarch64/armv8-ras-1.s: New. * testsuite/gas/aarch64/illegal-ras-1.d: New. * testsuite/gas/aarch64/illegal-ras-1.s: New. Change-Id: I824fb9bc8cf846bcc03aa17a726efb1350d78b9d
2016-04-19Add another testcase for PR ld/19719H.J. Lu4-0/+27
This test checks run-time relocation overflow with GOT relocation and 32-bit relocation against the same symbol. PR ld/19719 * testsuite/ld-x86-64/pr19719.d: New file. * testsuite/ld-x86-64/pr19719.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr19719.
2016-04-20Automatic date update in version.inGDB Administrator1-1/+1
2016-04-19Handle void * conversions in FreeBSD/x86 native code to fix C++ build.John Baldwin4-8/+20
gdb/ChangeLog: * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs to void *. (amd64bsd_store_inferior_registers): Likewise. * fbsd-nat.c (resume_one_thread_cb): Explicitly cast data to ptid_t *. (resume_all_threads_cb): Likewise. * i386bsd-nat.c (i386bsd_supply_gregset): Cast gregs to char *. (i386bsd_collect_gregset): Likewise. (i386bsd_fetch_inferior_registers): Change xstateregs to void *. (i386bsd_store_inferior_registers): Likewise.
2016-04-19Cast the pointer assigned to ss_sp to char *.John Baldwin2-1/+7
FreeBSD versions older than 11.0 use char * as the type of ss_sp in stack_t instead of the standards-defined void *. C++ allows a char * pointer to be converted to a void *, so it is safe to cast the return value of xmalloc to char * if ss_sp is either a char * or void *. Just always use the cast to char * since that is less ugly than having to add a special case. gdb/ChangeLog: * main.c (setup_alternate_signal_stack): Cast to char *.
2016-04-19opcodes/arc: Add yet more nps instructionsAndrew Burgess8-24/+393
Add some more arc/nps400 instructions and the associated operands. There's also a test added into the assembler. gas/ChangeLog: * testsuite/gas/arc/nps400-6.d: New file. * testsuite/gas/arc/nps400-6.s: New file. include/ChangeLog: * opcode/arc.h (MAX_INSN_ARGS): Increase 6 to 8. opcodes/ChangeLog: * arc-nps400-tbl.h: Add addb, subb, adcb, sbcb, andb, xorb, orb, fxorb, wxorb, shlb, shrb, notb, cntbb, div, mod, divm, and qcmp instructions. * arc-opc.c (insert_nps_bitop_size): Delete. (extract_nps_bitop_size): Delete. (MAKE_SRC_POS_INSERT_EXTRACT_FUNCS): Define, and use. (extract_nps_qcmp_m3): Define. (extract_nps_qcmp_m2): Define. (extract_nps_qcmp_m1): Define. (arc_flag_operands): Add F_NPS_SX, F_NPS_AR, F_NPS_AL. (arc_flag_classes): Add C_NPS_SX, C_NPS_AR_AL (arc_operands): Add NPS_SRC2_POS, NPS_SRC1_POS, NPS_ADDB_SIZE, NPS_ANDB_SIZE, NPS_FXORB_SIZ, NPS_WXORB_SIZ, NPS_R_XLDST, NPS_DIV_UIMM4, NPS_QCMP_SIZE, NPS_QCMP_M1, NPS_QCMP_M2, and NPS_QCMP_M3.
2016-04-19opcodes/arc: Add more nps instructionsAndrew Burgess9-0/+74
Add dctcp, dcip, dcet, and dcacl instructions. gas/ChangeLog: * testsuite/gas/arc/nps400-4.d: New file. * testsuite/gas/arc/nps400-4.s: New file. * testsuite/gas/arc/nps400-5.d: New file. * testsuite/gas/arc/nps400-5.s: New file. include/ChangeLog: * opcode/arc.h (insn_class_t): Add NET and ACL class. opcodes/ChangeLog: * arc-nps400-tbl.h: Add dctcp, dcip, dcet, and dcacl instructions.
2016-04-19Add pr number to earlier entry.Doug Evans1-0/+1
2016-04-19symmisc.c (dump_symtab_1, dump_symtab): Delete arg objfile.Doug Evans2-7/+11
gdb/ChangeLog: * symmisc.c (dump_symtab_1, dump_symtab): Delete arg objfile. All callers updated.
2016-04-19Fix copyright year, remove linux only test.Doug Evans1-7/+5
2016-04-19* source.c (is_regular_file): New arg errno_ptr.Doug Evans4-8/+92
gdb/ChangeLog: * source.c (is_regular_file): New arg errno_ptr. All callers updated. gdb/testsuite/ChangeLog: * gdb.base/bad-file.exp: New file.
2016-04-19linux-record: Squash cases with identical handlingAndreas Arnez2-17/+8
In record_linux_system_call there are some cases with identical handling. These are merged together to reduce code duplication. gdb/ChangeLog: * linux-record.c (record_linux_system_call): Merge handling for readlink/recv/read and pipe/pipe2.
2016-04-19Re-factor (i386|amd64)mpx target descriptions.Walfred Tedeschi13-132/+39
In the previous patch a new set of target descriptions (i386|amd64)-avx-mpx were added being same as the (i386|amd64)-mpx. This patch removes AVX feature from (i386|amd64)-mpx target description set. This way the (i386|amd64)avx_mpx(_linux|) set has AVX and MPX features and (i386|amd64)mpx(_linux|) only MPX. 2016-04-14 Walfred Tedeschi <walfred.tedeschi@intel.com> * features/i386/amd64-mpx-linux.xml: Remove AVX feature. * features/i386/amd64-mpx.xml: Remove AVX feature. * features/i386/i386-mpx-linux.xml: Remove AVX feature. * features/i386/i386-mpx.xml: Remove AVX feature. * features/i386/amd64-mpx-linux.c: Regenerate. * features/i386/amd64-mpx.c: Regenerate. * features/i386/i386-mpx-linux.c: Regenerate. * features/i386/i386-mpx.c: Regenerate. * regformats/i386/amd64-mpx-linux.dat: Regenerate. * regformats/i386/amd64-mpx.dat: Regenerate. * regformats/i386/i386-mpx-linux.dat: Regenerate. * regformats/i386/i386-mpx.dat: Regenerate.
2016-04-19Add target descriptions for AVX + MPXWalfred Tedeschi29-13/+1325
The current MPX target descriptions assume that MPX is always combined with AVX, however that's not correct. We can have machines with MPX and without AVX; or machines with AVX and without MPX. This patch adds new target descriptions for machines that support both MPX and AVX, as duplicates of the existing MPX descriptions. The following commit will remove AVX from the MPX-only descriptions. 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com> gdb/ChangeLog: * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c): New include. (amd64_linux_core_read_description): Add case for X86_XSTATE_AVX_MPX_MASK. (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux. * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition. * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include. (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK. (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx. * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits. (X86_XSTATE_AVX_MPX_MASK): New case. * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux) (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules. (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite) (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite): New expedites. * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New include. (i386_linux_core_read_description): Add case X86_XSTATE_AVX_MPX_MASK. (_initialize_i386_linux_tdep): Call initialize_tdesc_i386_avx_mpx_linux. * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include. * i386-tdep.c (features/i386/i386-avx-mpx.c): New include. (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK. * x86-linux-nat.c (x86_linux_read_description): Add case for X86_XSTATE_AVX_MPX_MASK. * features/i386/amd64-avx-mpx-linux.xml: New file. * features/i386/i386-avx-mpx-linux.xml: New file. * features/i386/i386-avx-mpx.xml: New file. * features/i386/amd64-avx-mpx.xml: New file. * features/i386/amd64-avx-mpx-linux.c: Generated. * features/i386/amd64-avx-mpx.c: Generated. * features/i386/i386-avx-mpx-linux.c: Generated. * features/i386/i386-avx-mpx.c: Generated. * regformats/i386/amd64-avx-mpx-linux.dat: Generated. * regformats/i386/amd64-avx-mpx.dat: Generated. * regformats/i386/i386-avx-mpx-linux.dat: Generated. * regformats/i386/i386-avx-mpx.dat: Generated. gdb/gdbserver/ChangeLog: * Makefile.in (clean): Add removal for i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c. (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c) (amd64-avx-mpx-linux.c): New rules. (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule. * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o. (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o. (srv_amd64_regobj): Add amd64-avx-mpx.o. (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o. (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml. (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml. (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml. (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml. (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o. (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o. * linux-x86-low.c (x86_linux_read_description): Add case for X86_XSTATE_AVX_MPX_MASK. (x86_get_ipa_tdesc_idx): Add cases for avx_mpx. (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and init_registers_i386_avx_mpx_linux. * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx. (initialize_low_tracepoint): Call init_registers_i386_avx_mpx_linux. * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx. (initialize_low_tracepoint): Call init_registers_amd64_avx_mpx_linux. * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value. (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux) (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New declarations.
2016-04-19Sync Makefile.tpl with gcc.Nick Clifton3-4/+17
2016-04-13 Segher Boessenkool <segher@kernel.crashing.org> PR bootstrap/70173 * Makefile.tpl (local-distclean): Delete the libcc1, gnattools, and gotools directories. Delete the stage_final file. * Makefile.in: Regenerate.
2016-04-19.cfi_remember_state/.cfi_restore_state documentationMartin Galvan2-5/+53
* doc/as.texinfo (.cfi_remember_state, .cfi_restore_state): Improve documentation.
2016-04-19Automatic date update in version.inGDB Administrator1-1/+1
2016-04-18Fix PR gdb/19250: ptrace prototype is not detected properly in C++ modePedro Alves5-154/+23
The ptrace args/return types detection doesn't work properly in C++ mode, on non-GNU/Linux hosts. For example, on gcc70 (NetBSD 5.1), where the prototype is: int ptrace(int, __pid_t, void*, int); configure misdetects it as: $ grep PTRACE_TYPE config.h #define PTRACE_TYPE_ARG1 int #define PTRACE_TYPE_ARG3 int * #define PTRACE_TYPE_ARG4 int /* #undef PTRACE_TYPE_ARG5 */ #define PTRACE_TYPE_RET int resulting in: ../../src/gdb/amd64bsd-nat.c: In function 'void amd64bsd_fetch_inferior_registers(target_ops*, regcache*, int)': ../../src/gdb/amd64bsd-nat.c:56: warning: dereferencing type-punned pointer will break strict-aliasing rules ../../src/gdb/amd64bsd-nat.c: In function 'void amd64bsd_store_inferior_registers(target_ops*, regcache*, int)': ../../src/gdb/amd64bsd-nat.c:104: warning: dereferencing type-punned pointer will break strict-aliasing rules ../../src/gdb/amd64bsd-nat.c:110: warning: dereferencing type-punned pointer will break strict-aliasing rules We could address this [1], however despite ptrace.m4's claim: # Needs to be tested in C++ mode, to detect whether we need to cast # the first argument to enum __ptrace_request. it appears that there's actually no need to test in C++ mode. Always running the ptrace tests in C mode works just the same on GNU/Linux. I remember experimenting with several different ways to handle the original issue back then, and maybe that was needed in some other attempt and then I didn't realize it ended up not really necessary. Confirmed that this fixes the NetBSD 5.1 C++ build, and confirmed that C and C++ builds on Fedora 23 are unaffected. [1] - https://sourceware.org/ml/gdb-patches/2016-04/msg00374.html gdb/ChangeLog: 2016-04-18 Pedro Alves <palves@redhat.com> * ptrace.m4 (GDB_AC_PTRACE): Don't run tests in C++ mode. * configure: Regenerate. gdb/gdbserver/ChangeLog: 2016-04-18 Pedro Alves <palves@redhat.com> * configure: Regenerate.
2016-04-18Fix gdb crash when trying to print the address of a synthetic C++ referenceMartin Galvan4-4/+120
After compiling a program which uses C++ references some optimizations may convert the references into synthetic "pointers". Trying to print the address of one of such synthetic references causes gdb to crash with the following error: (gdb) print &ref /build/buildd/gdb-7.7.1/gdb/dwarf2loc.c:1624: internal-error: Should not be able to create a lazy value with an enclosing type A problem internal to GDB has been detected, further debugging may prove unreliable. Apparently, what was causing it was that value_addr returns a copy of the value that represents the reference with its type set to T* instead of T&. However, its enclosing_type is left untouched, which fails a check made in read_pieced_value. We only see the crash happen for references that are synthetic because they're treated as pieced values, thus the call to read_pieced_value. On a related note, it seems that in general there are all sorts of breakage when working with synthetic references. This is reported here: https://sourceware.org/bugzilla/show_bug.cgi?id=19893 gdb/ChangeLog: 2016-04-18 Martin Galvan <martin.galvan@tallertechnologies.com> * valops.c (value_addr): For C++ references, set the copied value's enclosing_type as well. gdb/testsuite/ChangeLog: 2016-04-18 Martin Galvan <martin.galvan@tallertechnologies.com> * gdb.dwarf2/implref.exp: New file.
2016-04-18fortran: Testsuite, fix different type naming across compilers.Bernhard Heckel9-48/+142
Gfortran and ifort have different names for data types. Encapsulate type names in a library to increase number of supported compilers. gfortran -4.2 : int4 gfortran>=4.3 : integer(kind=4) ifort : INTEGER(4) 2016-04-18 Bernhard Heckel <bernhard.heckel@intel.com> gdb/testsuite/Changelog: * gdb.fortran/common-block.exp: Use type naming defined in lib fortran. * gdb.fortran/derived-type.exp: Use type naming defined in lib fortran. * gdb.fortran/multi-dim.exp: Use type naming defined in lib fortran. * gdb.fortran/vla-datatypes.exp: Use type naming defined in lib fortran. * gdb.fortran/vla-ptype-sub.exp: Use type naming defined in lib fortran. * gdb.fortran/vla-ptype.exp: Use type naming defined in lib fortran. * gdb.fortran/whatis_type.exp: Use type naming defined in lib fortran. * lib/fortran.exp (fortran_int4): New procedure. (fortran_real4, fortran_real8, fortran_complex4): Likewise. (fortran_logical4): Likewise.
2016-04-18Testsuite: Fix compiling of shared libraries with ICC.Bernhard Heckel2-0/+7
We are missing "-fpic" flag when compiling shared libraries with ICC. 2016-04-18 Bernhard Heckel <bernhard.heckel@intel.com> gdb/Testsuite/Changelog: * lib/gdb.exp (gdb_compile_shlib): Add flag for ICC compiler.
2016-04-18testsuite: Support detection of Intel compilers via test_compiler_version.Bernhard Heckel3-0/+29
Add Intel specific preprocessor macros to query the version of the compiler. 2016-04-18 Bernhard Heckel <bernhard.heckel@intel.com> gdb/Testsuite/Changelog: * lib/compiler.c: Add Intel specific preprocessor macros. * lib/compiler.cc: Likewise.
2016-04-18Add new NOCROSSREFS_TO linker script commandMatthew Fortune13-7/+180
NOCROSSREFS_TO is similar to the existing NOCROSSREFS command but only checks one direction of cross referencing. ld/ChangeLog * ld.texinfo: Document NOCROSSREFS_TO script command. * ldlang.h (struct lang_nocrossrefs): Add onlyfirst field. (lang_add_nocrossref_to): New prototype. * ldcref.c (check_local_sym_xref): Use onlyfirst to only look for symbols defined in the first section. (check_nocrossref): Likewise. * ldgram.y (NOCROSSREFS_TO): New script command. * ldlang.c (lang_add_nocrossref): Set onlyfirst to FALSE. (lang_add_nocrossref_to): New function. * ldlex.l (NOCROSSREFS_TO): New token. * NEWS: Mention NOCROSSREFS_TO. * testsuite/ld-scripts/cross4.t: New file. * testsuite/ld-scripts/cross5.t: Likewise. * testsuite/ld-scripts/cross6.t: Likewise. * testsuite/ld-scripts/cross7.t: Likewise. * testsuite/ld-scripts/crossref.exp: Run 4 new NOCROSSREFS_TO tests.
2016-04-18Revert 415fa612Yao Qi2-8/+8
2016-04-18 Yao Qi <yao.qi@linaro.org> Revert: 2016-04-15 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if PC is far from the end of function.
2016-04-18Automatic date update in version.inGDB Administrator1-1/+1
2016-04-17Revert "gas/arc: Make .cpu directive case-insensitive"Andrew Burgess2-8/+14
This reverts commit 9a452709fe126ea6da23a53426362e4435d2dc06. This change was committed as obvious, but it has been rightly been pointed out to me that this change is not obvious, and as such I am reverting it. gas/ChangeLog: Revert prevous change. * config/tc-arc.c (arc_option): Make .cpu directive case-sensitive again.
2016-04-17Automatic date update in version.inGDB Administrator1-1/+1
2016-04-16gas/arc: Make .cpu directive case-insensitiveAndrew Burgess2-8/+13
gas/ChangeLog: * config/tc-arc.c (arc_option): Make .cpu directive case-insensitive.