Commit Graph

119051 Commits

Author SHA1 Message Date
GDB Administrator
5a44fd84de Automatic date update in version.in 2024-05-29 00:00:15 +00:00
Dimitar Dimitrov
a606ff9b09 ld: pru: Increase the default memory region sizes
The default memory region sizes for PRU were set somewhat arbitrarily to
the sizes of the most popular BeagleBone board with AM33x SoC.  But the
PRU toolchain documentation has always instructed to use SoC-specific
spec files to override the defaults and set the correct memory sizes [1].

The small default memory sizes can cause IMEM memory region overflow
even for simple printf("Hello world") programs, as usually done by
Autotools checks.  The stdio is simply too big to fit in 8K
instruction memory.  This can confuse the check and lead to wrong
feature selection during configure [2].

Fix by bumping the default DMEM and IMEM memory sizes.

There is no need to backport this patch.  Issue was caught with a
feature-rich newlib build used for daily CI.  The release builds of the
PRU toolchain use stripped newlib configuration, which does not overflow
the IMEM region, even for 8K.

[1] https://github.com/dinuxbg/gnuprumcu
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115158

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2024-05-28 21:05:54 +03:00
Tom Tromey
f95ecfc6e0 Make tui_win_info::make_window non-virtual
Nothing overrides tui_win_info::make_window, so remove the "virtual".
Tested by rebuilding.
2024-05-28 11:52:19 -06:00
saurabh.jha@arm.com
444c60fe33 gas, aarch64: Add SVE2 lut extension
Introduces instructions for the SVE2 lut extension for AArch64. They are documented in the following links:
* luti2: https://developer.arm.com/documentation/ddi0602/2024-03/SVE-Instructions/LUTI2--Lookup-table-read-with-2-bit-indices-?lang=en
* luti4: https://developer.arm.com/documentation/ddi0602/2024-03/SVE-Instructions/LUTI4--Lookup-table-read-with-4-bit-indices-?lang=en

These instructions use new SVE2 vector operands. They are called
SVE_Zm1_23_INDEX, SVE_Zm2_22_INDEX, and Zm3_12_INDEX and they have
1 bit, 2 bit, and 3 bit indices respectively.

The lsb and width of these new operands are the same as many existing
operands but the convention is to give different names to fields that
serve different purpose so we introduced new fields in aarch64-opc.c
and aarch64-opc.h.

We made a design choice for the second operand of the halfword variant of
luti4 with two register tables. We could have either defined a new operand,
like SVE_Znx2, or we could have use the existing operand SVE_ZnxN. With
the new operand, we would need to implement constraints on register
lists based on either operand or opcode flag. With existing operand, we
could just existing constraint checks using opcode flag. We chose
the second approach and went with SVE_ZnxN and added opcode flag to
enforce lengths of vector register list operands. This way, we can reuse
the existing constraint check logic.
2024-05-28 17:28:29 +01:00
saurabh.jha@arm.com
c3bb4211d9 gas, aarch64: Add AdvSIMD lut extension
Introduces instructions for the Advanced SIMD lut extension for AArch64. They are documented in the following links:
* luti2: https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/LUTI2--Lookup-table-read-with-2-bit-indices-?lang=en
* luti4: https://developer.arm.com/documentation/ddi0602/2024-03/SIMD-FP-Instructions/LUTI4--Lookup-table-read-with-4-bit-indices-?lang=en

These instructions needed definition of some new operands. We will first
discuss operands for the third operand of the instructions and then
discuss a vector register list operand needed for the second operand.

The third operands are vectors with bit indices and without type
qualifiers. They are called Em_INDEX1_14, Em_INDEX2_13, and Em_INDEX3_12
and they have 1 bit, 2 bit, and 3 bit indices respectively. For these
new operands, we defined new parsing case branch. The lsb and width of
these operands are the same as many existing but the convention is to
give different names to fields that serve different purpose so we
introduced new fields in aarch64-opc.c and aarch64-opc.h for these new
operands.

