aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-07PR30828, notes obstack memory corruptionAlan Modra1-2/+6
Commit 3bab069c29b3 carelessly allowed "string" to be released from the notes obstack twice, with the second call to obstack_free releasing memory for a fixup that just happened to be the same size as the original string. The fixup then of course was overwritten. This patch fixes that problem, and another that could occur on an error path. PR 30828 * stabs.c (s_stab_generic): Don't free string twice. Don't blow away entire notes obstack on a missing string.
2023-09-06[gdb/testsuite] Fix gdb.ada/same_enum.expTom de Vries2-2/+4
Test-case gdb.ada/same_enum.exp is supposed to be a regression test for this bit of code in remove_extra_symbols: ... if (symbols_are_identical_enums (syms)) syms.resize (1); ... The test-case does "print red" and expects one of these two choices to be picked by remove_extra_symbols: ... type Color is (Black, Red, Green, Blue, White); type RGB_Color is new Color range Red .. Blue; ... but because only the type Color is used: ... FC : Color := Red; SC : Color := Green; ... the RGB_Color type is eliminated from the debug info, and consequently remove_extra_symbols has no effect for the test-case. In other words, we have: ... (gdb) ptype Color ^M type = (black, red, green, blue, white)^M (gdb) ptype RGB_Color^M No definition of "rgb_color" in current context.^M ... Fix this by changing the type of SC to RGB_Color, and add prints of the two types to check that they're both available. With the test-case fixed, if we disable the bit of code in remove_extra_symbols we get: ... (gdb) print red^M Multiple matches for red^M [0] cancel^M [1] pck.color'(pck.red) (enumeral)^M [2] pck.rgb_colorB'(pck.red) (enumeral)^M > FAIL: gdb.ada/same_enum.exp: print red (timeout) ... in other words, the test-case now properly functions as a regression test. Tested on x86_64-linux.
2023-09-06[gdb/symtab] Fix too many symbols in gdbpy_lookup_static_symbolsTom de Vries1-2/+5
When running test-case gdb.python/py-symbol.exp with target board cc-with-dwz-m, we run into: ... (gdb) python print (len (gdb.lookup_static_symbols ('rr')))^M 4^M (gdb) FAIL: gdb.python/py-symbol.exp: \ print (len (gdb.lookup_static_symbols ('rr'))) ... while with target board unix we have instead: ... (gdb) python print (len (gdb.lookup_static_symbols ('rr')))^M 2^M (gdb) PASS: gdb.python/py-symbol.exp: \ print (len (gdb.lookup_static_symbols ('rr'))) ... The problem is that the loop in gdbpy_lookup_static_symbols loops over compunits representing both CUs and PUs: ... for (compunit_symtab *cust : objfile->compunits ()) ... When doing a lookup on a PU, the user link is followed until we end up at a CU, and the lookup is done in that CU. In other words, when doing a lookup in the loop for a PU we duplicate the lookup for a CU that is already handled by the loop. Fix this by skipping PUs in the loop in gdb.lookup_static_symbols. Tested on x86_64-linux. PR symtab/25261 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25261
2023-09-06[gdb/symtab] Handle PU in iterate_over_some_symtabsTom de Vries1-0/+4
When running test-case gdb.base/setshow.exp with target board cc-with-dwz I run into: ... (gdb) info line 1^M Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code.^M Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code.^M (gdb) FAIL: gdb.base/setshow.exp: test_setshow_annotate: annotation_level 1 ... while the expected output is: ... Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code. ��setshow.c:1:0:beg:0x400527 ... The second line of the expected output is missing due to the first line of the expected output being repeated, so the problem is that the "Line 1" line is printed twice. This happens because the PU imported by the CU reuses the filetab of the CU, and both the CU and PU are visited by iterate_over_some_symtabs. Fix this by skipping PUs in iterate_over_some_symtabs. Tested on x86_64-linux, target boards unix, cc-with-dwz and cc-with-dwz-m. Approved-By: Tom Tromey <tom@tromey.com> PR symtab/30797 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30797
2023-09-06src-release.sh (SIM_SUPPORT_DIRS): Add libsframe, libctf/swap.h and gnulibHans-Peter Nilsson1-1/+1
Without this, a simulator build breaks when building from a tarball made by "./src-release.sh -b sim", when building e.g. bfd and libsframe. See also previous similar commits for GDB_SUPPORT_DIRS. The libctf library does not needed to be built, but building libsframe requires libctf/swap.h, with no dependencies on built or configured contents. Do as for the single gdb files and include explicitly only that file.
2023-09-06Automatic date update in version.inGDB Administrator1-1/+1
2023-09-05Fix 30808 gprofng tests failedVladimir Mezentsev2-11/+14
In gprofng testing, we need a tempory gprofng installation to resolve run-time dependencies on libraries (libgprofng, libopcodes, libbfd, etc). We set LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR to find our libraries and configuration file. These variables must be set for all gprofng tests. Tested on aarch64 and x86_64 with and without --enable-shared and --target=<>. gprofng/ChangeLog 2023-08-31 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/30808 * testsuite/config/default.exp: Make a temporary install dir. Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR. * testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.
2023-09-05gdb/testsuite: Make hook-stop.exp ignore termination message from GDB stubSandra Loosemore1-1/+1
When a GDB stub is run via "target remote |", it sometimes produces extra output that ends up mixed with GDB's own output. For example, QEMU's built-in GDB stub responds to the vKill packet by printing nios2-elf-qemu-system: QEMU: Terminated via GDBstub before exiting. This patch fixes the regexp in gdb.base/hook-stop.exp to allow such messages between GDB's "continuing" and "Inferior killed" messages. Reviewed-By: Tom Tromey <tom@tromey.com> Approved-By: Tom Tromey <tom@tromey.com>
2023-09-05gdb/testsuite: Disable some tests that are broken on remote Windows hostSandra Loosemore3-0/+9
These testcases assume host==build or that the remote host has a Posix shell to run commands in. Don't try to run them if that's not the case. Reviewed-By: Tom Tromey <tom@tromey.com> Approved-By: Tom Tromey <tom@tromey.com>
2023-09-05gdb/testsuite: Adjust some testcases to allow Windows pathnamesSandra Loosemore4-21/+32
This patch fixes some testcases that formerly had patterns with hardwired "/" pathname separators in them, which broke when testing on (remote) Windows host. Reviewed-By: Tom Tromey <tom@tromey.com> Approved-By: Tom Tromey <tom@tromey.com>
2023-09-05gdb/testsuite: Fix style.exp failures on targets without argc/argv supportSandra Loosemore1-5/+18
Some embedded targets don't have full support for argc/argv. argv may print as "0x0" or as an address with a symbol name following. This causes problems for the regexps in the style.exp line-wrapping tests that assume it always prints as an ordinary address in backtrace output. This patch generalizes the regexps to handle these additional forms and reworks some of the line-wrapping tests to account for the argv address string being shorter or longer than a regular address. Reviewed-By: Tom Tromey <tom@tromey.com> Approved-By: Tom Tromey <tom@tromey.com>
2023-09-05Handle array- and string-like values in no-op pretty printersTom Tromey8-3/+412
This changes the no-op pretty printers -- used by DAP -- to handle array- and string-like objects known by the gdb core. Two new tests are added, one for Ada and one for Rust.
2023-09-05Add new Python APIs to support DAP value displayTom Tromey4-0/+126
gdb's language code may know how to display values specially. For example, the Rust code understands that &str is a string-like type, or Ada knows how to handle unconstrained arrays. This knowledge is exposed via val-print, and via varobj -- but currently not via DAP. This patch adds some support code to let DAP also handle these cases, though in a somewhat more generic way. Type.is_array_like and Value.to_array are added to make Python aware of the cases where gdb knows that a structure type is really "array-like". Type.is_string_like is added to make Python aware of cases where gdb's language code knows that a type is string-like. Unlike Value.string, these cases are handled by the type's language, rather than the current language. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
2023-09-05Select frame when fetching a frame variable in DAPTom Tromey2-3/+12
Right now, if a program uses multiple languages, DAP value formatting will always use the language of the innermost frame. However, it is better to use the variable's defining frame instead. This patch does this by selecting the frame first. This also fixes a possibly latent bug in the "stepOut" command -- "finish" is sensitive to the selected frame, but the DAP code may already select other frames when convenient. The DAP stepOut request only works on the newest frame, so be sure to select it before invoking "finish".
2023-09-05Introduce type::is_array_like and value_to_arrayTom Tromey4-0/+46
This adds the type::is_array_like method and the value_to_array function. The former can be used to see whether a given type is known to be "array-like". This is the currently the case for certain compiler-generated structure types; in particular both the Ada and Rust compilers do this.
2023-09-05Use ada_value_subscript in valpy_getitemTom Tromey2-0/+4
Ada has a few complexities when it comes to array handling. Currently these are all handled in Ada-specific code -- but unfortunately that means they aren't really accessible to Python. This patch changes the Python code to defer to Ada when given an Ada array. In order to make this work, one spot in ada-lang.c had to be updated to set the "GNAT-specific" flag on an array type. The test case for this will come in a later patch.
2023-09-05Introduce TYPE_SPECIFIC_RUST_STUFFTom Tromey3-2/+25
This adds a new enum constant, TYPE_SPECIFIC_RUST_STUFF, and changes the DWARF reader to set this on Rust types. This will be used as a flag in a later patch. Note that the size of the type_specific_field bitfield had to be increased. I checked that this did not impact the size of main_type.
2023-09-05Refactor Rust code for slice-to-array operationTom Tromey2-9/+35
This patch exposes rust_slice_type_p and introduces rust_slice_to_array, in preparation for subsequent patches that will need these.
2023-09-05Move rust_language::lookup_symbol_nonlocalTom Tromey2-31/+38
This moves rust_language::lookup_symbol_nonlocal to rust-lang.c. There's no need to have it in rust-lang.h and moving it lets us avoid adding new includes in a later patch.
2023-09-05gdb/riscv: Fix oob memory access when printing info registersCiaran Woodward1-1/+1
If the length of a register name was greater than 15, print_spaces was called with a negative number, which prints random data from the heap instead of the requested number of spaces. This could happen if a target-description file was used to specify additional long-named registers. Fix is simple - don't ask for fewer than 1 space (since we still want column separation). Approved-by: Kevin Buettner <kevinb@redhat.com>
2023-09-05Read Ada main name from executable, not inferiorTom Tromey6-3/+132
An upstream bug report points out this bug: if the user switches from one Ada executable to another without "kill"ing the inferior, then the "start" command will fail. What happens here is that the Ada "main" name is found in a constant string in the executable. But, if the inferior is running, then the process_stratum target reads from the inferior memory. This patch fixes the problem by changing the main name code to set trust-readonly-sections, causing the target stack to read from the executable instead. I looked briefly at changing GNAT to emit DW_AT_main_subprogram instead, but this looks to be pretty involved. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25811
2023-09-05Avoid crash with Ada and -fdata-sectionsTom Tromey3-1/+55
A user noticed that gdb would crash when showing a backtrace. Investigation showed this to be a crash in the DWARF reader when handling a "pragma export" symbol. The bug here is that earlier code decides to eliminate the symbol, but the export code tries to add it anyway -- but to a NULL list.
2023-09-05readelf: Add option to display the names of sections referenced by symbols.Nick Clifton4-195/+366
PR 30684 * readelf.c (extra_sym_info): New variable. (section_name_valid): Also check for filedata being NULL. (section_name_print): Delete. (section_index_real): New function. Returns true if the given section index references a real section. (print_symbol): Rename to print_sumbol_name. (printable_section_name): Use a rotating array of static buffers for the return string. (printable_section_name_from_index): Merge code from dump_relocations and get_symbol_index_type into here. (long_option_values): Add OPTION_NO_EXTRA_SYM_INFO. (options): Add "extra-sym-info" and "no-extra-sym-info". (usage): Mention new options. (parse_args): Parse new options. (get_symbol_index_type): Delete. (print_dynamic_symbol_size): Rename to print_symbol_size. (print_dynamic_symbol): Rename to print_symbol. (print_symbol_table_heading): New function. (process_symbol_table): Use new function. * doc/binutils.texi: Document the new option. * NEWS: Mention the new feature.
2023-09-05RISC-V: fold duplicate code in vector_macro()Jan Beulich3-43/+7
There's no need to have almost identical code twice. Do away with M_VMSGEU and instead simply use an unused (for these macros) field to tell apart both variants.
2023-09-05RISC-V: Add stub support for the 'Svadu' extensionTsukasa OI1-0/+2
This commit implements support for 'Svadu' extension. Because it does not add any instructions or CSRs (but adds bits to existing CSRs), this commit only adds extension name support and implication to the 'Zicsr' extension. This is based on the "Hardware Updating of PTE A/D Bits (Svadu)" specification, version 1.0-rc1 (Frozen): <https://github.com/riscv/riscv-svadu/releases/tag/v1.0-rc1> bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add implication from 'Svadu' to 'Zicsr'. (riscv_supported_std_s_ext) Add 'Svadu'.
2023-09-05RISC-V: Fix typo in the testsuiteTsukasa OI1-1/+1
gas/ChangeLog: * testsuite/gas/riscv/csr.s: Fix typo. mhcounteren is superseded by minstretcfg, not mcyclecfg.
2023-09-05RISC-V: Add 'Smcntrpmf' extension and its CSRsTsukasa OI14-50/+228
This commit adds now stable and approved 'Smcntrpmf' extension defined by the RISC-V Cycle and Instret Privilege Mode Filtering specification. Note that, because mcyclecfg and minstretcfg CSRs conflict with the privileged specification version 1.9.1, CSRs for this extension are only enabled on the privileged specification version 1.10 or later. By checking the base privileged specification, we no longer need to change the design of base CSR handling. This is based on the specification version v1.0_rc1 (Frozen): <https://github.com/riscv/riscv-smcntrpmf/commit/32b752c40d59c1b5e95de83399c1f54be6669163> bfd/ChangeLog: * elfxx-riscv.c (riscv_implicit_subsets): Add implication rule from the new 'Smcntrpmf' extension. (riscv_supported_std_s_ext): Add 'Smcntrpmf' to the supported S extension list. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): Add new CSR classes CSR_CLASS_SMCNTRPMF and CSR_CLASS_SMCNTRPMF_32. (riscv_csr_address): Add handling for new CSR classes. * testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs. Move "mscounteren" and "mhcounteren" CSRs and note that they are now aliases. * testsuite/gas/riscv/csr-dw-regnums.d: Reflect the change. * testsuite/gas/riscv/csr.s: Add new CSRs. Move "mscounteren" and "mhcounteren" CSRs and note that they are now reused for the 'Smcntrpmf' extension. * testsuite/gas/riscv/csr-version-1p9p1.d: Reflect the changes of csr.s. * testsuite/gas/riscv/csr-version-1p9p1.l: Likewise. * testsuite/gas/riscv/csr-version-1p10.d: Likewise. * testsuite/gas/riscv/csr-version-1p10.l: Likewise. * testsuite/gas/riscv/csr-version-1p11.d: Likewise. * testsuite/gas/riscv/csr-version-1p11.l: Likewise. * testsuite/gas/riscv/csr-version-1p12.d: Likewise. * testsuite/gas/riscv/csr-version-1p12.l: Likewise. include/ChangeLog: * opcode/riscv-opc.h: Add new CSRs noting that this extension is incompatible with the privileged specification version 1.9.1. Move "mscounteren" and "mhcounteren" CSRs, make them aliases and reuse the CSR numbers from the 'Smcntrpmf' extension. (CSR_MSCOUNTEREN, CSR_MHCOUNTEREN) Remove as "mscounteren" and "mhcounteren" are now aliases and new CSR macros are used instead. (CSR_MCYCLECFG, CSR_MINSTRETCFG, CSR_MCYCLECFGH, CSR_MINSTRETCFGH): New CSR macros.
2023-09-05RISC-V: Prohibit combination of 'E' and 'H'Tsukasa OI3-0/+12
According to the ratified privileged specification (version 20211203), it says: > The hypervisor extension depends on an "I" base integer ISA with 32 x > registers (RV32I or RV64I), not RV32E, which has only 16 x registers. Also in the latest draft, it also prohibits RV64E with the 'H' extension. This commit prohibits the combination of 'E' and 'H' extensions. bfd/ChangeLog: * elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit 'E' and 'H' combinations. gas/ChangeLog: * testsuite/gas/riscv/march-fail-rv32eh.d: New failure test to make sure that RV32E + 'H' is prohibited. * testsuite/gas/riscv/march-fail-rv32eh.l: Likewise.
2023-09-05Automatic date update in version.inGDB Administrator1-1/+1
2023-09-04arm: Make 'conflicting CPU architectures' error message more user-friendlyChristophe Lyon3-6/+7
Error messages such as "conflicting CPU architectures 10/16" are not very to understand, so this patch replaces the numbers with the description they actually mean: "conflicting CPU architectures ARM v7E-M vs Pre v4" 2023-09-01 Christophe Lyon <christophe.lyon@linaro.org> bfd/ * elf32-arm.c (tag_cpu_arch_combine): Add name_table parameter and use it. (elf32_arm_merge_eabi_attributes): Update call to tag_cpu_arch_combine. ld/ * testsuite/ld-arm/attr-merge-9.out: Update expected error message. * testsuite/ld-arm/attr-merge-arch-2.d: Likewise.
2023-09-04[gdb/testsuite] Fix race in gdb.base/add-symbol-file-attach.expTom de Vries1-2/+2
When running test-case gdb.base/add-symbol-file-attach.exp with target board unix/-m32, we run into: ... (gdb) attach 3955^M Attaching to process 3955^M Load new symbol table from "add-symbol-file-attach"? (y or n) y^M Reading symbols from add-symbol-file-attach/add-symbol-file-attach...^M Reading symbols from /lib/libm.so.6...^M Reading symbols from /usr/lib/debug/lib/libm-2.31.so-i386.debug...^M Reading symbols from /lib/libc.so.6...^M Reading symbols from /usr/lib/debug/lib/libc-2.31.so-i386.debug...^M Reading symbols from /lib/ld-linux.so.2...^M Reading symbols from /usr/lib/debug/lib/ld-2.31.so-i386.debug...^M 0xf7f53549 in __kernel_vsyscall ()^M (gdb) FAIL: gdb.base/add-symbol-file-attach.exp: attach ... The test fails because this regexp is used: ... -re ".*in \[_A-Za-z0-9\]*pause.*$gdb_prompt $" { ... The regexp attempts to detect that the exec is somewhere in pause (): ... int main (int argc, char **argv) { pause (); return 0; } ... but when the exec is blocked in pause, the backtrace is: ... (gdb) bt #0 0xf7fd2549 in __kernel_vsyscall () #1 0xf7d84966 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:29 #2 0x0804844c in main (argc=1, argv=0xffffce84) at /data/vries/gdb/src/gdb/testsuite/gdb.base/add-symbol-file-attach.c:26 ... We could simply extend the regexp to also match __kernel_vsyscall, but the more fundamental problem is that the test is racy. The attach can happen before the exec is blocked in pause (), somewhere in the dynamic linker resolving the call to pause, in main or even earlier. Note that for the test-case to be effective, the exec is not required to be in pause (). I added a "while (1);" loop at the start of main, reverted the patch fixing the corresponding PR and reproduced the problem it's supposed to detect. Fix this by simply matching the "Reading symbols from" line, similar to what an earlier test is doing. While we're at it, rewrite the earlier test to also use the -wrap idiom. Tested on x86_64-linux.
2023-09-04Automatic date update in version.inGDB Administrator1-1/+1
2023-09-03Automatic date update in version.inGDB Administrator1-1/+1
2023-09-01gdbserver: i387_cache_to_xsave: fix copy dest of zmm registersSimon Marchi1-2/+2
On a machine with AVX512 support (AMD EPYC 9634), I see these failures: $ make check TESTS="gdb.arch/i386-avx512.exp" RUNTESTFLAGS="--target_board=native-gdbserver" ... FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[16] after writing ZMM regs FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[17] after writing ZMM regs FAIL: gdb.arch/i386-avx512.exp: check contents of zmm_data[18] after writing ZMM regs ... The problem can be reduced to: (gdb) print $zmm16.v8_int64 $1 = {0, 0, 0, 0, 0, 0, 0, 0} (gdb) print $zmm16.v8_int64 = {11,22,33,44,55,66,77,88} $2 = {11, 22, 33, 44, 55, 66, 77, 88} (gdb) print $zmm16.v8_int64 $3 = {11, 22, 33, 44, 55, 66, 77, 88} (gdb) step 5 ++x; (gdb) print $zmm16.v8_int64 $4 = {11, 22, 77, 88, 0, 0, 0, 0} Writing to the local regcache in GDB works fine, but the writeback to gdbserver (which happens when resuming / stepping) doesn't work (the code being stepped doesn't touch AVX registers, so we don't expect the value of zmm16 to change when stepping). The problem is on the gdbserver side, the zmmh and ymmh portions of the zmm register are not memcpied at the right place in the xsave buffer. Fix that. Note now how the two modified memcpy calls match the memcmp calls just above them. With this patch, gdb.arch/i386-avx512.exp passes completely for me. Change-Id: I22c417e0f5e88d4bc635a0f08f8817a031c76433 Reviewed-by: John Baldwin <jhb@FreeBSD.org> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30818
2023-09-02Automatic date update in version.inGDB Administrator1-1/+1
2023-09-01config: Fix host -rdynamic detection for build != host != targetJoseph Myers1-1/+1
[Merge from GCC commit 4d9bc81a5d8d884dee7a7781fa4c1577a6c9681a.] The GCC_ENABLE_PLUGINS configure logic for detecting whether -rdynamic is necessary and supported uses an appropriate objdump for $host binaries (running on $build) in cases where $host is $build or $target. However, it is missing such logic in the case where $host is neither $build nor $target, resulting in the compilers not being linked with -rdynamic and plugins not being usable with such a compiler. In fact $ac_cv_prog_OBJDUMP, as used when $build = $host, is always an objdump for $host binaries that runs on $build; that is, it's appropriate to use in this case as well. Tested in such a configuration that it does result in cc1 being linked with -rdynamic as expected. Also bootstrapped with no regressions for x86_64-pc-linux-gnu. config/ * gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Use export_sym_check="$ac_cv_prog_OBJDUMP -T" also when host is not build or target.
2023-09-01Fix "usage" errors for some MI varobj commandsTom Tromey1-3/+3
I noticed that the "usage" error for -var-set-frozen mentioned the wrong command name. Then I looked through the whole file and found a couple other spots that didn't mention the command name at all. This patch fixes all of these. Reviewed-by: Kevin Buettner <kevinb@redhat.com>
2023-09-01x86: unindent most of set_cpu_arch()Jan Beulich1-151/+154
Inverting the initial if()'s condition allows to move out the bulk of the function by a level, improving readability at least a bit. While doing that also pull the push/pop handling up first, such that "else if" after "return" isn't needed anymore; the order in which special cases are checked doesn't really matter.
2023-09-01x86: rename CpuPCLMULJan Beulich5-25/+25
The name we use internally isn't in line with the SDM, and also isn't in line with CpuVPCLMULQDQ. Add the missing suffix, but of course leave alone user facing names.
2023-09-01x86: correct source used for two non-AVX512 VEXWIG testsJan Beulich2-130/+32
These shouldn't wrongly include the AVX512VL sources. Obviously the expectations therefore also need to change.
2023-09-01x86: drop Size64 from VMOVQJan Beulich2-2/+2
Commit 916fae91358d ("Add Size64 to movq/vmovq with Reg64 operand" was right in adding the attribute to MOVQ, but there was no need to add it to VMOVQ. (See also the AVX512F form, which doesn't have the attribute either.)
2023-09-01RISC-V: move various alias entriesJan Beulich32-365/+218
For disassembly to only use spec-mandated aliases, respective non-alias entries need to come ahead of their alias ones. Since identical mnemonics need to stay together, whole groups are moved up where necessary. This partly reverts 839189bc932e ("RISC-V: re-arrange opcode table for consistent alias handling"), but then also goes beyond a plain revert. Reviewed-by: Tsukasa OI <research_trasio@irq.a4lg.com> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-09-01Fix ld Makefile variable naming: ELF_CLFAGS -> ELF_CFLAGSJerry Zhang Jian2-4/+4
Signed-off-by: Jerry Zhang Jian <jerry.zhangjian@sifive.com>
2023-09-01RISC-V: Fixed the wrong expansion for pseudo vmsge[u].vx instructions.Nelson Chu2-8/+8
The original report was from Kiva Oyama <libkernelpanic@gmail.com>, https://sourceware.org/pipermail/binutils/2023-August/129255.html The vmsge[u].vx pseudo should be expanded to masked vmslt[u].vx only when vd != v0. Otherwise, it should be expanded to unmasked one. gas/ * config/tc-riscv.c (vector_macro): Fixed the wrong expansion for pseudo vmsge[u].vx instructions. * testsuite/gas/riscv/vector-insns-vmsgtvx.d: Updated.
2023-08-31gdb: remove uses of alloca in gdbtypes.cSimon Marchi1-13/+12
Replace two uses of alloca with std::string. Change-Id: I970ae3f450da407494d95668a57bba8796d6292b Approved-by: Kevin Buettner <kevinb@redhat.com>
2023-09-01Automatic date update in version.inGDB Administrator1-1/+1
2023-09-01PR30806, CPPFLAGS are missing for bfd/chew, syslex_wrap and sysinfoNicolas Boulenguez4-8/+8
PR 30806 bfd/ * doc/local.mk (doc/chew.stamp): Add CPPFLAGS_FOR_BUILD. * Makefile.in: Regenerate. binutils/ * Makefile.am (syslex_wrap.@OBJEXT@): Add CPPFLAGS_FOR_BUILD. (sysinfo.@OBJEXT@): Likewise. * Makefile.in: Regenerate.
2023-08-31elf: Adjust PR ld/30791 testsH.J. Lu2-0/+7
Adjust PR ld/30791 tests: 1. Generic linker targets don't comply with all orhpan section merging rules. 2. z80 fails since a, b, c, d are registers for z80. 3. hppa fails since .text sections aren't merged for relocatable link. PR ld/30791 * testsuite/ld-elf/pr30791a.d: Xfail for generic and z80 targets. * testsuite/ld-elf/pr30791b.d: Xfail for hppa and z80 targets.
2023-08-31Add symbol::matches methodTom Tromey5-19/+21
This adds symbol::matches, a wrapper for symbol_matches_domain. Most places calling symbol_matches_domain can call this method instead, which is a bit less wordy and also (IMO) clearer. Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-08-31gdb: remove TYPE_FIELD_PACKEDSimon Marchi11-13/+16
Replace with a new equivalent "is_packed" method on struct field. Change-Id: I78647be3d408b40b63becb6b6f0fca211bede51c Approved-By: Tom Tromey <tom@tromey.com>