From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB2613858002; Mon, 14 Nov 2022 21:23:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB2613858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668461026; bh=CP87PiHY2zlgohZiRq5hTVQxWdHe/ThczVz0uvhCmrU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xax2i/CQl/LPekouFXctNIFzN4GwqD1lLb3lqQihTKDV/1I7JtBRbEtItPUFidAAK rPUSfBJ2V7YRX3cWwPjNTYD0AE7wdHtp8AzdEK/BJ6e4fizxT4RnDP2W4O0XC966Wn cVFPcujHCUOa9/3M38D/+wgQieeVX072LDqRRqOw= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/28681] Wrong pretty-printed unique_ptr value when using "finish" Date: Mon, 14 Nov 2022 21:23:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28681 --- Comment #12 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Carl Love : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D24b27e5e9b6b= f5a37fb39dfca151722bb801cbaa commit 24b27e5e9b6bf5a37fb39dfca151722bb801cbaa Author: Carl Love Date: Mon Nov 14 16:22:11 2022 -0500 PowerPC, function ppc64_sysv_abi_return_value add missing return value convention This patch address five testcase failures in gdb.cp/non-trivial-retval.= exp. The following commit resulted in the five testcases failures on PowerPC. The value returned by the function is being reported incorrectly. commit b1718fcdd1d2a5c514f8ee504ba07fb3f42b8608 Author: Andrew Burgess Date: Mon Dec 13 16:56:16 2021 +0000 gdb: on x86-64 non-trivial C++ objects are returned in memory Fixes PR gdb/28681. It was observed that after using the `finish` command an incorrect value was displayed in some cases.=20 Specifically, this behaviour was observed on an x86-64 target. The function: enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *write= buf) should return RETURN_VALUE_STRUCT_CONVENTION if the valtype->code() is TYPE_CODE_STRUCT and if the language_pass_by_reference is not trivially_copyable. This patch adds the needed code to return the value RETURN_VALUE_STRUCT_CONVENTION in this case. With this patch, the five test cases still fail but with the message "V= alue returned has type: A. Cannot determine contents". The PowerPC ABI stor= es the address of the buffer containing the function return value in regis= ter r3 on entry to the function. However, the PowerPC ABI does not guarent= ee that r3 will not be modified in the function. So when the function returns, the return buffer address cannot be reliably obtained from register r3. Thus the message "Cannot determine contents" is appropriate in this cas= e. --=20 You are receiving this mail because: You are on the CC list for the bug.=