For the second operand of these instructions, we introduced a new
operand called LVn_LUT. This represents a vector register list with
stride 1. We defined new inserter and extractor for this new operand and
it is encoded in FLD_Rn. We are enforcing the number of registers in the
reglist using opcode flag rather than operand flag as this is what other
SIMD vector register list operands are doing. The disassembly also uses
opcode flag to print the correct number of registers.
2024-05-28 17:28:29 +01:00
Tom Tromey
2db17c87bd Use bool in thread_events
This changes target_ops::thread_events and target_thread_events to use
'bool'.  The callers were already doing this.

Tested by rebuilding.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2024-05-28 09:54:48 -06:00
Nick Clifton
6d267250a9 Fix typo in assembler documentation 2024-05-28 16:34:52 +01:00
Nick Clifton
73c8603c3f Fix: internal error in write_function_pdata at obj-coff-seh
PR 31796
2024-05-28 16:30:14 +01:00
Nick Clifton
8406f84253 Updated Spanish translation for the BFD sub-directory. 2024-05-28 14:48:08 +01:00
Richard Earnshaw
73061b1e53 opcodes: add a .gitattributes file for aarch64 autogenerated file exceptions
The autogenerated files in opcodes use spaces for indentation.
Changing that would be a lot of work to little benefit, so add a local
override to the white-space rules, so patches apply cleanly.
2024-05-28 10:16:23 +01:00
Nick Clifton
08b0f198b1 Add new ELF section and segment types to readelf. 2024-05-28 10:12:28 +01:00
Javier Mora
b85af8d9fd RISC-V: Fix U insn; replace opcode6 with opcode7 in gas/doc/c-riscv.texi
The type U RISC-V instruction format in gas/doc/c-riscv.texi shows the
bit arrangement of the simm20 immediate that belongs to the J type;
It should be just `simm20[19:0]`.  The current behavior of `gas` matches
the proposed documentation change.

Additionally, the opcode is called `opcode6` despite of having 7 bits.
Rename it to `opcode7`.

gas/
	* doc/c-riscv.texi: Fix U type, and replace opcode6 with opcode7.
2024-05-28 11:39:22 +08:00
GDB Administrator
78ba903374 Automatic date update in version.in 2024-05-28 00:00:20 +00:00
Tom Tromey
83dae94abe Re-run make-target-delegates.py
I re-ran make-target-delegates.py and discovered that the tree was out
of sync.  This patch corrects the problem.
2024-05-27 15:17:51 -06:00
Nelson Chu
e8c2682572 RISC-V: Fixed overwritten IRELATIVE relocs in the .rel.iplt for data reloc.
This was originally reported by Hau Hsu <hau.hsu@sifive.com>.

Similar to commit 51a8a7c2e3

We shouldn't use riscv_elf_append_rela to add dynamic relocs into .rela.iplt
in the riscv_elf_relocate_section when handling ifunc data reloc R_RISCV_32/64.
This just like what did in the riscv_elf_finish_dynamic_symbol.

bfd/
	* elfnn-riscv.c (riscv_elf_relocate_section): We shouldn't use
	riscv_elf_append_rela to add dynamic relocs into .rela.iplt in the
	riscv_elf_relocate_section when handling ifunc data reloc.
ld/
	* testsuite/ld-riscv-elf/ifunc-overwrite.s: Updated and renamed.
	* testsuite/ld-riscv-elf/ifunc-overwrite-exe.rd: Likewise.
	* testsuite/ld-riscv-elf/ifunc-overwrite-pic.rd: Likewise.
	* testsuite/ld-riscv-elf/ifunc-overwrite-pie.rd: Likewise.
	* testsuite/ld-riscv-elf/ifunc-overwrite.d: Renamed.
2024-05-28 01:38:26 +08:00
Nelson Chu
1d7a877a0f RISC-V: Segment fault for kernel purgatory when linking.
This was originally reported by Ard Biesheuvel <ardb@kernel.org>.

