Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Fix ODR violations in regformat target descriptions
Date: Thu, 18 Jun 2026 07:23:54 -0700	[thread overview]
Message-ID: <cover.1781792506.git.keiths@redhat.com> (raw)

Commit 1a5362ce51ef ("gdb, gdbserver: propagate use of target_desc unique
pointers") changd most target descriptions to "const_target_desc_up," but
deliberately left gdb/regformats/regdat.sh unchanged because those descriptions
were still emitted as file-local static "struct target_desc" objects declared
"const struct target_desc *".

That mismatch breaks gdbserver on ppc64le when LTO is enabled. The shared
header gdb/arch/ppc-linux-tdesc.h declares symbols such as
"tdesc_powerpc_isa207_htm_vsx64l" as "const_target_desc_up," while regdat-
generated translation units still define them as raw pointers. This reintroduces
previously settled ODR violations.

This series updates regdat.sh to generate code consistent with the unique-pointer
API, then updates gdbserver targets that declare those symbols locally.

There are no intended user-visible changes.

Keith

Keith Seitz (2):
  regdat.sh: generate const_target_desc_up for register descriptions
  [gdbserver] Use const_target_desc_up for regformat tdescs

 gdb/regformats/regdat.sh          | 13 +++---
 gdbserver/linux-ia64-low.cc       |  5 ++-
 gdbserver/linux-m68k-low.cc       |  5 ++-
 gdbserver/linux-microblaze-low.cc |  6 +--
 gdbserver/linux-mips-low.cc       | 11 ++---
 gdbserver/linux-or1k-low.cc       |  5 ++-
 gdbserver/linux-s390-ipa.cc       | 39 ++++++++---------
 gdbserver/linux-s390-low.cc       | 69 ++++++++++++++++---------------
 gdbserver/linux-s390-tdesc.h      | 34 +++++++--------
 gdbserver/linux-sh-low.cc         |  5 ++-
 gdbserver/linux-sparc-low.cc      |  5 ++-
 gdbserver/linux-xtensa-low.cc     |  5 ++-
 12 files changed, 105 insertions(+), 97 deletions(-)


base-commit: ada409879cc393c4cf633efe3d7afb716523f6be
-- 
2.53.0


             reply	other threads:[~2026-06-18 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 14:23 Keith Seitz [this message]
2026-06-18 14:23 ` [PATCH 1/2] regdat.sh: generate const_target_desc_up for register descriptions Keith Seitz
2026-06-18 15:52   ` Simon Marchi
2026-06-18 14:23 ` [PATCH 2/2] [gdbserver] Use const_target_desc_up for regformat tdescs Keith Seitz
2026-06-18 15:57 ` [PATCH 0/2] Fix ODR violations in regformat target descriptions Simon Marchi
2026-06-18 17:10   ` Tom Tromey
2026-07-07 19:49     ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1781792506.git.keiths@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox