From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: Florian Fuchs <fuchsfl@gmail.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Andreas Arnez <arnez@linux.ibm.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Subject: Re: [PATCH] gdb/s390-linux-nat.c: use gdb_fpregset_t to fix build with musl
Date: Wed, 11 Nov 2026 14:52:15 +0000 [thread overview]
Message-ID: <2e5574181efc6bc13a06f586f5de8d099a04f35c.camel@de.ibm.com> (raw)
In-Reply-To: <20261110180332.2998111-1-fuchsfl@gmail.com>
Florian Fuchs <fuchsfl@gmail.com> wrote:
>gdb/gregset.h declares supply_fpregset and fill_fpregset with
>gdb_fpregset_t, which nm-linux.h defines as elf_fpregset_t. The s390
>native target defines them with fpregset_t instead. On glibc the two
>are the same type, so this goes unnoticed. On musl they are distinct
>types, so the definitions in s390-linux-nat.c become separate
>overloads, and the calls in proc-service.c find no definition:
>
>ld: proc-service.o: in function `ps_lgetfpregs':
>proc-service.c:(.text+0x3f0): undefined reference to
> `fill_fpregset(regcache const*, elf_fpregset_t*, int)'
>ld: proc-service.o: in function `ps_lsetfpregs':
>proc-service.c:(.text+0x426): undefined reference to
> `supply_fpregset(regcache*, elf_fpregset_t const*)'
>
>Use gdb_fpregset_t in the definitions and the local buffers, like
other
>Linux native targets do, so they match the declarations in gregset.h.
You're right that this is correct thing to do, and your patch looks
good to me.
However, I think we should do the same for supply_gregset and
fill_gregset - they should use gdb_gregset_t instead of
gregset_t. It seems that these types are currently considered
identical even in their musl definitions, but still it would be
more consistent to make that change as well while we're at it.
Bye,
Ulrich
prev parent reply other threads:[~2026-11-11 14:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:03 Florian Fuchs
2026-11-11 14:52 ` Ulrich Weigand [this message]
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=2e5574181efc6bc13a06f586f5de8d099a04f35c.camel@de.ibm.com \
--to=ulrich.weigand@de.ibm.com \
--cc=arnez@linux.ibm.com \
--cc=fuchsfl@gmail.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