]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
3 weeks agoGDB: aarch64-linux: Reorganize GCS-related definitions
Thiago Jung Bauermann [Sat, 14 Feb 2026 03:09:03 +0000 (00:09 -0300)] 
GDB: aarch64-linux: Reorganize GCS-related definitions

Only native code should use struct user_gcs, so its definition should be
in a native-specific file and not in a file under gdb/arch/.

To fix this problem, create gdb/nat/aarch64-gcs-linux.h and move the
struct user_gcs definition to it, as suggested by Luis.

To fix the use of struct user_gcs in gdb/aarch64-linuxt-dep.c, define a
macro with the size of the GCS regset in gdb/arch/aarch64-gcs-linux.h
and use it in aarch64-linux-tdep.c, as is done for other regsets and
following a suggestion from Simon Marchi.

Also, move the HWCAP_GCS definition to gdb/nat/aarch64-gcs-linux.h and
create an AARCH64_HWCAP_GCS definition in gdb/arch/aarch64-gcs-linux.h
for use by target-dependent code.

Similarly, move the SEGV_CPERR and PR_SHADOW_STACK_{ENABLE,WRITE,PUSH}
definitions, which were added by the GCS patches and are only used by
aarch64-linux target-dependent code, to gdb/arch/aarch64-gcs-linux.h
with an AARCH64_ prefix and adjust users.

Finally, I noticed that gdb/aarch64-linux-nat.c and
gdbserver/linux-aarch64-low.cc don't need anything from the
arch/aarch64-gcs-linux.h header, so make them not include it.

Suggested-by: Luis <luis.machado.foss@gmail.com>
Suggested-by: Simon Marchi <simark@simark.ca>
Approved-By: Luis Machado <luis.machado.foss@gmail.com>
3 weeks agoGDB: aarch64-linux: Reorganize SME-related definitions
Thiago Jung Bauermann [Sat, 28 Feb 2026 20:13:59 +0000 (17:13 -0300)] 
GDB: aarch64-linux: Reorganize SME-related definitions

The HWCAP2_SME, HWCAP2_SME2 and HWCAP2_SME2P1 definitions should be in a
file under gdb/nat/, so move them to aarch64-scalable-linux-ptrace.h.

Also, I noticed that gdb/aarch64-linux-nat.c and
gdbserver/linux-aarch64-low.cc don't need anything from the
arch/aarch64-scalable-linux.h header, so make them not include it.

Approved-By: Luis Machado <luis.machado.foss@gmail.com>
3 weeks agoGDB: aarch64-linux: Reorganize MTE-related definitions
Thiago Jung Bauermann [Fri, 27 Feb 2026 04:34:29 +0000 (01:34 -0300)] 
GDB: aarch64-linux: Reorganize MTE-related definitions

GDB conditionally defines HWCAP2_MTE in gdb/arch/aarch64-mte-linux.h, but
that's not the best place for it since it's a definition that should be
used only in native code so move it to gdb/nat/aarch64-mte-linux-ptrace.h.

Introduce an AARCH64_HWCAP2_MTE in gdb/arch/aarch64-mte-linux.h to be used
by target-dependant code.

Similarly, add AARCH64_ prefix to the SEGV_MTEAERR and SEGV_MTESERR
definitions in gdb/arch/aarch64-mte-linux.h.

I noticed that enum class aarch64_memtag_type is only used in native code,
so move its definition to gdb/nat/aarch64-mte-linux-ptrace.h as well.

I also noticed that gdb/aarch64-linux-tdep.h defines
AARCH64_LINUX_SIZEOF_MTE_REGSET which is redundant with
AARCH64_LINUX_SIZEOF_MTE, already defined in gdb/arch/aarch64-mte-linux.h
so consolidate both definitions.

Finally, the include of arch/aarch64-mte-linux.h isn't used in
gdb/aarch64-linux-nat.c nor in gdb/nat/aarch64-mte-linux-ptrace.c so
remove it from them.

Suggested-by: Luis <luis.machado.foss@gmail.com>
Suggested-by: Simon Marchi <simark@simark.ca>
Approved-By: Luis Machado <luis.machado.foss@gmail.com>
3 weeks agoGDB: Add aarch64-fpmr-linux.h to gdb/arch/ and gdb/nat/
Thiago Jung Bauermann [Tue, 17 Feb 2026 04:43:57 +0000 (01:43 -0300)] 
GDB: Add aarch64-fpmr-linux.h to gdb/arch/ and gdb/nat/

GDB conditionally defines HWCAP2_FPMR in gdb/arch/aarch64.h, but that's
not the best place for it since it's a Linux-specific definition.

Add new Linux- and feature-specific headers to contain it, one for
target-dependent code and the other for native code.

The target-dependant code should use AARCH64_HWCAP2_FPMR in
gdb/arch/aarch64-fpmr-linux.h while native code should use HWCAP2_FPMR,
which will hopefully be defined by the system headers but with a backup
definition in gdb/nat/aarch64-fpmr-linux.h if it isn't.

Suggested-by: Luis <luis.machado.foss@gmail.com>
Suggested-by: Simon Marchi <simark@simark.ca>
Approved-By: Luis Machado <luis.machado.foss@gmail.com>
3 weeks agoGDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/
Thiago Jung Bauermann [Tue, 17 Feb 2026 03:19:16 +0000 (00:19 -0300)] 
GDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/

The code supporting Pointer Authentication duplicates the definition of
AARCH64_HWCAP_PACA and of AARCH64_LINUX_SIZEOF_PAUTH between GDB and
gdbserver, so add two new headers to host those definitions.

The target-dependant code should use AARCH64_HWCAP_PACA in
gdb/arch/aarch64-pauth-linux.h while native code should use HWCAP_PACA,
which will hopefully be defined by the system headers but with a backup
definition in gdb/nat/aarch64-pauth-linux.h if it isn't.