The followings are reproduce steps,
https://lore.kernel.org/all/202404260640.9GQVTmrw-lkp@intel.com/T/#u

The segment fault happens in the riscv_elf_finish_dynamic_sections when the
output got section is an ABS.  Refer to MIPS code, they added an extra
bfd_is_abs_section check to avoid ABS got, so this seems the right and easier
way to go in the short-term.

bfd/
	* elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Set sh_entsize
	and fill the got entries only when the got isn't an ABS section, and
	the size of got is larger than zero.  The similar goes for gotplt,
	except we already reported error when the gotplt is an ABS.
2024-05-28 01:38:17 +08:00
mengqinggang
6f779908fd LoongArch: Fix relaxation overflow caused by ld -z separate-code
ld -z separate-code let .text and .rodata in two different but read only
segment. If the symbol and pc in two segment, the offset from pc to
symbol need to consider segment alignment.

Add a function 'loongarch_two_sections_in_same_segment' to determine
whether two sections are in the same segment.
2024-05-27 17:41:04 +08:00
GDB Administrator
4250085217 Automatic date update in version.in 2024-05-27 00:00:07 +00:00
Joel Brobecker
bdc10cded8 Update gdb/NEWS after GDB 15 branch creation.
This commit a new section for the next release branch, and renames
the section of the current branch, now that it has been cut.
2024-05-26 09:02:38 -07:00
Joel Brobecker
4b22e35954 Bump version to 16.0.50.DATE-git.
Now that the GDB 15 branch has been created,
this commit bumps the version number in gdb/version.in to
16.0.50.DATE-git

For the record, the GDB 15 branch was created
from commit 3a624d9f1c.

Also, as a result of the version bump, the following changes
have been made in gdb/testsuite:

	* gdb.base/default.exp: Change $_gdb_major to 16.
2024-05-26 08:57:27 -07:00
GDB Administrator
3a624d9f1c Automatic date update in version.in 2024-05-26 00:00:21 +00:00
H.J. Lu
0daa17bf18 ld: Document -pie -Ttext-segment=ORG generates ET_EXEC
This is the v2 patch I am checking in.

H.J.
2024-05-25 07:46:38 -07:00
GDB Administrator
7870026f97 Automatic date update in version.in 2024-05-25 00:00:20 +00:00
Alan Modra
2597ca3417 Re: LoongArch: gas: Adjust DWARF CIE alignment factors
Adjust the gas testsuite to suit commit de203ed568.

	* testsuite/gas/loongarch/relax-cfi-fde-DW_CFA_advance_loc.d:
	Expect data alignment of -8.  Tidy.
2024-05-24 20:13:00 +09:30
Jan Beulich
f29ebbe3be gas: extend \+ support to .irp / .irpc
PR gas/31752

These are effectively macro-like, without any separate macro definition.
They already support \@, so they would better also support \+. This
allows, where desired, to get away without maintaining an explicit count
variable in source code.

With this the recently introduced testcase doesn't need any xfails
anymore.
2024-05-24 12:23:22 +02:00
Jan Beulich
69cab370cf gas: adjust handling of quotes for .irpc
The present handling of inner double quotes can lead to very strange
diagnostics. Follow one of the two possible interpretations of the doc:
@dots{} referring to possibly multiple white space separated
@var{values}, each of which may be quoted. The original implementation,
prior to 465e561723 ("PR gas/3856"), hints at the other possible
interpretation: When quoted there's only a single @var{values}, with
inner quotes taken as ordinary characters. That, however, seems overall
less useful to me.

