public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/29247] [gdb, tdep] ../../gdb/ppc-sysv-tdep.c:1945: internal-error: ppc64_sysv_abi_return_value: Assertion `ok' failed
Date: Wed, 15 Jun 2022 22:47:53 +0000	[thread overview]
Message-ID: <bug-29247-4717-BlMbtfBm35@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29247-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29247

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
I finally remembered that I can use osc to build the gdb package for the
tumbleweed distro, even if the powerpc machine isn't running tumbleweed.

So, I managed to reproduce with the possibility to debug and try out fixes.

As a first try, I added this code:
...
  if (tdep->elf_abi == POWERPC_ELF_V2
      && TYPE_LENGTH (valtype) == 16
      && valtype->code () == TYPE_CODE_FLT
      && (gdbarch_long_double_format (gdbarch)
          == floatformats_ia64_quad))
    {
      int regnum = tdep->ppc_vsr0_regnum + 32 + 2 + index;

      if (writebuf != NULL)
        {
          regcache->cooked_write (regnum, writebuf);
        }
      if (readbuf != NULL)
        {
          regcache->cooked_read (regnum, readbuf);
        }
      return 1;
    }
...
and that fixes the problem at hand, iow:
...
$ gdb -q -batch -ex start -ex "p t_structs_ldc(struct_val1)" \ 
    ./gdb/testsuite.unix.-m64/outputs/gdb.base/callfuncs/callfuncs
Temporary breakpoint 1 at 0x4ce4: file gdb/testsuite/gdb.base/callfuncs.c, line
647.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Temporary breakpoint 1, main () at
/home/abuild/rpmbuild/BUILD/gdb-11.1/gdb/testsuite/gdb.base/callfuncs.c:647
647       void *p = malloc (1);
$1 = 5 + 5i
...

I'm not sure if the tdep->elf_abi == POWERPC_ELF_V2 and
gdbarch_long_double_format (gdbarch) == floatformats_ia64_quad are both
necessary.

Still, four fails lefts:
...
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc1, ldc2)
FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc2,
ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3,
ldc4)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc1,
ldc2)
FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1,
ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2,
ldc3, ldc4)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-06-15 22:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  8:58 [Bug tdep/29247] New: " vries at gcc dot gnu.org
2022-06-14 14:51 ` [Bug tdep/29247] " vries at gcc dot gnu.org
2022-06-15 11:59 ` vries at gcc dot gnu.org
2022-06-15 13:27 ` vries at gcc dot gnu.org
2022-06-15 14:47 ` vries at gcc dot gnu.org
2022-06-15 14:51 ` vries at gcc dot gnu.org
2022-06-15 15:49 ` vries at gcc dot gnu.org
2022-06-15 15:59 ` vries at gcc dot gnu.org
2022-06-15 22:47 ` vries at gcc dot gnu.org [this message]
2022-06-16 13:53 ` jamborm at gcc dot gnu.org
2022-06-20 12:25 ` ulrich.weigand at de dot ibm.com
2022-06-21 16:32 ` cel at us dot ibm.com
2022-06-23 15:19 ` cel at us dot ibm.com
2022-06-23 15:22 ` cel at us dot ibm.com
2022-06-23 15:30 ` ulrich.weigand at de dot ibm.com
2022-06-23 19:56 ` cel at us dot ibm.com
2022-06-24  0:53 ` cel at us dot ibm.com
2022-06-24 11:53 ` ulrich.weigand at de dot ibm.com
2022-06-25  0:42 ` cel at us dot ibm.com
2022-06-25  2:51 ` ulrich.weigand at de dot ibm.com
2022-06-30 22:47 ` cel at us dot ibm.com
2022-07-12  9:15 ` ulrich.weigand at de dot ibm.com
2022-07-13 17:46 ` cel at us dot ibm.com
2022-07-15 15:32 ` cel at us dot ibm.com
2022-07-15 16:09 ` cel at us dot ibm.com
2022-07-27  8:45 ` vries at gcc dot gnu.org
2022-07-27 15:38 ` cel at us dot ibm.com
2022-07-27 15:42 ` vries at gcc dot gnu.org
2022-07-27 16:54 ` cel at us dot ibm.com
2022-09-02 12:55 ` vries at gcc dot gnu.org
2022-09-02 13:09 ` vries at gcc dot gnu.org

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-29247-4717-BlMbtfBm35@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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).