Suggested-by: Luis <luis.machado.foss@gmail.com>
Suggested-by: Simon Marchi <simark@simark.ca>
Approved-By: Luis Machado <luis.machado.foss@gmail.com>
3 weeks agoPR 33995 compile failure on DEC Alpha OpenBSD 7.8
Alan Modra [Tue, 17 Mar 2026 00:01:58 +0000 (10:31 +1030)] 
PR 33995 compile failure on DEC Alpha OpenBSD 7.8

The args are only used inside #ifdef TLS.

PR 33995
* bfd.c (bfd_thread_init): Add ATTRIBUTE_UNUSED on args.

3 weeks agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Mar 2026 00:00:07 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 weeks agogdb: remove TYPE_CHAIN
Simon Marchi [Mon, 16 Mar 2026 14:25:23 +0000 (10:25 -0400)] 
gdb: remove TYPE_CHAIN

IMO, there is no point in keeping this macro.  Remove it and access the
field directly.  If we ever want some kind of abstraction in front of
the field, then we'll add a method.

Change-Id: Ia45cc7be5c6d9d09a9d4903f01b1ab282839a9c2
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb: remove TYPE_RVALUE_REFERENCE_TYPE
Simon Marchi [Mon, 16 Mar 2026 14:25:22 +0000 (10:25 -0400)] 
gdb: remove TYPE_RVALUE_REFERENCE_TYPE

IMO, there is no point in keeping this macro.  Remove it and access the
field directly.  If we ever want some kind of abstraction in front of
the field, then we'll add a method.

Change-Id: Ic1e6ee65f7fda78a40e935b1e6a8e3b7ab5540fb
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb: remove TYPE_REFERENCE_TYPE
Simon Marchi [Mon, 16 Mar 2026 14:25:21 +0000 (10:25 -0400)] 
gdb: remove TYPE_REFERENCE_TYPE

IMO, there is no point in keeping this macro.  Remove it and access the
field directly.  If we ever want some kind of abstraction in front of
the field, then we'll add a method.

Change-Id: Iabdb3a3eecd8274ddefc32ad835644bc4a0d2087
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb: remove TYPE_POINTER_TYPE
Simon Marchi [Mon, 16 Mar 2026 14:25:20 +0000 (10:25 -0400)] 
gdb: remove TYPE_POINTER_TYPE

IMO, there is no point in keeping this macro.  Remove it and access the
field directly.  If we ever want some kind of abstraction in front of
the field, then we'll add a method.

Change-Id: I592789130ad81776c7a8b39c4721ebb4aa7293f7
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb: remove TYPE_MAIN_TYPE
Simon Marchi [Mon, 16 Mar 2026 14:25:19 +0000 (10:25 -0400)] 
gdb: remove TYPE_MAIN_TYPE

IMO, there is no point in keeping this macro.  Remove it and access the
field directly.  If we ever want some kind of abstraction in front of
the field, then we'll add a method.

Change-Id: I1076b0e07644afdc0c1f3a4916148d3344a9d395
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb: remove INIT_NONE_SPECIFIC
Simon Marchi [Mon, 16 Mar 2026 14:25:18 +0000 (10:25 -0400)] 
gdb: remove INIT_NONE_SPECIFIC

This macro seems unnecessary.  It is only used right after allocating a
new type, and it only sets some fields to 0, which is the default state
of a struct type anyway.

Change-Id: I9dab6825b07875964505c387daf5f6b1e12c8144
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb, gdbserver, gdbsupport: replace many uses of strcmp with streq
Simon Marchi [Mon, 16 Mar 2026 15:23:19 +0000 (11:23 -0400)] 
gdb, gdbserver, gdbsupport: replace many uses of strcmp with streq

Replace all occurrences of:

  strcmp (...) == 0
  strcmp (...) != 0
  !strcmp (...)
  0 == strcmp (...)
  strcmp (...) directly used as a boolean predicate

with the equivalent expression using streq.

This is for consistency (we already use streq as some places in the
testsuite) but also for clarity.  I think that streq is clearer on the
intent than strcmp.  It's also a bit shorter.

Change-Id: Ibbf5261b1872c240bc0c982c147f6a5477275a91
Approved-By: Andrew Burgess <aburgess@redhat.com>
3 weeks agogdb/dwarf: fix build error with older gcc
Simon Marchi [Mon, 16 Mar 2026 00:12:22 +0000 (20:12 -0400)] 
gdb/dwarf: fix build error with older gcc

With gcc 7.5.0, we get:

      CXX    dwarf2/read.o
    /home/simark/src/binutils-gdb/gdb/dwarf2/read.c: In function ‘void decode_line_header_for_cu(die_info*, dwarf2_cu*, const file_and_directory&)’:
    /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:5796:25: error: unused variable ‘_’ [-Werror=unused-variable]
           auto [_, inserted_]
                             ^

That version of gcc (and earlier) apparently produces unused variable
warnings for unused structured bindings.  Fix it by accessing `.second`
directly to get the "inserted" boolean value.

Change-Id: I6e78c8c317623f3d830fef8d043f85ff789133d4
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81767

3 weeks agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Mar 2026 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 weeks agoPR33919 Out-of-bounds read in XCOFF relocation processing
Alan Modra [Fri, 13 Mar 2026 06:58:28 +0000 (17:28 +1030)] 
PR33919 Out-of-bounds read in XCOFF relocation processing

PR 33919
* coff-rs6000.c (xcoff_calculate_relocation): Don't use explicit
array size.
(xcoff_complain_overflow): Likewise.
(xcoff_rtype2howto): Return a NULL howto rather than aborting.
(_bfd_xcoff_reloc_name_lookup): Use ARRAY_SIZE.
(xcoff_ppc_relocate_section): Sanity check reloc r_type before
accessing xcoff_howto_table.  Print r_type using %#x.  Remove
now redundant later reloc r_type sanity check.
* coff64-rs6000.c: Similarly.
* libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Don't define.
(XCOFF_MAX_COMPLAIN_OVERFLOW): Don't define.

