]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
4 months agoZ80: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:29:29 +0000 (12:29 +0100)] 
Z80: use is_whitespace()

Replace an open-coded check and convert ISSPACE() uses.

4 months agoXtensa: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:29:10 +0000 (12:29 +0100)] 
Xtensa: use is_whitespace()

Convert an open-coded check.

4 months agoxgate: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:28:58 +0000 (12:28 +0100)] 
xgate: use is_whitespace()

Convert an open-coded check.

4 months agox86: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:28:46 +0000 (12:28 +0100)] 
x86: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agowasm32: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:28:22 +0000 (12:28 +0100)] 
wasm32: use is_whitespace()

Convert an open-coded check.

4 months agoVisium: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:26:00 +0000 (12:26 +0100)] 
Visium: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert an open-coded check.

4 months agoVAX: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:25:50 +0000 (12:25 +0100)] 
VAX: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agov850: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:25:41 +0000 (12:25 +0100)] 
v850: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of a kind-of-open-
coded check in adjacent code.

4 months agoC6x: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:25:28 +0000 (12:25 +0100)] 
C6x: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert an ISSPACE() use. At the same time use
is_end_of_stmt() instead of open-coded checks in adjacent code.

4 months agoC54x: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:25:10 +0000 (12:25 +0100)] 
C54x: use is_whitespace()

Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of open-coded checks in adjacent code. The function also needs using in
next_line_shows_parallel().

4 months agoC4x: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:25:01 +0000 (12:25 +0100)] 
C4x: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of
kind-of-open-coded checks in adjacent code.

4 months agoC30: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:24:48 +0000 (12:24 +0100)] 
C30: use is_whitespace()

Convert an open-coded check.

4 months agospu: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:22:33 +0000 (12:22 +0100)] 
spu: use is_whitespace()

Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of a kind-of-open-coded check in adjacent code.

4 months agoSparc: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:22:23 +0000 (12:22 +0100)] 
Sparc: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agoSH: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:22:10 +0000 (12:22 +0100)] 
SH: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as an
ISSPACE() use. At the same time use is_end_of_stmt() instead of
(kind-of-)open-coded checks in adjacent code.

4 months agoScore: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:21:46 +0000 (12:21 +0100)] 
Score: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agoS/390: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:21:29 +0000 (12:21 +0100)] 
S/390: use is_whitespace()

Convert ISSPACE() uses. At the same time use is_end_of_stmt() instead
of kind-of-open-coded checks in adjacent code.

4 months agos12z: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:21:08 +0000 (12:21 +0100)] 
s12z: use is_whitespace()

Convert open-coded checks. At the same time use is_end_of_stmt() instead
of open-coded checks in adjacent code. This then also fixes the prior
use of a wrong cast for an array index: Plain char may, after all, be
signed.

4 months agorx: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:19:26 +0000 (12:19 +0100)] 
rx: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of an open-coded
check in adjacent code.

4 months agorl78: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:19:17 +0000 (12:19 +0100)] 
rl78: use is_whitespace()

Replace open-coded checks and convert ISSPACE() uses. At the same time
use is_end_of_stmt() instead of an open-coded check in adjacent code.

4 months agoRISC-V: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:19:05 +0000 (12:19 +0100)] 
RISC-V: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Switch places already checking for tabs to use the
macro, too.

4 months agopru: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:18:53 +0000 (12:18 +0100)] 
pru: use is_whitespace()

Convert open-coded checks as well as an ISSPACE() use.

4 months agoPPC: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:18:34 +0000 (12:18 +0100)] 
PPC: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over. At the same time
use is_end_of_stmt() instead of an open-coded nul char check.

4 months agoPicoJava: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:18:20 +0000 (12:18 +0100)] 
PicoJava: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE(). At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.

4 months agoPDP11: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:18:07 +0000 (12:18 +0100)] 
PDP11: use is_whitespace()

Convert open-coded checks.

4 months agoNS32k: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:16:01 +0000 (12:16 +0100)] 
NS32k: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agonds32: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:15:48 +0000 (12:15 +0100)] 
nds32: use is_whitespace()

Convert ISSPACE() uses.

4 months agomsp430: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:15:35 +0000 (12:15 +0100)] 
msp430: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of open-coded checking in code needing touching
anyway.