While touching the documentation, mirror the (inverse) spelling
correction (@section line inconsistent with actual description) to .irp
as well.
2024-05-24 12:22:54 +02:00
Jan Beulich
6b15ec5165 x86: simplify VexVVVV_SRC2 handling for the XOP case
As already suggested during review, rather than having an extra
conditional in build_modrm_byte() (a code path used for quite a few
more insns, including even certain GPR ones), adjust the attribute in
the installed template to properly describe things with operands
swapped.
2024-05-24 12:21:57 +02:00
Jan Beulich
fb40ea39de x86: simplify / consolidate check_{word,long,qword}_reg()
These run after template matching. Therefore operands are already known
to match the template in use. With the loop bodies skipping anything not
a GPR in the actual operands, there's therefore no need to check the
template's operand type for permitting Reg or Accum.

At the same time bring the three functions in sync for the "byte" part
of the logic, as far as checking the template for other sizes (qword
specifically) goes. Plus drop a stale comment from check_qword_reg(),
when all three are now behaving the same in this regard.
2024-05-24 11:51:21 +02:00
Jan Beulich
acd86c81f0 x86: correct VCVT{,U}SI2SD
Properly reject inappropriate suffixes (No_lSuf / No_qSuf mistakenly
omitted by cf665fee1d ["x86: re-work AVX512 embedded rounding / SAE"]),
to avoid emitting bad or arbitrarily guessed instructions. Interestingly
check_{long,qword}_suffix() don't help here, which perhaps is another
indication that the way they work right now isn't quite appropriate.

Sadly correcting just the templates breaks operand ambiguity detection,
since so far that worked from a single template permitting more than one
suffix. Here we have ambiguity though which can now be noticed only when
taking all (matching) templates together. Therefore we need to determine
further matching templates (see code comments for constraints), to then
accumulate permitted suffixes across all of them.
2024-05-24 11:50:38 +02:00
Tom de Vries
db7814f3e5 [gdb/testsuite] Add PR26286 kfail in gdb.threads/attach-many-short-lived-threads.exp
When running test-case gdb.threads/attach-many-short-lived-threads.exp, I run
regularly into PR26286:
...
(gdb) continue^M
Continuing.^M
[LWP ... exited]^M
  ...
[LWP ... exited]^M
^M
Program terminated with signal SIGTRAP, Trace/breakpoint trap.^M
The program no longer exists.^M
(gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \
  break at break_fn: 1
...

Add a kfail for this, such that we have:
...
(gdb) KFAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \
  break at break_fn: 1 (PRMS: threads/26286)
...

Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>

Tested on x86_64-linux.
2024-05-24 09:36:52 +02:00
GDB Administrator
78726a8b7c Automatic date update in version.in 2024-05-24 00:00:23 +00:00
Felix Willgerodt
d3daf5a2ba gdb, testsuite: Fix return value in gdb.base/foll-fork.exp
In a remote testing setup, I saw this error:

~~~
(gdb) FAIL: gdb.base/foll-fork.exp: check_fork_catchpoints: runto: run to main
ERROR: tcl error sourcing gdb/gdb/testsuite/gdb.base/foll-fork.exp.
ERROR: expected boolean value but got ""
    while executing
"if { ![check_fork_catchpoints] } {
    untested "follow-fork not supported"
    return
}"
    (file "gdb/gdb/testsuite/gdb.base/foll-fork.exp" line 434)
    invoked from within
"source gdb/gdb/testsuite/gdb.base/foll-fork.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source gdb/gdb/testsuite/gdb.base/foll-fork.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""
Remote debugging from host 172.0.1.3, port 37766
Killing process(es): 1171
Quit
~~~

The actual reason for this were some connection problems. Though the
function check_fork_catchpoints shouldn't return an empty string, especially
as it promises to always return 0 or 1. Fix that.

Approved-By: Tom Tromey <tom@tromey.com>
2024-05-23 08:19:48 +02:00
Thiago Jung Bauermann
100318bcfd gdb/testsuite: Restore libc_has_debug_info's less strict behaviour
The code that was factored out from gdb.base/relativedebug.exp assumed that
libc has debug info and only determined that it doesn't if it saw a specific
message from GDB to that effect.  In the process of factoring it into a
require predicate, I made it stricter by trying to make a specific
determination of whether or not debug info is available.