3 weeks agohppa64: Improve compatibility with HP ld on HP-UX
John David Anglin [Sun, 15 Mar 2026 18:12:58 +0000 (14:12 -0400)] 
hppa64: Improve compatibility with HP ld on HP-UX

Provided symbols are revised to match those provided by HP ld.
This fixes startup issues caused by defining __FPU_MODEL,
__libdl_jmp_tbl and __systab.

This change adds the emultempl/hppa64elf.em file.  We now always
link against /lib/pa20_64/milli.a on HP-UX.

HP-UX shared libraries have some unresolved symbols.  So, we also
need to ignore unresolved symbols in shared libraries.

We adjust TEXT_START_ADDR and SHLIB_TEXT_START_ADDR to match the
values used by HP ld.

The .data section is moved to the start of the data segment.

2026-03-15  John David Anglin  <danglin@gcc.gnu.org>

ld/ChangeLog:

* emulparams/elf64hppa.sh (TEXT_START_ADDR): Revise value to match
HP ld value.
(SHLIB_TEXT_START_ADDR): Likewise.
(EXTRA_EM_FILE): Define.
(OTHER_SYMBOLS): Revise to match symbols provided by HP ld.
* emultempl/hppa64elf.em: New file.
* scripttempl/elf64hppa.sc: Move .data to start of segment.

3 weeks agogas: pru: Add flag to select core revision
Dimitar Dimitrov [Fri, 6 Mar 2026 21:40:23 +0000 (23:40 +0200)] 
gas: pru: Add flag to select core revision

Add new command line option to select PRU core revision to assemble for.
This new option is used to limit the available opcodes to what the
selected revision supports.

References:
  - https://www.ti.com/lit/ug/spruij2/spruij2.pdf
    Table 3. PRU Core Revision Comparison
  - https://github.com/TexasInstruments/open-pru/blob/3cffcaae73c708ce15337a9880ec91dc9b03aaa5/docs/PRU%20Assembly%20Instruction%20Cheat%20Sheet.md#core-revision-differences
    Core Revision Differences

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
3 weeks agogdb/linux-tdep: remove linux_get_siginfo_type_with_fields
Simon Marchi [Tue, 10 Mar 2026 17:34:47 +0000 (13:34 -0400)] 
gdb/linux-tdep: remove linux_get_siginfo_type_with_fields