4 months agoMoxie: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:15:21 +0000 (12:15 +0100)] 
Moxie: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code. While
at it also drop a redundant whitespace skipping loop.

4 months agomn10300: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:15:07 +0000 (12:15 +0100)] 
mn10300: use is_whitespace()

Convert open-coded checks as well as ISSPACE() uses. At the same time
use is_end_of_stmt() instead of kind-of-open-coded checks in adjacent
code.

4 months agomn10200: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:14:56 +0000 (12:14 +0100)] 
mn10200: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks as well as ISSPACE()
uses. At the same time use is_end_of_stmt() instead of kind-of-open-
coded checks in adjacent code.

4 months agoMIPS: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:07:21 +0000 (12:07 +0100)] 
MIPS: use is_whitespace()

... for consistency of recognition of what is deemed whitespace.

At the same time use is_end_of_stmt() instead of an open-coded nul char
check, and check for statement end in the first place in
parse_relocation().

4 months agoMicroBlaze: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:07:09 +0000 (12:07 +0100)] 
MicroBlaze: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.

4 months agometag: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:06:57 +0000 (12:06 +0100)] 
metag: use is_whitespace()

Replace the custom is_whitespace_char().

4 months agoM*Core: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:06:43 +0000 (12:06 +0100)] 
M*Core: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert ISSPACE() uses. At the same time use
is_end_of_stmt() instead of an open-coded check in adjacent code.

4 months agoM68k: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:06:34 +0000 (12:06 +0100)] 
M68k: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.

4 months agoM68HC1x: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:06:21 +0000 (12:06 +0100)] 
M68HC1x: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of an
open-coded check in adjacent code.

4 months agom32r: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:06:06 +0000 (12:06 +0100)] 
m32r: use is_whitespace()

Convert a lonely ISSPACE().

4 months agom32c: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:05:55 +0000 (12:05 +0100)] 
m32c: use is_whitespace()

Convert open-coded checks as well as the sole ISBLANK() use throughout
the gas/ tree.

4 months agoLoongArch: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:05:33 +0000 (12:05 +0100)] 
LoongArch: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agokvx: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:03:07 +0000 (12:03 +0100)] 
kvx: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.

4 months agoHP-PA: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:02:50 +0000 (12:02 +0100)] 
HP-PA: use is_whitespace()

Convert open-coded checks. At the same time use is_end_of_stmt() instead
of an open-coded check in adjacent code.

4 months agoH8/300: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:02:38 +0000 (12:02 +0100)] 
H8/300: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of an
open-coded check in adjacent code.

4 months agoft32: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:02:09 +0000 (12:02 +0100)] 
ft32: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over. At the same time
use is_end_of_stmt() instead of open-coded checks in adjacent code.

4 months agofr30: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 11:01:59 +0000 (12:01 +0100)] 
fr30: use is_whitespace()

Convert open-coded checks. At the same time use is_end_of_stmt() instead
of an open-coded check in adjacent code.

4 months agoEpiphany: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:59:38 +0000 (11:59 +0100)] 
Epiphany: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agoCRx: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:59:22 +0000 (11:59 +0100)] 
CRx: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over.

4 months agocris: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:59:00 +0000 (11:59 +0100)] 
cris: use is_whitespace()

Switch ISSPACE() uses over.

Unlike many other targets, limiting whitespace checks to just blanks is
deemed okay here: Compilers wanting to use -f / #NO_APP are apparently
required to emit only blanks (without this being written down anywhere).

4 months agoCR16: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:58:49 +0000 (11:58 +0100)] 
CR16: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over.

4 months agoC-Sky: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:58:32 +0000 (11:58 +0100)] 
C-Sky: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also switch ISSPACE() uses over. At the same time
use is_end_of_stmt() instead of kind-of-open-coded checks.

4 months agodlx: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:56:25 +0000 (11:56 +0100)] 
dlx: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included.

4 months agod30v: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:56:13 +0000 (11:56 +0100)] 
d30v: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.

4 months agod10v: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:56:04 +0000 (11:56 +0100)] 
d10v: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Also convert open-coded checks where tabs were
already included. At the same time use is_end_of_stmt() instead of open-
coded checks in adjacent code.

