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 v2] gdb/s390-linux-nat: use gdb_{g,fp}regset_t to fix build with musl
Date: Thu, 12 Nov 2026 15:40:56 +0000 [thread overview]
Message-ID: <a0411a31f44c104ceb8bb350ff2d25c64492721c.camel@de.ibm.com> (raw)
In-Reply-To: <20261111214823.3098813-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.
>For consistency, do the same for supply_gregset and fill_gregset with
>gdb_gregset_t. gregset_t and elf_gregset_t are currently the same type
>on both glibc and musl, so this part is not needed to fix the build.
>
>Tested by cross-building and running GDB for s390x with musl and
glibc.
>
>Signed-off-by: Florian Fuchs <fuchsfl@gmail.com>
Approved-By: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Thanks,
Ulrich
prev parent reply other threads:[~2026-11-12 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:48 [PATCH v2] gdb/s390-linux-nat: use gdb_{g, fp}regset_t " Florian Fuchs
2026-11-12 15:40 ` 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=a0411a31f44c104ceb8bb350ff2d25c64492721c.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