It is unused since the removal of MPX, commit fc14343205d3 ("gdb,
gdbserver, python, testsuite: Remove MPX").

Change-Id: I459220a851389956112ff36d4b6f2a443357e034
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/fbsd-tdep: use builtin integer types
Simon Marchi [Tue, 10 Mar 2026 17:34:46 +0000 (13:34 -0400)] 
gdb/fbsd-tdep: use builtin integer types

Same as the previous patch, but for FreeBSD.

Change-Id: If5a783b0419f74bec4edb99683ef06184775fc52
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/linux-tdep: use builtin integer types
Simon Marchi [Tue, 10 Mar 2026 17:34:45 +0000 (13:34 -0400)] 
gdb/linux-tdep: use builtin integer types

I noticed some spots creating new integer types, where I think we could
use the builtin types created by create_gdbtypes_data instead.

The old code to initialize `short_type` was actually passing the wrong
bit length value, so I think this actually fixes a latent bug, although
it goes away in a subsequent patch.

Change-Id: I8fc71cb75f4450a42f48ba2af5c1163208e58d8c
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agohppa64: Improve HP-UX support and fix some relocation issues
John David Anglin [Sun, 15 Mar 2026 01:03:31 +0000 (21:03 -0400)] 
hppa64: Improve HP-UX support and fix some relocation issues

With this patch, gcc-16 test results are now similar to those
using the HP ld.

The change fixes dynamic symbol handling.  At the moment, we
only have a single stub section and no support for long pc-relative
calls.  So, we only need to redirect pc-relative branches through
the PLT when the call is to a dynamic function.

The change to elf64_hppa_finalize_dynreloc() fixes C++ VTT support.
This fixed many tests in the gcc g++ and libstdc++ testsuites.

The next step is to add support for long pc-relative branches via
the PLT.

2026-03-14  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

* elf64-hppa.c (elf64_hppa_check_relocs): Only set NEED_PLT
and NEED_STUB for symbols with function types.
(elf64_hppa_dynamic_symbol_p): Return false for millicode
symbols.
(allocate_global_data_dlt): Only allocate DLT entries for
symbols that are dynamic or defined.  Clear hh->want_dlt
if we don't want a DLT entry.
(allocate_global_data_plt): Only allocate PLT entries for
dynamic symbols.
(allocate_global_data_stub): Likewise, Only allocate stubs
for dynamic symbols.
(elf64_hppa_create_dynamic_sections): Fix flags for .dynamic
section and remove duplicated flags for other dynamic
sections.
(allocate_dynrel_entries): Fix DLT and PLT allocations.
(elf64_hppa_late_size_sections): Don't sort relocations.
Tweak code to set section used to set __text_seg.
(elf64_hppa_finish_dynamic_symbol): Use eh->dynindx instead
of hh->eh.dynindx.  Don't call elf64_hppa_dynamic_symbol_p
to determine whether PLT entries and stubs need initialization.
(elf64_hppa_finalize_dynreloc): Add rent->addend to value
calculation.
(elf_hppa_remark_useless_dynamic_symbols): Revise symbols
checked.
(elf_hppa_final_link_relocate): Revise code to redirect
pc-relative calls to stubs.
(elf_backend_want_p_paddr_set_to_zero): Define to 1 on HP-UX
target.

3 weeks agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Mar 2026 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 weeks agogdb/linux-tdep: remove linux_collect_thread_registers_ftype typedef
Simon Marchi [Tue, 10 Mar 2026 17:30:35 +0000 (13:30 -0400)] 
gdb/linux-tdep: remove linux_collect_thread_registers_ftype typedef

It is unused.

Change-Id: I4c3ffc6598a12468072cd805ceebca3087e590d9
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/linux-tdep: make linux_find_memory_region_ftype a function_view
Simon Marchi [Tue, 10 Mar 2026 17:30:34 +0000 (13:30 -0400)] 
gdb/linux-tdep: make linux_find_memory_region_ftype a function_view

Make it a function_view and eliminate the `void *` callback data.
Change the callback functions to lambda functions where they are used.

Change-Id: I239b3650783fa06320f85c2a63273346af81344f
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/gcore: check return values of some find_memory_region_ftype calls
Simon Marchi [Tue, 10 Mar 2026 17:30:33 +0000 (13:30 -0400)] 
gdb/gcore: check return values of some find_memory_region_ftype calls

This fixes some spots that didn't check the return value of a
find_memory_region_ftype callback.

Change-Id: Ic57933ce76709ca16c93bc66c21da97afb3163a2
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/linux-tdep: check return value of linux_find_memory_region_ftype callback
Simon Marchi [Tue, 10 Mar 2026 17:30:32 +0000 (13:30 -0400)] 
gdb/linux-tdep: check return value of linux_find_memory_region_ftype callback

I noticed that linux_find_memory_regions_full did not check the return
value of the linux_find_memory_region_ftype callback.  I think this is a
mistake.  When called from linux_find_memory_regions, the
find_memory_region_ftype callback could return false, in which case we
should stop iterating.

This probably didn't matter in practice, as these callbacks generally
don't return false (only in error cases that never happen).

Change-Id: Iafc5a9aae3d955454420d700a23f18de6f0bc267
Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agogdb/dwarf: rename low_set variable in dwarf2_ranges_read
Simon Marchi [Thu, 12 Mar 2026 16:32:03 +0000 (12:32 -0400)] 
gdb/dwarf: rename low_set variable in dwarf2_ranges_read

Rename low_set to low_high_set, to reflect what it really means.

Also, change some manual min/max so use std::min/std::max, I think it
makes the intent clearer.

Change-Id: I9ca81be915962e704becabe78c39b95e0abf561b
Approved-By: Tom de Vries <tdevries@suse.de>
3 weeks agogdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attr...
Simon Marchi [Thu, 12 Mar 2026 16:32:02 +0000 (12:32 -0400)] 
gdb/dwarf: don't pass lowpc/highpc to dwarf2_ranges_read in cooked_indexer::scan_attributes

It's not necessary to pass pointers to those variables
(dwarf2_ranges_read checks then for nullptr), and they are not used.
Remove them.

Change-Id: Id5462d481f209e9546380f52ddeea2eea811f5f3
Approved-By: Tom de Vries <tdevries@suse.de>
3 weeks agogdb/python: add accessor helpers for __dict__ in Python extension objects
Matthieu Longo [Fri, 27 Feb 2026 14:13:26 +0000 (14:13 +0000)] 
gdb/python: add accessor helpers for __dict__ in Python extension objects

Python extension objects that support __dict__ must inherit from
gdbpy_dict_wrapper, a wrapper class that stores the PyObject
corresponding to the __dict__ attribute. Because this dictionary
is not managed directly by Python, each extension objects must
provide appropriate accessors so that attributes stored in __dict__
are looked up correctly.

Currently, management of this dictionary is not centralized, and
each Python extension object implements its own logic to create,
access, and destroy it.

A previous patch centralized the creation logic; this patch focuses
on centralizing the access to the dictionary. It introduces two new
macros:
- gdbpy_dict_wrapper_cfg_dict_getter, which defines a getter for
  __dict__.
- gdbpy_dict_wrapper_getsetattro, which sets tp_getattro and
  tp_setattro in PyTypeObject to gdb_py_generic_getattro and
  gdb_py_generic_setattro, respectively. These helpers already
  centralizes attribute access for Python extension objects having
  a __dict__.
  Note: this macro will eventually be removed once Python extension
  types are migrated to heap-allocated types.

Approved-By: Tom Tromey <tom@tromey.com>
3 weeks agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Mar 2026 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agoRemove type::stub_is_supported
Tom Tromey [Fri, 20 Feb 2026 13:54:36 +0000 (06:54 -0700)] 
Remove type::stub_is_supported

I noticed type::stub_is_supported the other day.  It is only set in a
single spot in the DWARF reader.  And looking at this, the logic seems
backward or confused to me.

type::is_opaque ends with this:

  return this->is_stub () || !this->stub_is_supported ();

That is, a type is opaque if a bunch of conditions are met (earlier in
the method), and then either the type is marked as a stub, or else the
type does not have the stub_is_supported flag set.

However the DWARF reader essentially does this:

  if (something)
    type->set_is_stub (true);
  else
    type->set_stub_is_supported (true);

That is, either one flag or the other is going to be true along this
path.

So maybe this was a workaround for some other reader that doesn't set
the flag.  Luckily, most of the other readers were removed.  Checking
the CTF reader, it seems to correctly set the stub flag for incomplete
types.

So, I think the stub_is_supported machinery can simply be removed now.

Reviewed-By: Keith Seitz <keiths@redhat.com>
4 weeks agoUse dwarf-to-dwarf-assembler.py on dw2-icc-opaque
Tom Tromey [Fri, 20 Feb 2026 13:54:27 +0000 (06:54 -0700)] 
Use dwarf-to-dwarf-assembler.py on dw2-icc-opaque

I ran dwarf-to-dwarf-assembler.py on the output of the dw2-icc-opaque
test.  The test was already architecture-independent, but I think it's
a bit easier to read this way.

I made a couple of tiny edits to the output, that I don't think affect
the test:

* I slightly shortened the producer strings (removing the newline and
  subsequent text)
* I changed a DW_AT_data_member_location to be a constant rather than
  an expression

4 weeks agoPrint overload debug messages to gdb_stdlog
Tom Tromey [Thu, 19 Feb 2026 19:15:05 +0000 (12:15 -0700)] 
Print overload debug messages to gdb_stdlog

I noticed that overload debugging messages go to gdb_stderr.  I think
the usual convention is that debug output goes to gdb_stdlog, so this
patch makes this change.

Reviewed-By: Keith Seitz <keiths@redhat.com>
4 weeks agobinutils/testsuite: don't leave temporary files in main dir
Jan Beulich [Fri, 13 Mar 2026 09:32:42 +0000 (10:32 +0100)] 
binutils/testsuite: don't leave temporary files in main dir

Leaving files in tmpdir/ is generally okay (often intended and helpful),
but the main directory really shouldn't be cluttered.

4 weeks agold/testsuite: don't leave temporary files in main dir
Jan Beulich [Fri, 13 Mar 2026 09:32:19 +0000 (10:32 +0100)] 
ld/testsuite: don't leave temporary files in main dir

Leaving files in tmpdir/ is generally okay (often intended and helpful),
but the main directory really shouldn't be cluttered.

4 weeks agotestsuites: prune checking gas for CFI / SFrame
Jan Beulich [Fri, 13 Mar 2026 09:31:58 +0000 (10:31 +0100)] 
testsuites: prune checking gas for CFI / SFrame

Both leave the generated assembler file around. Maybe that's okay-ish
when left in tmpdir/, but the main directories really shouldn't be
cluttered. The file actually doesn't even need putting there when not
working with a remote host.

The SFrame test additionally leaves an a.out file in the main directory,
then the assembler output isn't really of interest anyway.

4 weeks agotestsuites: prune huge files
Jan Beulich [Fri, 13 Mar 2026 09:31:38 +0000 (10:31 +0100)] 
testsuites: prune huge files

Some tests leave files sometimes well beyond the 10Mb boundary. Remove
those after testing.

4 weeks agobfd: avoid elf-vxworks.c for non-VxWorks targets
Jan Beulich [Fri, 13 Mar 2026 06:52:46 +0000 (07:52 +0100)] 
bfd: avoid elf-vxworks.c for non-VxWorks targets

It is wasteful to build this file when it's not actually used. Limit it to
VxWorks targets and introduce a compiler define (paralleling
OBJ_MAYBE_ELF, as having similar purpose) to guard internals.

By adding more #ifdef-ary, more savings may be possible. For now, besides
those guarding the vector definitions, only ones necessary to avoid the
need for elf_vxworks_*() inline stubs are being added. Somewhat similarly
tighter #ifdef around the definitions of *_elf*_vxworks*_vec (using
HAVE_..._vec) may yield further savings.