Pedro noticed that "It'll disable the testcase on systems that link with
their libc statically (even if has debug info), or systems that name their
libc something else."  Which is something I hadn't considered.

This patch returns libc_has_debug_info to the original behaviour.

Also, remove a verbose message that is redundant with the $message
variable.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31700
Approved-By: Tom Tromey <tom@tromey.com>
2024-05-23 00:55:45 -03:00
GDB Administrator
fc12b44ec0 Automatic date update in version.in 2024-05-23 00:00:19 +00:00
Alan Modra
4ce8b69ddd libctf testsuite compilation failure
* testsuite/libctf-regression/open-error-free.c (main): Correct
	format length modifier.
2024-05-23 08:11:12 +09:30
Tom Tromey
b013bd1663 Default dwarf_synchronous to true
Unfortunately the background DWARF reading series introduced a number
of races, as repored by thread sanitizer.  This patch changes gdb to
disable this feature for the time being -- in particular for the gdb
15 release.

I've filed a bug and linked all the known races to it.  Once those are
fixed we can re-enable this feature by default.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31751
2024-05-22 10:14:06 -06:00
Indu Bhagat
f6f70819a6 restore build with --enable-maintainer-mode
A build with --enable-maintainer-mode is currently failing with:

make[4]: *** No rule to make target '<SRC>/gas/config/te-ia64aix.h',
	 needed by '<SRC>/gas/po/gas.pot'.  Stop.
make[4]: Leaving directory '<$OBJ>/gas/po'
make[3]: *** [Makefile:1695: all-recursive] Error 1
...

As config/te-ia64aix.h is now removed, remove the corresponding fragment
from the makefile.

gas/
        * Makefile.am: Remove config/te-ia64aix.h.
        * Makefile.in: Regenerate.
        * po/POTFILES.in: Regenerate.
2024-05-22 08:40:01 -07:00
Matthieu Longo
ef2d28fd02 aarch64: fix incorrect encoding for system register pmsdsfr_el1
This patch fixes a mistake in the encoding of the system register
pmsdsfr_el1.

Reference:
https://developer.arm.com/documentation/ddi0601/2022-09/AArch64-Registers/PMSDSFR-EL1--Sampling-Data-Source-Filter-Register?lang=en
2024-05-22 12:02:09 +01:00
Cui, Lili
bbe8d019ed Support APX zero-upper
This patch is to enable ZU for IMUL (opcodes 0x69 and 0x6B) and SETcc.
Since the spec only recommends one form of setzu, I won't be adding
set<cc>reg32/reg64 support in this patch.

gas/ChangeLog:

        * config/tc-i386.c (build_apx_evex_prefix): Handle ZU.
        * testsuite/gas/i386/x86-64.exp: Added new tests for ZU.
        * testsuite/gas/i386/x86-64.exp: Added new tests for ZU.
        * testsuite/gas/i386/x86-64-apx-zu-intel.d: New test.
        * testsuite/gas/i386/x86-64-apx-zu-inval.l: Ditto.
        * testsuite/gas/i386/x86-64-apx-zu-inval.s: Ditto.
        * testsuite/gas/i386/x86-64-apx-zu.d: Ditto.
        * testsuite/gas/i386/x86-64-apx-zu.s: Ditto.

opcodes/ChangeLog:

        * i386-dis-evex-prefix.h: Handle PREFIX_EVEX_MAP4_40 ~
        PREFIX_EVEX_MAP4_4F.
        * i386-dis-evex.h: Ditto.
        * i386-dis.c (struct dis386): Add new micro 'ZU'.
        (putop): Handle %ZU.
        * i386-gen.c: Added ZU.
        * i386-opc.h: Ditto.
        * i386-opc.tbl: Added new templates to support ZU.