4 months agobpf: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:55:54 +0000 (11:55 +0100)] 
bpf: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). Various redundant nul char checks are also dropped,
where adjacent. At the same time use is_end_of_stmt() instead of an
open-coded nul char check.

4 months agobfin: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:55:40 +0000 (11:55 +0100)] 
bfin: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agogas/obj-*.c: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:55:23 +0000 (11:55 +0100)] 
gas/obj-*.c: use is_whitespace()

... for consistency of recognition of what is deemed whitespace.

In obj_elf_section_name() also generalize end-of-statement recognition
at the same time. Conversely drop the unused SKIP_SEMI_COLON() for COFF.

4 months agoavr: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:50:43 +0000 (11:50 +0100)] 
avr: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agoaarch64: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:50:30 +0000 (11:50 +0100)] 
aarch64: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input).

4 months agoArm: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:50:20 +0000 (11:50 +0100)] 
Arm: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of an
open-coded nul char check.

In parse_neon_type() be more aggressive and remove the special casing of
certain characters altogether. The original default case simply having
"break" can't have been correct.

4 months agoarc: use is_whitespace()
Jan Beulich [Mon, 3 Feb 2025 10:50:03 +0000 (11:50 +0100)] 
arc: use is_whitespace()

Wherever blanks are permissible in input, tabs ought to be permissible,
too. This is particularly relevant when -f is passed to gas (alongside
appropriate input). At the same time use is_end_of_stmt() instead of
open-coded nul char checks.

4 months agoAlpha/EVAX: use is_whitespace() / is_end_of_stmt()
Jan Beulich [Mon, 3 Feb 2025 10:49:48 +0000 (11:49 +0100)] 
Alpha/EVAX: use is_whitespace() / is_end_of_stmt()

Don't open-code checking for ' ', '\t', and statement ending chars.

4 months agogas: consolidate whitespace recognition
Jan Beulich [Mon, 3 Feb 2025 10:48:55 +0000 (11:48 +0100)] 
gas: consolidate whitespace recognition

Let's extend lex_type[] to also cover whitespace, then having a simple
macro to uniformly recognize both blanks and tabs (and \r when it's not
EOL) as such.

In macro.c use sb_skip_white() as appropriate, instead of open-coding
it.