4 weeks agobfd: avoid elf-solaris2.c for non-Solaris targets
Jan Beulich [Fri, 13 Mar 2026 06:52:08 +0000 (07:52 +0100)] 
bfd: avoid elf-solaris2.c for non-Solaris targets

Even if small, it is wasteful to build this file when it's not actually
used. Limit it to Solaris targets and introduce a compiler define
(paralleling OBJ_MAYBE_ELF, as having similar purpose) to guard internals.

4 weeks agobfd: avoid elf-sframe.c for SFrame-unaware targets
Jan Beulich [Fri, 13 Mar 2026 06:51:46 +0000 (07:51 +0100)] 
bfd: avoid elf-sframe.c for SFrame-unaware targets

It is wasteful to build this file when it's not actually used. Limit it
to targets actually using SFrame and introduce a compiler define
(paralleling OBJ_MAYBE_ELF, as having similar purpose) to guard internal
function decls.

4 weeks agobfd: avoid elf-attrs.c for ELF-attributes-free targets
Jan Beulich [Fri, 13 Mar 2026 06:51:24 +0000 (07:51 +0100)] 
bfd: avoid elf-attrs.c for ELF-attributes-free targets

It is wasteful to build this file when it's not actually used. Limit it
to targets actually using ELF attributes and introduce a compiler define
(paralleling OBJ_MAYBE_ELF, as having similar purpose) to guard internal
function decls and to provide stubs for exported functions.

4 weeks agogas: conditionalize body of create_obj_attrs_section()
Jan Beulich [Fri, 13 Mar 2026 06:50:45 +0000 (07:50 +0100)] 
gas: conditionalize body of create_obj_attrs_section()

This way bfd_elf_obj_attr_size() and bfd_elf_set_obj_attr_contents() will
remain unused for targets not supporting object attributes, which allows
libbfd to not provide them.

Also correct the surrounding #if-s: OBJ_MAYBE_ELF really needs taking into
consideration as well.

4 weeks agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Mar 2026 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agocheck sframe version in _bfd_elf_parse_sframe
Alan Modra [Thu, 12 Mar 2026 22:25:04 +0000 (08:55 +1030)] 
check sframe version in _bfd_elf_parse_sframe

Currently if you attempt to link an object file with sframe version 2
contents, the linker will complain in _bfd_elf_merge_section_sframe
and fail to produce an output.  This affects anyone who has objects
assembled by binutils-2.45 with .sframe sections.  A work-around is to
pass --discard-sframe to ld.

Ideally the linker would rewrite version 2 sframe input to version 3,
but in the absence of that support it would be nicer if ld just
ignored version 2 (or 1) sframe sections without needing to pass
--discard-sframe.  That is the aim of this patch.

