From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5964C3856244; Wed, 15 Jun 2022 22:47:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5964C3856244 From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 22:47:53 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29247 --- Comment #7 from Tom de Vries --- 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 =3D=3D POWERPC_ELF_V2 && TYPE_LENGTH (valtype) =3D=3D 16 && valtype->code () =3D=3D TYPE_CODE_FLT && (gdbarch_long_double_format (gdbarch) =3D=3D floatformats_ia64_quad)) { int regnum =3D tdep->ppc_vsr0_regnum + 32 + 2 + index; if (writebuf !=3D NULL) { regcache->cooked_write (regnum, writebuf); } if (readbuf !=3D 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)" \=20 ./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 =3D malloc (1); $1 =3D 5 + 5i ... I'm not sure if the tdep->elf_abi =3D=3D POWERPC_ELF_V2 and gdbarch_long_double_format (gdbarch) =3D=3D 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, ldc= 3, 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(ld= c1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc= 2, ldc3, ldc4) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=