4 months agoAutomatic date update in version.in
GDB Administrator [Mon, 3 Feb 2025 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 months agoAvoid "text file busy" in dw2-using-debug-str.exp
Tom Tromey [Sat, 1 Feb 2025 23:51:42 +0000 (16:51 -0700)] 
Avoid "text file busy" in dw2-using-debug-str.exp

When I run:

    runtest dw2-using-debug-str.exp

... if I examine the gdb.log, I see:

    objcopy: unable to copy file '[...]/dw2-using-debug-str'; reason: Text file busy

This happens because the inferior is still running, and objcopy --
despite the invocation seemingly not needing this -- tries to open it
for writing.

This patch works around the objcopy oddity by having gdb exit (killing
the inferior) before the invocation.

Fixing this points out that the test does not work in the
--target_board=cc-with-gdb-index case.  This patch also arranges to
issue an "untested" here.

4 months agoAutomatic date update in version.in
GDB Administrator [Sun, 2 Feb 2025 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 months agoRemove obsolete test from gdb.cp/var-tag.exp
Tom Tromey [Sat, 4 Jan 2025 17:48:07 +0000 (10:48 -0700)] 
Remove obsolete test from gdb.cp/var-tag.exp

There is a test in gdb.cp/var-tag.exp that is kfail'd.  I happened
across this while working on another series and found that the PR it
referenced was closed as invalid.  On that basis I think the test
should be deleted.

Reviewed-By: Keith Seitz <keiths@redhat.com>
4 months agoShow type- and function-domain in maint print psymbols
Tom Tromey [Mon, 20 Jan 2025 18:02:51 +0000 (11:02 -0700)] 
Show type- and function-domain in maint print psymbols

I neglected to update "maint print psymbols" when adding TYPE_DOMAIN
and FUNCTION_DOMAIN.  This would have been mildly helpful when
debugging a series I am working on.  This patch corrects the
oversight.

Approved-By: Andrew Burgess <aburgess@redhat.com>
4 months agoAutomatic date update in version.in
GDB Administrator [Sat, 1 Feb 2025 00:00:14 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 months agoUse "false" when setting cli_styling
Tom Tromey [Fri, 31 Jan 2025 21:23:32 +0000 (14:23 -0700)] 
Use "false" when setting cli_styling

I noticed a spot that uses 0 where "false" is more appropriate.

4 months agoAdd space in name of Rust tuple type
Tom Tromey [Sun, 19 Jan 2025 23:57:07 +0000 (16:57 -0700)] 
Add space in name of Rust tuple type

The Rust compiler emits tuple type names with a space after the comma,
like "(i32, f64)".  This changes rust-parse.c to follow.  This isn't
ideal -- probably the DWARF reader should canonicalize these names --
but it is a bit more robust if symbol lookup should change; and anyway
this feature of gdb is probably rarely used.

4 months agoaarch64: Support +sme+nosve permissively
Andrew Carlotti [Fri, 31 Jan 2025 05:07:30 +0000 (05:07 +0000)] 
aarch64: Support +sme+nosve permissively

There is inconsistency regarding whether or not +sme implies +sve2 and
whether +nosve2 implies +nosme.  In particular, GCC 14 assumes the
dependency exists, and canonicalises target strings accordingly, whereas
LLVM treats the features as independent.

This patch removes the positive implication while retaining the negative
implication.  This is the more permissive choice in each case, and
allows us to support target strings written with either interpretation
in mind.

This reduces our ability to detect invalid instructions, but we already
can't rely on this detection because gas doesn't know whether functions
might be executed in streaming mode and/or non-streaming mode.

The aarch64_feature_enable_set change is functionally redundant within
this patch.  It is included because the longer term intention is to
instead remove the workaround in aarch64_parse_features, once the
internal feature checks have been modified to support having both
AARCH64_FEATURE_SME set and AARCH64_FEATURE_SVE unset.

Similarly, the dependency from +sme to +fp16 is currently redundant, but
this redundancy relies upon an incorrect dependency from +fcma to +fp16.
This can be fixed in the future, but it might require modifying internal
feature checks for a few FCMA instructions, so it's left unchanged for
now.

4 months agoaarch64: Fix fp8 feature dependencies
Andrew Carlotti [Thu, 30 Jan 2025 19:14:46 +0000 (19:14 +0000)] 
aarch64: Fix fp8 feature dependencies

We agreed with LLVM that we shouldn't enforce the architectural
dependencies between fp8 muliplication features, so remove them.

Additionally, fix a typo in the gating for FEAT_SME_F8F16 instructions,
which were mistakenly gated by +sme-f8f32 instead.  Until now this
mistake had been masked by the dependency between the features.

4 months agoaarch64: Fix overly lax +frintts dependency
Andrew Carlotti [Thu, 30 Jan 2025 18:35:14 +0000 (18:35 +0000)] 
aarch64: Fix overly lax +frintts dependency

We agreed with LLVM that +frintts should only enable +fp, not +simd.
This also matches the dependency used in GCC.

4 months agoLoongArch: Do not relax against __[start|stop]_SECNAME symbol
Lulu Cai [Fri, 31 Jan 2025 10:37:50 +0000 (10:37 +0000)] 
LoongArch: Do not relax against __[start|stop]_SECNAME symbol

4 months agox86/APX: correct libbfd's EVEX Rn -> Bn transformations
Jan Beulich [Fri, 31 Jan 2025 09:07:54 +0000 (10:07 +0100)] 
x86/APX: correct libbfd's EVEX Rn -> Bn transformations

In the recent GOTPCREL addition I screwed up, in clearing the Rn bits
afterwards rather than setting them. While that ought to be benign (for
the bits being ignored in situations like this), we still want to leave
"canonical" encodings.

The pre-existing GOTTPOFF conversion wasn't doing quite correctly
either: We cannot assume the incoming Bn bits to be in a particular
state, as for the addressing form in question they're ignored as well.

To address both, introduce a helper function. This is then also an
overall reduction of (source) code size (and use of "magic" numbers).

4 months agox86/APX: GETSEC cannot be used with REX2
Jan Beulich [Fri, 31 Jan 2025 09:07:32 +0000 (10:07 +0100)] 
x86/APX: GETSEC cannot be used with REX2

It lives in a "forbidden" row, yet its disassembler table entry was
lacking a respective marker.

4 months agox86: support RMPREAD insn
Jan Beulich [Fri, 31 Jan 2025 09:06:02 +0000 (10:06 +0100)] 
x86: support RMPREAD insn

Like for RMPUPDATE documentation is about to change as far as operands
are concerned. They're merely the other way around here.

While adjustind gas documentation, also add the missing RMPQUERY
counterparts there.

4 months agox86: RMPUPDATE wants operands in different form
Jan Beulich [Fri, 31 Jan 2025 09:05:36 +0000 (10:05 +0100)] 
x86: RMPUPDATE wants operands in different form

AMD are about to update their doc, to help clarify that what we
currently do isn't quite right: In particular it is not %rax but %rcx
which is affected by address size. In fact, that's a normal memory
operand, just not expressed via ModR/M byte, but fixed to (%rcx) (or
(%ecx) with 32-bit addressing).

To support this in the assembler, generalize memory operand handling so
far specific to XLAT (which isn't really a string insn, but requires its
memory operand to be (%bx) / (%ebx) / (%rbx)).

In the disassembler mimic handling after XLAT's, too.

4 months agox86-64: omit "default" segment prefixes from string insn disassembly
Jan Beulich [Fri, 31 Jan 2025 09:04:45 +0000 (10:04 +0100)] 
x86-64: omit "default" segment prefixes from string insn disassembly

Printing implicit %ds: and %es: prefixes is pretty meaningless in 64-bit
mode. The SDM explicitly omits them for the 64-bit forms, and it
obviously has them for the other ones only to cover non-64-bit modes
(oddly enough the AMD PM has them present).

4 months agoRISC-V: widen LEB128 support
Jan Beulich [Fri, 31 Jan 2025 09:04:01 +0000 (10:04 +0100)] 
RISC-V: widen LEB128 support

Do away with at least one of the limitations - all other targets permit
multiple values to be specified with a single directive. Re-arrange the
logic further to also overcome an internal error in
riscv_insert_uleb128_fixes(), as e.g. observed by the all/sleb128-2
testcase. This way there's also no need to parse expressions twice,
thus also not raising the same diagnostics (if any) twice.

Note how this addresses a pre-existing XFAIL (where the comment wasn't
really applicable either for RISC-V).

Also update documentation, also to mention that differences between
symbols may be used with .uleb128 (albeit I'm uncertain whether there
are limitations).

4 months agoUse "require" a two gdb.dwarf2 test files
Tom Tromey [Fri, 31 Jan 2025 05:51:49 +0000 (22:51 -0700)] 
Use "require" a two gdb.dwarf2 test files

A couple of ".tcl" files in gdb.dwarf2 escaped notice during the
"require" refactoring.  This patch fixes these to use "require" rather
than if/return.

4 months agoAutomatic date update in version.in
GDB Administrator [Fri, 31 Jan 2025 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 months agogdb: add first gdbreplay test, connect.exp
Alexandra Hájková [Wed, 23 Oct 2024 12:18:43 +0000 (14:18 +0200)] 
gdb: add first gdbreplay test, connect.exp

When the changes on the remote protocol are made,
we want to test all the corner cases to prevent
regressions.  Currently it can be tricky to simulate
some corner case conditions that would expose possible
regressions.  When I want to add or change the remote
protocol packet, I need to hack gdbserver to send a
corrupted packet or an error to make sure GDB is able
to handle such a case.

This test makes it easy to send a corruped packet or
an error message to GDB using the gdbreplay tool and
check GDB deals with it as we expect it to.

This test starts a communication with gdbsever setting
the remotelog file.  Then, it modifies the remotelog with
update_log proc, injects an error message instead of
the expected replay to the vMustReplyEmpty packet in order
to test GDB reacts to the error response properly.  After
the remotelog modification, this test restarts GDB and starts
communication with gdbreply instead of the gdbserver using
the remotelog.

Add a lib/gdbreplay-support.exp.  update_log proc matches lines
from GDB to gdbserver in a remotelogfile.  Once a match is found then
the custom line is used to build a replacement line to send from
gdbserver to GDB.

Approved-By: Andrew Burgess <aburgess@redhat.com>
4 months agoRe-enable background reading
Tom Tromey [Thu, 12 Dec 2024 23:21:30 +0000 (16:21 -0700)] 
Re-enable background reading

All the reported races have been fixed, so this patch re-enabled
background DWARF reading.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31751
Tested-By: Tom de Vries <tdevries@suse.de>
4 months agogdb: remove unused includes from dwarf2/index-write.c
Simon Marchi [Tue, 28 Jan 2025 21:15:48 +0000 (16:15 -0500)] 
gdb: remove unused includes from dwarf2/index-write.c

These includes are reported as unused by clangd.

Change-Id: Ibf3cdc881abad5f5969edca623412ceac7212149

4 months agogdb: remove includes from dwarf2/mapped-index.h
Simon Marchi [Tue, 28 Jan 2025 20:17:19 +0000 (15:17 -0500)] 
gdb: remove includes from dwarf2/mapped-index.h

They are unused, according to clangd.

Add some includes to other files, which were relying on transitive
includes.

Change-Id: I3bcb4be93b3a18bf44a4068f4067e567f83e1d4f

4 months agogdb: remove unused include from dwarf2/read.c
Simon Marchi [Tue, 28 Jan 2025 20:16:38 +0000 (15:16 -0500)] 
gdb: remove unused include from dwarf2/read.c

It is unused, according to clangd.

Change-Id: Ieadb84a2b1953b70d82a28775472fd347a809a62

4 months agogdb: remove unused include, add forward declaration in dwarf2/parent-map.h
Simon Marchi [Tue, 28 Jan 2025 20:15:30 +0000 (15:15 -0500)] 
gdb: remove unused include, add forward declaration in dwarf2/parent-map.h

dwarf2_per_bfd is used but never declared in this file, forward-declare
it.

dwarf2/types.h is unused, according to clangd.

Change-Id: I324b68894008af20307030c9e36c5abe06e36a78

4 months agogdb: remove unused include in symtab.h
Simon Marchi [Tue, 28 Jan 2025 20:14:34 +0000 (15:14 -0500)] 
gdb: remove unused include in symtab.h

This include is unused, according to clangd.

Change-Id: Ifbc2fe75b02c9ae9b3e2f1184bbcc4dc7095a554

4 months agogdb: include symtab.h in quick-symbol.h
Simon Marchi [Tue, 28 Jan 2025 20:13:39 +0000 (15:13 -0500)] 
gdb: include symtab.h in quick-symbol.h

quick-symbol.h uses domain_search_flags, defined in symtab.h.

Change-Id: I5c4ae272da929eb6a8dd593bcd96a2aacf0ca99f

4 months agoRemove a couple of entries in the binutils MAINTAINERS file
Nick Clifton [Thu, 30 Jan 2025 16:01:02 +0000 (16:01 +0000)] 
Remove a couple of entries in the binutils MAINTAINERS file

4 months ago[gdb/testsuite] Handle unordered dict in gdb.python/py-mi-notify.exp
Tom de Vries [Thu, 30 Jan 2025 12:21:56 +0000 (13:21 +0100)] 
[gdb/testsuite] Handle unordered dict in gdb.python/py-mi-notify.exp

With test-case gdb.python/py-mi-notify.exp and python 3.4, I occasionally run
into:
...
python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })
&"python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })\n"
=-test-notification,data2="2",data1="1"
^done
(gdb)
FAIL: $exp: python notification, with additional data (unexpected output)
...

In contrast, a passing version looks like:
...
python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })
&"python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })\n"
=-test-notification,data1="1",data2="2"
^done
(gdb)
PASS: gdb.python/py-mi-notify.exp: python notification, with additional data
...