It does so by checking the sframe version in _bfd_elf_parse_sframe
where various failing checks result in an error being printed and the
section not being marked as SEC_INFO_TYPE_SFRAME, but causes no
overall linker failure.  In addition, an sframe version failure now
also marks the sframe section with SEC_EXCLUDE.  This is also done for
other sframe failures.  See the changelog below for other fixes.

bfd/
* elf-sframe.c (_bfd_elf_merge_section_sframe): Don't check
sframe version here.
(_bfd_elf_parse_sframe): Check sframe version here instead.
Do the "already parsed" check first.  Reorder various other
checks.  Do not bother parsing or print errors when
discard_sframe is set.  Free section contents on failure
paths.  Set SEC_EXCLUDE for fails.  Check for NULL bfd_zalloc
return, and only allocate after successfully parsing sframe.
On errors report that the section will be ignored, not "no
.sframe will be created".
binutils/
* testsuite/lib/binutils-common.exp: Ignore sframe version
errors.

4 weeks agoprune_warnings_extra quoting
Alan Modra [Thu, 12 Mar 2026 22:24:05 +0000 (08:54 +1030)] 
prune_warnings_extra quoting

This patch just tidies the code a little.  By using tcl {} quoting
rather than "" we can reduce the need for backslash quoting.

* testsuite/lib/binutils-common.exp (prune_warnings_extra): Use
tcl {} quoting.

4 weeks ago[gdb/testsuite] Handle debuginfod output in gdb.debuginfod/solib-with-dwz.exp
Tom de Vries [Thu, 12 Mar 2026 20:16:59 +0000 (21:16 +0100)] 
[gdb/testsuite] Handle debuginfod output in gdb.debuginfod/solib-with-dwz.exp

I ran into a timeout in test-case gdb.debuginfod/solib-with-dwz.exp.

GDB times out like this:
...
Download failed: Timer expired. \
  Continuing without source file solib-with-dwz-bar.c.
...

My theory is that the download fails because debuginfod becomes unresponsive,
because it's stuck trying to write output into some buffer that is already
full.

Fix this by regularly draining debuginfod output in the test-case, using a new
proc drain_debuginfod.

Debuginfod is run with "-vvvv", which makes it rather verbose, and dropping
that also fixes the timeouts, but it might be useful for debugging, so I went
with the output draining method, and left the "-vvvv" as is.

Reviewed-By: Keith Seitz <keiths@redhat.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33901

4 weeks agoFix the --disable-libctf build
Tom Tromey [Thu, 12 Mar 2026 17:17:31 +0000 (11:17 -0600)] 
Fix the --disable-libctf build

If you configure with --disable-libctf, currently gdb will fail to
build.  The fix is to rename the stub function elfctf_build_psymtabs
to remove the "p".

4 weeks ago[pre-commit] Bump black to 26.3.1
Tom de Vries [Thu, 12 Mar 2026 15:45:30 +0000 (16:45 +0100)] 
[pre-commit] Bump black to 26.3.1

Ran "pre-commit autoupdate".  No changes in formatting.

4 weeks agogdb/dwarf: change dwarf_block_to_fb_offset to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:48 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf_block_to_fb_offset to return bool

Change-Id: If62adeb3bf302de07e0dab46a1b9fad6050df800
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf_block_to_sp_offset to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:47 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf_block_to_sp_offset to return bool

Change-Id: I7607e0b1cbbbb0c7be0ec309d7d936154a910554
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: use true/false in read_gdb_index_from_buffer
Simon Marchi [Wed, 11 Mar 2026 18:05:46 +0000 (14:05 -0400)] 
gdb/dwarf: use true/false in read_gdb_index_from_buffer

Change-Id: I92ee061796705394c8b305599c10b2c9f953ac82
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_frame_ops to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:45 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_frame_ops to return bool

Change-Id: I0531b413823b1edc419be8f4977e9baa9efe3833
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: define type aliases for dwarf2_frame_ops function types
Simon Marchi [Wed, 11 Mar 2026 18:05:44 +0000 (14:05 -0400)] 
gdb/dwarf: define type aliases for dwarf2_frame_ops function types

This makes the code less verbose, and I think more readable.

Change-Id: I715669281d341bd15547e3eba82c716a953f2274
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change piece_end_p to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:43 +0000 (14:05 -0400)] 
gdb/dwarf: change piece_end_p to return bool

Change-Id: Ia8f7f5a88161901f32415f16a0f911aeee50b6a8
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_frame_signal_frame_p to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:42 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_frame_signal_frame_p to return bool

Change-Id: Iaa387e7c3eca9c8a131798442adcf0136e9eb16c
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change base_types_equal_p to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:41 +0000 (14:05 -0400)] 
gdb/dwarf: change base_types_equal_p to return bool

Change-Id: I66f13baf8fe2b15fa2bab9f3dcb60c3ad9e91d6a
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_locexpr_baton_eval to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:40 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_locexpr_baton_eval to return bool

Change-Id: Ib22b4ca4365e9943cc17b0d510bf5590842eb258
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_fetch_cfa_info to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:39 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_fetch_cfa_info to return bool

Change-Id: I4d5dc288c6ade399e62c73dcb21eebfe2ae16bb7
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change call_site_parameter_matches to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:38 +0000 (14:05 -0400)] 
gdb/dwarf: change call_site_parameter_matches to return bool

Change-Id: Ic131c1752151a1b275c06c3dc92d86bcc925d6f7
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change frame_is_tailcall to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:37 +0000 (14:05 -0400)] 
gdb/dwarf: change frame_is_tailcall to return bool

Change-Id: Icc70cb565ece0f04fbd8950cf6ff41f9b3e2c242
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change unavailable_retaddr and undefined_retaddr to bool
Simon Marchi [Wed, 11 Mar 2026 18:05:36 +0000 (14:05 -0400)] 
gdb/dwarf: change unavailable_retaddr and undefined_retaddr to bool