2024-05-22 16:15:47 +08:00
Cui, Lili
b757e3c1ac X86: Remove "i.rex" to eliminate extra conditional branch
Resulting code will do better without the extra conditional branch.
Remove "i.rex" to eliminate extra conditional branch.

gas/ChangeLog:

        * config/tc-i386.c (establish_rex): Remove i.rex.
2024-05-22 15:26:34 +08:00
Vladimir Mezentsev
559f8726e8 gprofng: use StringBuilder to create long messages
ChangeLog
2024-05-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* src/collctrl.cc: Use StringBuilder to create messages.
	Remove unused variables and arrays.
	* src/collctrl.h: Remove unused variables.
2024-05-21 19:54:59 -07:00
Vladimir Mezentsev
aea1188a25 gprofng: Remove hardware counter tables for unsupported hardware (Sparc)
ChangeLog
2024-05-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/31123
	* common/hwctable.c: Remove hardware counter tables for Sparc machines.
2024-05-21 19:54:58 -07:00
Vladimir Mezentsev
a3e8656c02 gprofng: remove memset() in libcollector
ChangeLog
2024-05-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* libcollector/collector.c: Use static initialization instead of memset.
	* libcollector/dispatcher.c: Likewise.
	* libcollector/hwprofile.c: Likewise.
	* libcollector/jprofile.c: Likewise.
	* libcollector/profile.c: Likewise.
	* libcollector/synctrace.c: Likewise.
2024-05-21 19:54:56 -07:00
Cui, Lili
9f8b42c871 Add check for 8-bit old registers in EVEX format
Since APX supports EVEX from legacy instructions, we need to check
the 8-bit old registers in EVEX format. And add test cases for it.

gas/ChangeLog:

        * config/tc-i386.c (md_assemble): Add invalid check for old byte
        registers in EVEX format.
        * testsuite/gas/i386/x86-64-apx-inval.l: Add new test.
        * testsuite/gas/i386/x86-64-apx-inval.s: Ditto.
2024-05-22 10:16:14 +08:00
Cui, Lili
3a8ecbdade x86: Split REX/REX2 old registers judgment.
Split "REX/REX2 old register checking" and "add empty rex prefix"
into two separate branches.

gas/ChangeLog:

        * config/tc-i386.c (establish_rex): Split the judgments.
2024-05-22 09:18:38 +08:00
GDB Administrator
92f59183ab Automatic date update in version.in 2024-05-22 00:00:12 +00:00
Indu Bhagat
002ccda0ef gas: ginsn: remove unnecessary buffer allocation and free
A previous commit 80ec235 fixed the memory leaks, but brought to light
that the code should ideally make consistent use of snprintf and not
allocate/free more buffers than necessary.

gas/
	* ginsn.c (ginsn_dst_print): Use snprintf consistently.
2024-05-21 12:59:55 -07:00
Srinath Parvathaneni
e63b1d5950 aarch64: Fix the hyphenated disassembly comment.
This patch fixes the following comment.

-  /* The hyphenated form is preferred for disassembly if there are
-     more than two registers in the list, and the register numbers
      are monotonically increasing in increments of one.  */

+  /* The hyphenated form is preferred for disassembly if there is
+     more than one register in the list, and the register numbers
      are monotonically increasing in increments of one.  */
2024-05-21 14:59:10 +01:00
Tom Tromey
f56e1c8c86 Clarify documentation for pretty_printer.child
An Ada pretty-printer had a bug where its 'child' method returned a
gdb.Value rather than a tuple.  Kévin suggested that the documentation
for this method could be improved to clarify this.

Reviewed-By: Kévin Le Gouguec <legouguec@adacore.com>
Approved-By: Eli Zaretskii <eliz@gnu.org>
2024-05-21 06:59:57 -06:00
Jan Beulich
c924b84f20 gas: drop remnants of ia64-*-aix*
With BFD not supporting that target anymore, GAS can't possibly support
it either.
2024-05-21 13:43:08 +02:00