aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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.
2016-04-16gas/arc: Support NPS400 in .cpu directiveAndrew Burgess2-0/+8
gas/ChangeLog: * config/tc-arc.c (arc_option): Allow NPS400 in .cpu directive.
2016-04-15remove pointless assignmentTrevor Saunders2-5/+8
Presumably this was supposed to be regname[sizeof (regname) - 1] but was typoed to regname[sizeof (rename) - 1]. However that should be unnecessary because sprintf should null terminate. As is this assignment is invalid ISO C because rename refers to the function rename (), and sizeof on functions is undefined. In GNU C C the size of functions is 1 so the expression is the same as regname[0]. The following call to sprintf () clearly will over right that, so the statement either has no effect or is invalid. Given that it seems safe to just remove it. While we are there correct the size of regname, and switch from snprintf to sprintf since we know the exact length of the result. gas/ChangeLog: 2016-04-15 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-mips.c (md_begin): Remove useless assignment.
2016-04-16gdb/ada-exp.y: Remap yydefredPedro Alves2-0/+5
On: $ uname -a NetBSD gcc70.fsffrance.org 5.1 NetBSD 5.1 (GENERIC) #0: Sat Nov 6 13:19:33 UTC 2010 builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/amd64/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64 The link fails with: (...) d-exp.o: In function `parse_number': ../../src/gdb/d-exp.y:762: multiple definition of `yydefred' ada-exp.o:/home/palves/gdb/build/gdb/ada-lex.c:925: first defined here ld: Warning: size of symbol `yydefred' changed from 464 in ada-exp.o to 336 in d-exp.o Makefile:1404: recipe for target 'gdb' failed NetBSD's yacc uses a "yydefred" symbol that we missed renaming in the Ada parser. All other gdb parsers do this already. gdb/ChangeLog: 2016-04-16 Pedro Alves <palves@redhat.com> * ada-exp.y (yydefred): Define as ada_yydefred.
2016-04-16Automatic date update in version.inGDB Administrator1-1/+1
2016-04-16Fix gdb build with --enable-build-with-cxx --disable-nlsPedro Alves2-2/+7
Compiling gdb with --enable-build-with-cxx --disable-nls, we get: .../src/gdb/ada-lang.c:7657:16: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] type_str = (type != NULL ^ In file included from .../src/gdb/common/common-defs.h:67:0, from .../src/gdb/defs.h:28, from .../src/gdb/ada-lang.c:21: .../src/gdb/common/gdb_locale.h:40:27: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] # define _(String) (String) ^ .../src/gdb/ada-lang.c:7730:46: note: in expansion of macro ‘_’ char *name_str = name != NULL ? name : _("<null>"); ^ Makefile:1140: recipe for target 'ada-lang.o' failed gdb/ChangeLog: 2016-04-15 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_lookup_struct_elt_type): Constify 'type_str' and 'name_str' locals.
2016-04-16Fix gdb C++ build when libipt is availablePedro Alves2-2/+7
With libipt's headers installed, a build with --enable-build-with-cxx fails with: .../src/gdb/btrace.c: In function ‘btrace_insn_flag pt_btrace_insn_flags(const pt_insn*)’: .../src/gdb/btrace.c:734:33: error: invalid conversion from ‘int’ to ‘btrace_insn_flag’ [-fpermissive] enum btrace_insn_flag flags = 0; ^ .../src/gdb/btrace.c:737:11: error: invalid conversion from ‘int’ to ‘btrace_insn_flag’ [-fpermissive] flags |= BTRACE_INSN_FLAG_SPECULATIVE; ^ gdb/ChangeLog: 2016-04-15 Pedro Alves <palves@redhat.com> * btrace.c (pt_btrace_insn_flags): Change return type to btrace_insn_flags. Use btrace_insn_flags for local.
2016-04-15Regenerate Makefile.in/aclocal.m4 automake 1.11.6H.J. Lu25-988/+1650
bfd/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. binutils/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. gas/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. gold/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * testsuite/Makefile.in: Likewise. gprof/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. ld/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. opcodes/ * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise.
2016-04-15MIPS/Linux: Also recognize TRAP_BRKPT and TRAP_HWBKPTPedro Alves2-4/+13
This makes the MIPS Linux backends recognize TRAP_BRKPT and TRAP_HWBKPT in siginfo.si_code in addition to SI_KERNEL, since Linux 4.6 now reports the finer-grained si_code values too. Refs: https://sourceware.org/ml/gdb-patches/2016-02/msg00756.html https://sourceware.org/ml/gdb-patches/2016-04/msg00090.html On kernels that report SI_KERNEL (<= 4.5), we'll enter the "ambiguous" path of save_stop_reason: if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code) && GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code)) { /* The si_code is ambiguous on this arch -- check debug registers. */ if (!check_stopped_by_watchpoint (lp)) lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT; } while on kernels that report the finer-grained si_code values (>= 4.6), we'll enter the corresponding branches: else if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code)) { } else if (GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code)) { ... gdb/ChangeLog: 2016-04-15 Pedro Alves <palves@redhat.com> * nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also accept TRAP_BRKPT. [__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
2016-04-15[ARM] minor opt in thumb_stack_frame_destroyed_pYao Qi2-0/+13
thumb_stack_frame_destroyed_p scans the instructions from PC to the end of the function, but if PC is far from the end of pc, we don't have to scan, because PC should be in epilogue if it is still far from the end of the function. The criterion I use here is 16 bytes, which is more than 4 instructions. Regression tested on aarch64-linux with mutli-arch debug. gdb: 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-15Fix non-ELF powerpc build breakageAlan Modra2-0/+6
* config/tc-ppc.c (toc_reloc_types): Wrap in #ifdef OBJ_ELF
2016-04-15Add missing ChangeLog entry for PR gas/19909 fixH.J. Lu1-0/+10
2016-04-15Automatic date update in version.inGDB Administrator1-1/+1
2016-04-14make a few variables staticTrevor Saunders4-3/+9
They are only used in one file, so we might as well restrict there scope to that file, and theoretically this might slightly improve compilers ability to optimize usage of these variables. gas/ChangeLog: 2016-04-14 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-nios2.c (nios2_as_options): Make file static. * config/tc-ppc.c (toc_reloc_ypes): Likewise. * config/tc-sparc.c (native_op_table): Likewise.
2016-04-14remove some unused globalsTrevor Saunders3-2/+7
gas/ChangeLog: 2016-04-14 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-m32c.c (M32C_Macros): Remove. * config/tc-msp430.c (option_numbers): Likewise.
2016-04-14arc/nps400 : New cmem instructions and associated relocationAndrew Burgess20-19/+300
Add support for arc/nps400 cmem instructions, these load and store instructions are hard-wired to access "0x57f00000 + 16-bit-offset". Supporting this relocation required some additions to the arc relocation handling in the bfd library, as well as the standard changes required to add a new relocation type. There's a test of the new instructions in the assembler, and a test of the relocation in the linker. bfd/ChangeLog: * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c: Add 'opcode/arc.h' include. (struct arc_relocation_data): Add symbol_name. (arc_special_overflow_checks): New function. (arc_do_relocation): Use arc_special_overflow_checks, reindent as required, add an extra comment. (elf_arc_relocate_section): Setup symbol_name in reloc_data. gas/ChangeLog: * testsuite/gas/arc/nps400-3.d: New file. * testsuite/gas/arc/nps400-3.s: New file. include/ChangeLog: * elf/arc-reloc.def: Add ARC_NPS_CMEM16 reloc. * opcode/arc.h (NPS_CMEM_HIGH_VALUE): Define. ld/ChangeLog: * testsuite/ld-arc/arc.exp: New file. * testsuite/ld-arc/nps-1.s: New file. * testsuite/ld-arc/nps-1a.d: New file. * testsuite/ld-arc/nps-1b.d: New file. * testsuite/ld-arc/nps-1b.err: New file. opcodes/ChangeLog: * arc-nps400-tbl.h: Add xldb, xldw, xld, xstb, xstw, and xst instructions. * arc-opc.c (insert_nps_cmem_uimm16): New function. (extract_nps_cmem_uimm16): New function. (arc_operands): Add NPS_XLDST_UIMM16 operand.
2016-04-14bfd/arc: Rename enum entries to avoid conflictsAndrew Burgess2-17/+25
In bfd/elf32-arc.c an enum is created that contains entries with generic names like 'NONE' and 'OFF'. This has been fine for now, but I had a need to include opcode/arc.h into bfd/elf32-arc.c. Unfortunately opcode/arc.h includes a different enum with identical generic names. Given that changing the enum in the header file could mean wide-ranging changes, while changing the enum in the .c file is limited to only changing the one file, I've added a prefix to the enum in the .c file. This commit does not add the new include, that will come later. There should be no functional change with this commit. bfd/ChangeLog: * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all entries. (elf_arc_relocate_section): Update enum uses. (elf_arc_check_relocs): Likewise. (elf_arc_finish_dynamic_symbol): Likewise.
2016-04-14opcodes/arc: Move instruction length logic to new functionAndrew Burgess2-13/+50
Move the logic that calculates the instruction length out to a new function. Restructure the code to make it simpler. opcodes/ChangeLog: * arc-dis.c (arc_insn_length): New function. (print_insn_arc): Use arc_insn_length, change insnLen to unsigned. (find_format): Change insnLen parameter to unsigned.
2016-04-14Replace "link" with "sh_link"H.J. Lu2-10/+17
On Linux/x86, GCC 4.2 issues a warning: bfd/elf.c: In function ‘_bfd_elf_copy_private_bfd_data’: bfd/elf.c:1334: warning: declaration of ‘link’ shadows a global declaration /usr/include/unistd.h:757: warning: shadowed declaration is here make[6]: *** [elf.lo] Error 1 Replace "link" with "sh_link" fixes it. * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with "sh_link".
2016-04-14gas/arc: Unify tests run on big/little endian arc assemblerAndrew Burgess4-3/+8
We were running a slightly different set of assembler tests on big and little endian arc targets. This commit unifies the set of tests run. gas/ChangeLog: * testsuite/gas/arc/add_s-err.s: Update target pattern. * testsuite/gas/arc/warn.s: Likewise. * testsuite/gas/elf/elf.exp: Run test for arc.