Change-Id: I928e9244aee156501e0c2318f2a58b26ed00add7
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_ranges_read to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:35 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_ranges_read to return bool

Also, do some little cleanups in the function itself.

Change-Id: I83928a31dcdcae34b651828fef27b1fa877241eb
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_ranges_process to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:34 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_ranges_process to return bool

Change-Id: I7472405cf276a336247fd47bf1126eaf21b05b92
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change prototyped_function_p to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:33 +0000 (14:05 -0400)] 
gdb/dwarf: change prototyped_function_p to return bool

Change-Id: I4a6f6c2d063be780c4d740b8bac2d2d92d42001e
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change is_vtable_name to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:32 +0000 (14:05 -0400)] 
gdb/dwarf: change is_vtable_name to return bool

Change-Id: Ib14b18b75ddfc308b9987cd9102f0f721c91a3b1
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_is_constructor to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:31 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_is_constructor to return bool

Change-Id: I207d368269494a4a36884847f4474e2f6c326511
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change attr_to_dynamic_prop to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:30 +0000 (14:05 -0400)] 
gdb/dwarf: change attr_to_dynamic_prop to return bool

Change-Id: I80fc429cd15328c5dfd1f4e7f87ad83368bcb28d
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change need_gnat_info to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:29 +0000 (14:05 -0400)] 
gdb/dwarf: change need_gnat_info to return bool

Change-Id: I0bc5930cc3b30986682d50f5eaad39fb74b2db8e
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change die_is_declaration to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:28 +0000 (14:05 -0400)] 
gdb/dwarf: change die_is_declaration to return bool

Change-Id: I20f9f5b273a2cb8d24b590447a86bf1575d21ddc
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change dwarf2_flag_true_p to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:27 +0000 (14:05 -0400)] 
gdb/dwarf: change dwarf2_flag_true_p to return bool

Change-Id: Ie60d5d715171f7482f77598553e9236c3fe94ab1
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb/dwarf: change die_needs_namespace to return bool
Simon Marchi [Wed, 11 Mar 2026 18:05:26 +0000 (14:05 -0400)] 
gdb/dwarf: change die_needs_namespace to return bool

Change the return type to bool, and do some other trivial refactoring:

 - remove unnecessary `attr` variable, which I don't think helps code
   readability
 - change an `if (cond) return false; return true` pattern to be just
   one return expression.

Change-Id: I647c3ad73af94bb76c4b59f580bbdfd1eef45888
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agogdb: fix build failure on armhf
Matthieu Longo [Thu, 12 Mar 2026 10:18:59 +0000 (10:18 +0000)] 
gdb: fix build failure on armhf

armhf build fails because the implicit conversion operator from
rgb_color to `uint8_t *' introduces an ambiguity.

In ./gdb/tui/tui-io.c, expressions such as:

  init_color (next, rgb[0] * 1000 / 255, rgb[1] * 1000 / 255, ...

become ambiguous between:

  constexpr uint8_t& rgb_color::operator[](std::size_t)’
  operator[](uint8_t* {aka unsigned char*}, int) (built-in)

leading to a build error:

  error: ISO C++ says that these are ambiguous

Fix the issue by removing the unused implicit conversion operator.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
Approved-By: Tom Tromey <tom@tromey.com>
4 weeks agooss-fuzz addr2line mips32_64bit_reloc out-of-bounds accesses
Alan Modra [Thu, 12 Mar 2026 07:53:28 +0000 (18:23 +1030)] 
oss-fuzz addr2line mips32_64bit_reloc out-of-bounds accesses

The code sign extending the low 32 bits into the high 32 bits in this
function does not have any address checking as it ignores the result
from bfd_perform_relocation.  Even if it did take notice that isn't
sufficient.  In little-endian mode a testcase could be crafted with
the low word at the end of a section which would put the high word out
of bounds.

I notice also that mips32_64bit_reloc is called from a rela R_MIPS_64
reloc howto.  Using a rel R_MIPS_32 howto for the lower word can't be
correct as it retrieves the addend from section contents rather than
the reloc.

Fix both of these problems by performing the entire normal 64-bit
relocation first rather than trying to be clever doing it by pieces.
Nowadays config.bfd ensures that mips elf targets always have a 64-bit
bfd.

Also, don't trim addends to 32 bits for relocatable linking or gas.
That doesn't seem necessary and in any case wasn't done properly for
the rela case, where the addend is not in section contents but in the
relocation.  Note that relocatable linking will usually be done by
elfxx-mips.c:_bfd_mips_elf_relocate_section.  The main use of these
howtos is in gas and bfd_simple_get_relocated_section_contents.

* elf32-mips.c (mips32_64bit_reloc): Rewrite.

4 weeks agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Mar 2026 00:00:08 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 weeks agogdb/dwarf: remove unneeded scopes in dwarf2_frame_cache
Simon Marchi [Wed, 11 Mar 2026 20:40:39 +0000 (16:40 -0400)] 
gdb/dwarf: remove unneeded scopes in dwarf2_frame_cache

These scopes exist only to declare locally some loop variables.  Declare
the variables in the for loops and remove the scopes.

Change-Id: I829916cdbfd90d4e0ae5e9054e09a133facd29eb

4 weeks agoMAINTAINERS: Add myself as a PRU maintainer
Dimitar Dimitrov [Wed, 11 Mar 2026 18:24:52 +0000 (20:24 +0200)] 
MAINTAINERS: Add myself as a PRU maintainer

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
4 weeks agoUse type::safe_name in a couple spots
Tom Tromey [Wed, 11 Mar 2026 15:32:23 +0000 (09:32 -0600)] 
Use type::safe_name in a couple spots

I found a couple of spots that explicitly check the type's name, but
where type::safe_name seems more suitable.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoAvoid use of alloca in read_array_type
Tom Tromey [Wed, 11 Mar 2026 13:50:25 +0000 (07:50 -0600)] 
Avoid use of alloca in read_array_type

I think alloca should generally be avoided, and the use in
dwarf2/read.c:read_array_type is easily replaced with a local storage
object.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoDo not reuse 'attr' in read_array_type
Tom Tromey [Wed, 11 Mar 2026 13:46:11 +0000 (07:46 -0600)] 
Do not reuse 'attr' in read_array_type

I was looking at dwarf2/read.c:read_array_type and I thought it would
be nicer if the 'attr' wasn't reused.  This patch changes it to be
redeclared in every 'if' where it is used, making it clear that its
value is local to just the one block.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoMIPS/BFD: Make `_bfd_mips_elf_sign_extend' static inline
Maciej W. Rozycki [Wed, 11 Mar 2026 16:30:29 +0000 (16:30 +0000)] 
MIPS/BFD: Make `_bfd_mips_elf_sign_extend' static inline

Let the function be inlined from outside elfxx-mips.c as well, avoiding
the call overhead for a simple arithmetic calculation, though we have no
such user at the moment.

4 weeks agoMIPS/BFD: Use branchless code for sign-extension
Maciej W. Rozycki [Wed, 11 Mar 2026 16:30:29 +0000 (16:30 +0000)] 
MIPS/BFD: Use branchless code for sign-extension

Use common branchless code for `_bfd_mips_elf_sign_extend', typically
avoiding the branch penalty and also reducing code size when inlined in
elfxx-mips.c.

