aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-12[gdb/testsuite] Require is_amd64_regs_target in gdb.base/disasm-optim.expTom de Vries2-1/+5
When running test-case gdb.base/disasm-optim.exp with target board unix/-m32, we get: ... Running disasm-optim.exp ... gdb compile failed, disasm-optim.c: Assembler messages: disasm-optim.c:35: Error: bad register name `%rip)' disasm-optim.c:46: Error: bad register name `%rax)' disasm-optim.c:57: Error: bad register name `%rip)' === gdb Summary === # of untested testcases 1 ... Fix this by requiring is_amd64_regs_target instead of istarget "x86_64-*-linux*". Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-01-12 Tom de Vries <tdevries@suse.de> * gdb.base/disasm-optim.exp: Require is_amd64_regs_target.
2021-01-12elf/x86-64: Adjust R_AMD64_DIR64/R_AMD64_DIR32 for PE/x86-64 inputsH.J. Lu7-0/+84
Subtract the value of the section contents for R_AMD64_DIR64 and R_AMD64_DIR32 relocations when generating ELF output from PE/x86-64 inputs. bfd/ PR ld/27171 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and R_AMD64_DIR32 relocations for PE/x86-64 inputs. ld/ PR ld/27171 * testsuite/ld-x86-64/pe-x86-64-5.obj.bz2: New file. * testsuite/ld-x86-64/pe-x86-64-5.od: Likewise. * testsuite/ld-x86-64/pe-x86-64-5.rd: Likewise. * testsuite/ld-x86-64/pe-x86-64.exp: Run PR ld/27171 test.
2021-01-12Updated translations for some subdirectoriesNick Clifton6-5616/+5976
2021-01-12gdb: fix debug dump of OP_BOOL expressionsAndrew Burgess4-1/+24
Consider this GDB session: (gdb) set language fortran (gdb) set debug expression 1 (gdb) p .TRUE. Dump of expression @ 0x4055d90, before conversion to prefix form: Language fortran, 3 elements, 16 bytes each. Index Opcode Hex Value String Value 0 OP_BOOL 79 O............... 1 BINOP_ADD 1 ................ 2 OP_BOOL 79 O............... Dump of expression @ 0x4055d90, after conversion to prefix form: Expression: `TRUE' Language fortran, 3 elements, 16 bytes each. 0 OP_BOOL Unknown format 1 BINOP_ADD 2 OP_BOOL Unknown format 3 OP_NULL Unknown format $1 = .TRUE. The final dump of the OP_BOOL is completely wrong. After this patch we now get: (gdb) set language fortran (gdb) set debug expression 1 (gdb) p .TRUE. Dump of expression @ 0x2d07470, before conversion to prefix form: Language fortran, 3 elements, 16 bytes each. Index Opcode Hex Value String Value 0 OP_BOOL 79 O............... 1 BINOP_ADD 1 ................ 2 OP_BOOL 79 O............... Dump of expression @ 0x2d07470, after conversion to prefix form: Expression: `TRUE' Language fortran, 3 elements, 16 bytes each. 0 OP_BOOL TRUE $1 = .TRUE. Much better. I added a test for this into the Fortran testsuite. gdb/ChangeLog: * expprint.c (dump_subexp_body_standard): Handle OP_BOOL. gdb/testsuite/ChangeLog: * gdb.fortran/debug-expr.exp: Add new tests.
2021-01-12gdb/fortran: add symbol base comparison operatorsAndrew Burgess4-18/+61
Fortran supports symbol based comparison operators as well as the classic text based comparison operators, so we have: Text | Symbol Operator | Operator ---------|--------- .eq. | == .ne. | /= .le. | <= .ge. | >= .gt. | > .lt. | < This commit adds the symbol based operators as well as some tests. gdb/ChangeLog: * f-exp.y (dot_ops): Rename to... (fortran_operators): ...this. Add a header comment. Add symbol based operators. (yylex): Update to use fortran_operators not dot_ops. Remove special handling for '**', this is now included in fortran_operators. gdb/testsuite/ChangeLog: * gdb.fortran/dot-ops.exp: Add new tests.
2021-01-12sim: or1k: fix mixing of code & decl warningMike Frysinger2-3/+10
Use the correct style of declaring variables at top of scope. This fixes a few compiler warnings in the process.
2021-01-12sim: or1k: clean up stale build entriesMike Frysinger2-11/+8
This logic was migrated to the common code long ago so ports don't need to declare them themselves.
2021-01-12sim: README-HACKING: clean up stale run referencesMike Frysinger2-2/+4
The run.c interface was deleted long ago and everyone moved to nrun.c (which is also the default), so no one needs to declare this anymore.
2021-01-12sim: common: use #error properlyMike Frysinger2-1/+5
2021-01-12sim: or1k: delete redundant SIM_AC_OPTION_INLINE callMike Frysinger3-34/+16
This was merged into the common code a long time ago, so ports shouldn't be calling this themselves.
2021-01-11binuitils: Check if AR is usable for LTO buildH.J. Lu3-0/+14
Check if AR is usable for LTO build with --enable-pgo-build=lto: checking for -plugin option... ar: no operation specified Failed: ar --plugin /usr/gcc-11.0.0-x32/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.so rc no configure: error: AR with --plugin and rc is required for LTO build instead of build failure later. PR binutils/26766 * configure.ac: * configure: Regenerated.
2021-01-11Binutils: Check if AR works with --plugin and rcH.J. Lu14-21/+112
Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. bfd/ PR ld/27173 binutils/ PR ld/27173 * configure: Regenerated. gas/ PR ld/27173 * configure: Regenerated. gprof/ PR ld/27173 * configure: Regenerated. ld/ PR ld/27173 * configure: Regenerated. libctf/ PR ld/27173 * configure: Regenerated. opcodes/ PR ld/27173 * configure: Regenerated.
2021-01-11GCC: Check if AR works with --plugin and rcH.J. Lu9-4/+260
AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. PR ld/27173 * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ PR ld/27173 * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. libiberty/ PR ld/27173 * configure: Regenerated. zlib/ PR ld/27173 * configure: Regenerated.
2021-01-12Automatic date update in version.inGDB Administrator1-1/+1
2021-01-11sim: tests: get common tests working againMike Frysinger4-41/+46
These were written with 32-bit host assumptions baked into it. Simplify the printf formats to use ll length modifier as it's in C11 rather than trying to manually break it up into two, and cleanup some of the casts to stop assuming sizeof(long) is the same as sizeof(int). We also have to add a few more includes for the various funcs used in here. The tests aren't compiled automatically still. We can figure that out later with more work.
2021-01-11gdb: convert aarch64 to new-style debug macrosSimon Marchi4-61/+48
I haven't tried this on an actual aarch64 machine, but I am able to exercise it like this: (gdb) set debug aarch64 (gdb) maintenance selftest aa Running selftest aarch64-analyze-prologue. [aarch64] aarch64_analyze_prologue: prologue analysis gave up addr=0x14 opcode=0xf94013e0 Running selftest aarch64-process-record. Ran 2 unit tests, 0 failed gdb/ChangeLog: * arch/aarch64-insn.h (aarch64_debug_printf): New. * arch/aarch64-insn.c: Use aarch64_debug_printf. * aarch64-tdep.c: Use aarch64_debug_printf. Change-Id: Ifdb40e2816ab8e55a9aabb066d1833d9b5a46094
2021-01-11gdb: convert solib-aix to new-style debug macrosSimon Marchi2-12/+16
This is only compile-tested. gdb/ChangeLog: * solib-aix.c (solib_aix_debug_printf): New, use throughout file. Change-Id: I7ec4baa15ab5b8ad786212b8b9de61c2c447bac1
2021-01-11gdb: change jit_debug to a boolSimon Marchi2-9/+14
gdb/ChangeLog: * jit.c (jit_debug): Change type to bool. (_initialize_jit): Adjust. Change-Id: Ic2b1eec28eafe8ccb2899f38ddc91ba9703cb38e
2021-01-11[gdb/testsuite] Fix gdb.arch/amd64-stap-three-arg-disp.STom de Vries2-3/+8
On SLE-11 I ran into: ... (gdb) print $_probe_arg0^M Cannot access memory at address 0x8000003fe05c^M (gdb) FAIL: gdb.arch/amd64-stap-special-operands.exp: probe: three_arg: \ print $_probe_arg0 ... The memory cannot be accessed because the address used to evaluate $_probe_arg0 at the probe point is incorrect. The address is calculated using this expression: ... .asciz "-4@-4(%rbp,%ebx,0)" ... which uses $ebx, but $ebx is uninitialized at the probe point. The test-case does contain a "movl $0, %ebx" insn to set $ebx to 0, but that insn is placed after the probe point. We could fix this by moving the insn to before the probe point. But, $ebx is also a callee-save register, so normally, if we modify it, we also need to save and restore it, which is currently not done. This is currently not harmful, because we don't run the test-case further than the probe point, but it's bound to cause confusion. So, fix this instead by using $eax instead in the expression, and moving the insn setting $eax to 0 to before the probe point. gdb/testsuite/ChangeLog: 2021-01-11 Tom de Vries <tdevries@suse.de> PR testsuite/26968 * gdb.arch/amd64-stap-three-arg-disp.S: Remove insn modifying $ebx. Move insn setting $eax to before probe point.
2021-01-11aarch64: Remove support for CSREKyrylo Tkachov20-1535/+1457
This patch removes support for the CSRE extension from aarch64 gas/objdump. CSRE (FEAT_CSRE) is part of the Future Architecture Technologies program and at this time Arm is withdrawing this particular feature. The patch removes the system registers and the CSR PDEC instruction. gas/ChangeLog * NEWS: Remove CSRE. * config/tc-aarch64.c (parse_csr_operand): Delete. (parse_operands): Delete handling of AARCH64_OPND_CSRE_CSR. (aarch64_features): Remove csre. * doc/c-aarch64.texi: Remove CSRE. * testsuite/gas/aarch64/csre.d: Delete. * testsuite/gas/aarch64/csre-invalid.s: Likewise. * testsuite/gas/aarch64/csre-invalid.d: Likewise. * testsuite/gas/aarch64/csre_csr.s: Likewise. * testsuite/gas/aarch64/csre_csr.d: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.s: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.l: Likewise. * testsuite/gas/aarch64/csre_csr-invalid.d: Likewise. include/ChangeLog * opcode/aarch64.h (AARCH64_FEATURE_CSRE): Delete. (aarch64_opnd): Delete AARCH64_OPND_CSRE_CSR. opcodes/ChangeLog * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Likewise. * aarch64-opc-2.c: Likewise. * aarch64-opc.c (aarch64_print_operand): Delete handling of AARCH64_OPND_CSRE_CSR. * aarch64-tbl.h (aarch64_feature_csre): Delete. (CSRE): Likewise. (_CSRE_INSN): Likewise. (aarch64_opcode_table): Delete csr.
2021-01-11Add support for more MIPS variants to the linker command line.Matt Jenkins2-1/+11
PR ld/27167 * ldmain.c (get_emulation): Add mipsmips32r3, mips32r5, mips64r3 and mips64r5 to list of known mips targets.
2021-01-11sim: always call SIM_AC_OPTION_WARNINGSMike Frysinger2-1/+7
Now that all ports have opted in to this, we can require it in the core. It guarantees that new ports have them turned on, and defaults to -Werror in the hopes that new ports keep their code clean from the start. We do this as a sep commit to make it clear that there are no changes to existing ports as they've all explicitly called it already.
2021-01-11sim: call SIM_AC_OPTION_WARNINGS(no) in remaining portsMike Frysinger30-20/+1130
We want all ports to opt into extra warnings as the default compiler settings lets a lot slide. Opt all the ports that haven't already in to the warning system. None of them build with -Werror, so disable that by default. Hopefully someone finds these important enough to start fixing at some point.
2021-01-11sim: or1k: fix include ordering with sim-main.hMike Frysinger2-0/+6
Make sure config.h is included before C library headers otherwise the later libiberty.h include gets confused about asprintf state leading to warnings like: common/sim-utils.c:330:9: warning: implicit declaration of function 'vasprintf'; did you mean 'xvasprintf'? [-Wimplicit-function-declaration]
2021-01-11sim: common: fix printf formatsMike Frysinger2-1/+6
For 32-bit targets, %x happens to work for unsigned_word. But for 64-bit targets, it's too small, and gcc throws an error. Use the right printf format define for them.
2021-01-11sim: rl78: move storage out of headerMike Frysinger3-1/+8
This port declares its pc variable in a header and then includes it multiple times. This causes linker errors with newer gcc due to the change in -fno-common behavior. Move the storage to a C file so we only have one instance of it in the final program.
2021-01-11sim: clean up C11 header includesMike Frysinger182-1090/+1097
Since we require C11 now, we can assume many headers exist, and clean up all of the conditional includes. It's not like any of this code actually accounted for the headers not existing, just whether we could include them. The strings.h cleanup is a little nuanced: it isn't in C11, but every use of it in the codebase will include strings.h only if string.h doesn't exist. Since we now assume the C11 string.h exists, we'll never include strings.h, so we can delete it.
2021-01-11Updated translations for multiple subdirectoriesNick Clifton23-19527/+21623
2021-01-11Automatic date update in version.inGDB Administrator1-1/+1
2021-01-10Automatic date update in version.inGDB Administrator1-1/+1
2021-01-09Avoid crash in compile_to_objectTom Tromey2-1/+9
PR 23672 points out a crash in compile_to_object. This crash came in during a C++-ization. This patch avoids the crash. The PR also points out another weird behavior in this code, but that one requires some setup that I don't have here, and it seems to date back to the introduction of the compile feature. So, it isn't addressed here. I will leave the PR open so this bug isn't forgotten. gdb/ChangeLog 2021-01-09 Tom Tromey <tom@tromey.com> PR compile/23672 * compile/compile.c (compile_to_object): Avoid crash when osabi_triplet_regexp returns NULL.
2021-01-09Remove a use of print_expressionTom Tromey3-10/+16
The tracepoint code uses print_expression to reconstruct an expression string. However, the original expression is already available -- it was just parsed a bit earlier in the same function. This patch changes this code to simply save the already-parsed expression, rather than attempt to reconstruct it. gdb/ChangeLog 2021-01-09 Tom Tromey <tom@tromey.com> * tracepoint.h (class collection_list) <append_exp>: Take a std::string. * tracepoint.c (collection_list::append_exp): Take a std::string. (encode_actions_1): Update.
2021-01-09Fix erroneous agent expression testTom Tromey2-1/+5
Testing of the expression rewrite revealed a buglet in ax.exp. One test does: gdb_test "maint agent (unsigned char)1L" ".*ext 8.*" However, zero extension is not actually needed in this case -- a simple "const8 1" is also correct here. This patch changes the test to look for a push of any width of the constant 1. gdb/testsuite/ChangeLog 2021-01-09 Tom Tromey <tom@tromey.com> * gdb.trace/ax.exp: Do not require an "ext".
2021-01-09Support the PGO build for binutils+gdbH.J. Lu5-6/+302
Add the --enable-pgo-build[=lto] configure option. When binutils+gdb is not built together with GCC, --enable-pgo-build enables the PGO build: 1. First build with -fprofile-generate. 2. Use "make maybe-check-*" to generate profiling data and pass -i to make to ignore errors when generating profiling data. 3. Use "make clean" to remove the previous build. 4. Rebuild with -fprofile-use. With --enable-pgo-build=lto, -flto=jobserver -ffat-lto-objects are used together with -fprofile-generate and -fprofile-use. Add '+' to the command line for recursive make to support -flto=jobserver -ffat-lto-objects. NB: --enable-pgo-build=lto enables the PGO build with LTO while --enable-lto enables LTO support in toolchain. PR binutils/26766 * Makefile.tpl (BUILD_CFLAGS): New. (CFLAGS): Append $(BUILD_CFLAGS). (CXXFLAGS): Likewise. (PGO_BUILD_GEN_FLAGS_TO_PASS): New. (PGO_BUILD_TRAINING_CFLAGS): Likewise. (PGO_BUILD_TRAINING_CXXFLAGS): Likewise. (PGO_BUILD_TRAINING_FLAGS_TO_PASS): Likewise. (PGO_BUILD_TRAINING_MFLAGS): Likewise. (PGO_BUILD_USE_FLAGS_TO_PASS): Likewise. (PGO-TRAINING-TARGETS): Likewise. (PGO_BUILD_TRAINING): Likewise. (all): Add '+' to the command line for recursive make. Support the PGO build. * configure.ac: Add --enable-pgo-build[=lto]. AC_SUBST PGO_BUILD_GEN_CFLAGS, PGO_BUILD_USE_CFLAGS and PGO_BUILD_LTO_CFLAGS. Enable the PGO build in Makefile. * Makefile.in: Regenerated. * configure: Likewise.
2021-01-09Binutils: Pass --plugin to AR and RANLIBH.J. Lu14-14/+203
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. libctf/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2021-01-09GCC: Pass --plugin to AR and RANLIBH.J. Lu15-9/+219
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. config/ * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. libiberty/ * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * aclocal.m4: Include ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * configure: Regenerated. zlib/ * configure: Regenerated.
2021-01-09sim: replace rindex with strrchrMike Frysinger2-2/+6
2021-01-09sim: cr16/d10v: move storage out of headerMike Frysinger6-2/+20
These ports declare their State variable in a header and then include multiple times. This causes linker errors with newer gcc due to the change in -fno-common behavior. Move the storage to a C file so we only have one instance of it in the final program.
2021-01-09sim: common: clean up asprintf includes a bitMike Frysinger4-5/+7
Delete stale prototypes that libiberty.h already provides, and add missing libiberty.h includes to files that use those functions.
2021-01-09sim: sh64: delete portMike Frysinger430-73941/+13
Support for sh64 was dropped from bfd et al in 2018. Without that, the sim port is useless. So clean up this code too.
2021-01-09sim: clean up stale AC_PREREQ refsMike Frysinger61-458/+198
This was purged from the tree when we upgraded to autoconf-2.69, but a few references in the sim tree were missed.
2021-01-09sim: enable -Werror by default for some archesMike Frysinger53-116/+140
We've had this off for a long time because the sim code was way too full of warnings for it to be feasible. However, I've cleaned things up significantly from when this was first merged, and we can start to turn this around. Change the macro to enable -Werror by default, and allow ports to opt out. New ports will get it automatically (and we can push back on them if they try to turn it off). Also turn it off for the few ports that still hit warnings for me. All the rest will get the new default, and we'll wait for feedback if/when new issues come up.
2021-01-09ld/x86-64: Properly Handle -z lam-u48/lam-u57H.J. Lu6-2/+55
Properly merge GNU properties for LAM_U48 and LAM_U57. bfd/ PR ld/27166 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle -z lam-u48 and -z lam-u57. ld/ PR ld/27166 * testsuite/ld-x86-64/lam-u48.rd: New file. * testsuite/ld-x86-64/lam-u57.rd: Likewise. * testsuite/ld-x86-64/x86-64.exp: Add PR ld/27166 tests.
2021-01-09sim: pru: fix include ordering with sim-main.hMike Frysinger2-0/+6
Make sure config.h is included before C library headers otherwise the later libiberty.h include gets confused about asprintf state leading to warnings like: common/sim-utils.c:330:9: warning: implicit declaration of function 'vasprintf'; did you mean 'xvasprintf'? [-Wimplicit-function-declaration]
2021-01-09sim: hw: rework code to avoid gcc warningsMike Frysinger2-7/+8
Newer gcc thinks we might return a pointer to a stack buffer, but we don't -- we strdup it before returning. Rework the code to just malloc the buffer from the start and avoid the stack+strdup.
2021-01-09Update release howto with 2.37 numbersNick Clifton1-17/+20
2021-01-09Change version number to 2.36.50 and regenerate filesNick Clifton19-5304/+5649
2021-01-09Add Changelog entries and NEWS entries for 2.36 branchNick Clifton18-1/+61
2021-01-09sim: common: add missing stdlib.h for abort()Mike Frysinger5-0/+9
2021-01-08ld/x86-64: Also set LAM_U57 when setting LAM_U48H.J. Lu5-4/+16
Since LAM_U48 implies LAM_U57, also set LAM_U57 when setting LAM_U48. bfd/ * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set LAM_U57 when setting LAM_U48. ld/ * ld-x86-64/property-x86-lam-u48-4.d: Updated. * ld-x86-64/property-x86-lam-u48-5.d: Likewise.