The python method "gdb.notify_mi(name, data)" has parameter data which is a
dictionary, and it iterates over that dictionary.

The problem is that dictionaries are only guaranteed to be iterating in
insertion order starting python 3.7 (though cpython does this starting python
3.6).

Fix this in the same way as in commit 362a867f2ac ("[gdb/testsuite] Handle
unordered dict in gdb.python/py-mi-cmd.exp"): by allowing the alternative
order.

Tested on x86_64-linux.

4 months agox86-64: Remove pr19609-4c.d and pr19609-4d.d
H.J. Lu [Thu, 30 Jan 2025 04:17:57 +0000 (12:17 +0800)] 
x86-64: Remove pr19609-4c.d and pr19609-4d.d

Remove pr19609-4c.d and pr19609-4d.d since they are identical to
pr19609-4a.d and pr19609-4b.d, respectively.

* testsuite/ld-x86-64/pr19609-4c.d: Removed.
* testsuite/ld-x86-64/pr19609-4d.d: Likewise.
* testsuite/ld-x86-64/pr19609-4e.d: Renamed to ...
* testsuite/ld-x86-64/pr19609-4c.d: This.
* testsuite/ld-x86-64/x86-64.exp: Updated.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
4 months agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Jan 2025 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 months agoUse command style in cmd_show_list
Tom Tromey [Sat, 11 Jan 2025 21:36:54 +0000 (14:36 -0700)] 
Use command style in cmd_show_list

cmd_show_list is a bit funny because it shows partial command names --
for a command like "show abc xyz", it will only show "abc xyz".

Nevertheless, I think it makes some sense to highlight these with the
command style.  That is what this patch does.

4 months agoRemove "enabled" output from show_index_cache_command
Tom Tromey [Sat, 11 Jan 2025 21:34:06 +0000 (14:34 -0700)] 
Remove "enabled" output from show_index_cache_command

show_index_cache_command prints whether the index-cache is enabled.
This text was added back in 2018 in commit 87d6a7aa (Add DWARF index
cache).  Then in 2021, the enabling option was changed via commit
7bc5c369 (gdb: introduce "set index-cache enabled", deprecate "set
index-cache on/off").

This latter change made this output, IMO, redundant.  That is,
currently gdb will show:

    (gdb) show index-cache
    ...
    index-cache enabled:  The index cache is off.
    ...
    The index cache is currently disabled.

This patch removes the redundant output.

4 months agoUse command style in "help" command
Tom Tromey [Sat, 11 Jan 2025 21:11:01 +0000 (14:11 -0700)] 
Use command style in "help" command

This changes the help command to use the new command style when
displaying text like:

    List of "catch" subcommands:

As a side effect, this mildly -- but not hugely -- cleans up some i18n
issues in help_list.  The header comment for that function is also
changed to the gdb style.

Finally, this function used to print something like:

    Type "help catch" followed by catch subcommand name for full documentation.

The second "catch" here seems redundant to me, so this patch removes
it.

4 months agoAvoid calling help_list in more places
Tom Tromey [Sat, 11 Jan 2025 20:50:50 +0000 (13:50 -0700)] 
Avoid calling help_list in more places

I think there is no need to have a prefix command that simply calls
help_list.  Instead, add_basic_prefix_cmd can be used.  This patch
changes the relevant instances.  In one spot, add_setshow_prefix_cmd
is used instead.

4 months agogdb: include cli/cli-style.h in darwin-nat.c
Simon Marchi [Wed, 29 Jan 2025 15:45:31 +0000 (10:45 -0500)] 
gdb: include cli/cli-style.h in darwin-nat.c

PR 32610 says:

  File gdb/darwin-nat.c is missing an #include statement of
  "cli/cli-style.h". It is needed because there is a reference to class
  object command_style in the .c file.

I'm not able to build-test this change (I only have access to arm64
macos machines, which GDB doesn't support yet), but I don't think I'm
doing things worse by adding this.

Change-Id: I2a169664ff91b92caf27cb084334f2eb4df46aa5

4 months agogdb/testsuite: add comments to line table from DWARF assembler
Andrew Burgess [Sat, 25 Jan 2025 11:51:43 +0000 (11:51 +0000)] 
gdb/testsuite: add comments to line table from DWARF assembler

Add comments to the assembler generated by the DWARF assembler that
builds the line table.  I found these comments useful when debugging
issues with the line table parsing.

This patch should make no difference to what is being tested.  The
test binaries should be unchanged after this commit.

Approved-By: Kevin Buettner <kevinb@redhat.com>