4 weeks agoReturn bool from array_type_has_dynamic_stride
Tom Tromey [Wed, 11 Mar 2026 14:43:30 +0000 (08:43 -0600)] 
Return bool from array_type_has_dynamic_stride

This changes array_type_has_dynamic_stride to return bool.
I'm checking this in as obvious.

4 weeks agoUse bool in ada-valprint.c
Tom Tromey [Tue, 10 Mar 2026 14:52:52 +0000 (08:52 -0600)] 
Use bool in ada-valprint.c

This changes some functions in ada-valprint.c to use bool, for both
parameter and return types.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn void from ada-valprint.c:print_optional_low_bound
Tom Tromey [Tue, 10 Mar 2026 14:49:28 +0000 (08:49 -0600)] 
Return void from ada-valprint.c:print_optional_low_bound

This changes ada-valprint.c:print_optional_low_bound to return void.
At first I was going to have it return bool, but then I noticed the
return value is never used.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoUse bool return types in ada-typeprint.c
Tom Tromey [Tue, 10 Mar 2026 14:48:11 +0000 (08:48 -0600)] 
Use bool return types in ada-typeprint.c

This changes some functions in ada-typeprint.c to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada-lang.c:scan_discrim_bound
Tom Tromey [Tue, 10 Mar 2026 14:25:47 +0000 (08:25 -0600)] 
Return bool from ada-lang.c:scan_discrim_bound

This changes ada-lang.c:scan_discrim_bound to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from valid_task_id
Tom Tromey [Tue, 10 Mar 2026 14:15:24 +0000 (08:15 -0600)] 
Return bool from valid_task_id

This changes valid_task_id to return bool and updates some callers.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from two Ada exception-related functions
Tom Tromey [Tue, 10 Mar 2026 14:12:12 +0000 (08:12 -0600)] 
Return bool from two Ada exception-related functions

This changes a couple of exception-related functions in ada-lang.c to
return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada-lang.c:is_known_support_routine
Tom Tromey [Tue, 10 Mar 2026 14:11:12 +0000 (08:11 -0600)] 
Return bool from ada-lang.c:is_known_support_routine

This changes ada-lang.c:is_known_support_routine to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada_has_this_exception_support
Tom Tromey [Tue, 10 Mar 2026 14:10:27 +0000 (08:10 -0600)] 
Return bool from ada_has_this_exception_support

This changes ada_has_this_exception_support to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from two Ada "redundancy" predicates
Tom Tromey [Tue, 10 Mar 2026 14:06:07 +0000 (08:06 -0600)] 
Return bool from two Ada "redundancy" predicates

This changes a couple more Ada type predicates to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada-lang.c:is_dynamic_field
Tom Tromey [Tue, 10 Mar 2026 14:04:37 +0000 (08:04 -0600)] 
Return bool from ada-lang.c:is_dynamic_field

This changes ada-lang.c:is_dynamic_field to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada_prefer_type
Tom Tromey [Tue, 10 Mar 2026 14:03:43 +0000 (08:03 -0600)] 
Return bool from ada_prefer_type

This changes ada_prefer_type to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada-lang.c:find_struct_field
Tom Tromey [Tue, 10 Mar 2026 14:02:05 +0000 (08:02 -0600)] 
Return bool from ada-lang.c:find_struct_field

This changes ada-lang.c:find_struct_field to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada_scan_number
Tom Tromey [Tue, 10 Mar 2026 14:00:49 +0000 (08:00 -0600)] 
Return bool from ada_scan_number

This changes ada_scan_number to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from ada_in_variant
Tom Tromey [Tue, 10 Mar 2026 13:59:50 +0000 (07:59 -0600)] 
Return bool from ada_in_variant

This changes ada_in_variant to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoReturn bool from more Ada type predicates
Tom Tromey [Tue, 10 Mar 2026 13:58:37 +0000 (07:58 -0600)] 
Return bool from more Ada type predicates

This changes various Ada type predicates to return bool.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
4 weeks agoUse bool in ada_is_tagged_type
Tom Tromey [Tue, 10 Mar 2026 13:55:47 +0000 (07:55 -0600)] 
Use bool in ada_is_tagged_type

This changes ada_is_tagged_type to use 'bool' for its return and
parameter type, and then also changes ada_lookup_struct_elt_type to
propagate the boolean-ness.

Approved-By: Simon Marchi <simon.marchi@efficios.com>