Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix ODR violations in regformat target descriptions
@ 2026-06-18 14:23 Keith Seitz
  2026-06-18 14:23 ` [PATCH 1/2] regdat.sh: generate const_target_desc_up for register descriptions Keith Seitz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Keith Seitz @ 2026-06-18 14:23 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-07 19:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18 14:23 [PATCH 0/2] Fix ODR violations in regformat target descriptions Keith Seitz
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox