public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cel at us dot ibm.com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug tdep/29543] [gdb/tdep, ppc] inferior call with long double vararg not handled correctly Date: Wed, 07 Sep 2022 18:22:49 +0000 [thread overview] Message-ID: <bug-29543-4717-HVLg8qrZaf@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29543-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29543 --- Comment #13 from Carl E Love <cel at us dot ibm.com> --- I ran the following on a Power 10 system with: Fedora release 36 (Thirty Six) gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-1) Initially with the current gdb tree, the top commit was: commit d647c797b7386dcaca5984a3fbe9fba469771737 (origin/master, origin/HEAD) Author: Aaron Merey <amerey@redhat.com> Date: Fri Sep 2 19:01:56 2022 -0400 Add debuginfod support for objdump -S ... The make check RUNTESTFLAGS='GDB=/home/carll/bin/gdb gdb.base/varargs.exp ' test was used. The results from the test in gdb/testsuite/gdb.log were: gdb) FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4) testcase /home/carll/GDB/binutils-gdb-bug-29247/gdb/testsuite/gdb.base/varargs.exp completed in 0 seconds === gdb Summary === # of expected passes 10 # of unexpected failures 1 gdb reported one failure as expected. ----------------- From Tom's patch, I added just the gdb code change: --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -1444,7 +1444,7 @@ ppc64_sysv_abi_push_param (struct gdbarch *gdbarch, == floatformats_ieee_quad)) { /* IEEE FLOAT128, args in vector registers. */ - ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos); + ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 16, argpos); ppc64_sysv_abi_push_vreg (gdbarch, val, argpos); } The gdb test now passes with: === gdb Summary === # of expected passes 11 as expected. --------------------- Add just the testcase changes for the long double _Complex case, i.e. no additional gdb functional changes. The results of the run were: (gdb) FAIL: gdb.base/varargs.exp: print find_max_struct_long_double_real(4, sldc1, sldc2, sldc3, sldc4) testcase /home/carll/GDB/binutils-gdb-bug-29247/gdb/testsuite/gdb.base/varargs.exp completed in 1 seconds === gdb Summary === # of expected passes 11 # of unexpected failures 1 Which generates the error as Ulrich expected. ---------------------- Added the additional fixes from Tom's patch to address the complex case. The results of the gdb test was: === gdb Summary === # of expected passes 12 With Tom's additional fixes, the updated testcase also passes. Tom's patch works with elf v2 and the gcc version 12 built to default to 128-bit IEEE long double. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-09-07 18:22 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-02 13:00 [Bug tdep/29543] New: [gdb/tdep] inferior call with complex " vries at gcc dot gnu.org 2022-09-02 13:07 ` [Bug tdep/29543] " vries at gcc dot gnu.org 2022-09-02 13:10 ` [Bug tdep/29543] [gdb/tdep, ppc] " vries at gcc dot gnu.org 2022-09-02 13:16 ` vries at gcc dot gnu.org 2022-09-02 13:26 ` [Bug tdep/29543] [gdb/tdep, ppc] inferior call with " vries at gcc dot gnu.org 2022-09-02 15:14 ` vries at gcc dot gnu.org 2022-09-04 7:49 ` vries at gcc dot gnu.org 2022-09-04 7:56 ` vries at gcc dot gnu.org 2022-09-05 16:23 ` uweigand at gcc dot gnu.org 2022-09-06 5:44 ` vries at gcc dot gnu.org 2022-09-07 12:10 ` uweigand at gcc dot gnu.org 2022-09-07 13:46 ` vries at gcc dot gnu.org 2022-09-07 15:33 ` cel at us dot ibm.com 2022-09-07 17:16 ` vries at gcc dot gnu.org 2022-09-07 18:22 ` cel at us dot ibm.com [this message] 2022-09-12 9:05 ` vries at gcc dot gnu.org 2022-09-16 15:12 ` vries at gcc dot gnu.org 2022-09-16 16:38 ` cel at us dot ibm.com 2022-11-15 0:55 ` cel at us dot ibm.com
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=bug-29543-4717-HVLg8qrZaf@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).