public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/28681] Wrong pretty-printed unique_ptr value when using "finish" Date: Mon, 14 Mar 2022 10:39:04 +0000 [thread overview] Message-ID: <bug-28681-4717-LdWyYAcpnI@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28681-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28681 --- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Luis Machado <luisgpm@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bab22d0640914384d467e09c3e796585fd08e7c6 commit bab22d0640914384d467e09c3e796585fd08e7c6 Author: Luis Machado <luis.machado@arm.com> Date: Tue Jan 4 14:06:36 2022 -0300 [aarch64/arm] Properly extract the return value returned in memory When running gdb.cp/non-trivial-retval.exp, the following shows up for both aarch64-linux and armhf-linux: Breakpoint 3, f1 (i1=23, i2=100) at src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:35 35 A a; (gdb) finish Run till exit from #0 f1 (i1=23, i2=100) at src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:35 main () at /src/gdb/testsuite/gdb.cp/non-trivial-retval.cc:163 163 B b = f2 (i1, i2); Value returned is $6 = {a = -11952} (gdb) The return value should be {a = 123} instead. This happens because the backends don't extract the return value from the correct location. GDB should fetch a pointer to the memory location from X8 for aarch64 and r0 for armhf. With the patch, gdb.cp/non-trivial-retval.exp has full passes on aarch64-linux and armhf-linux on Ubuntu 20.04/18.04. The problem only shows up with the "finish" command. The "call" command works correctly and displays the correct return value. This is also related to PR gdb/28681 (https://sourceware.org/bugzilla/show_bug.cgi?id=28681) and fixes FAIL's in gdb.ada/mi_var_array.exp. A new testcase is provided, and it exercises GDB's ability to "finish" a function that returns a large struct (> 16 bytes) and display the contents of this struct correctly. This has always been incorrect for these backends, but no testcase exercised this particular scenario. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-03-14 10:39 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-10 17:02 [Bug gdb/28681] New: " simark at simark dot ca 2021-12-12 17:05 ` [Bug gdb/28681] " ssbssa at sourceware dot org 2021-12-13 16:37 ` aburgess at redhat dot com 2021-12-13 16:50 ` aburgess at redhat dot com 2021-12-13 17:31 ` aburgess at redhat dot com 2021-12-13 18:22 ` simark at simark dot ca 2021-12-14 9:50 ` aburgess at redhat dot com 2021-12-14 13:52 ` simark at simark dot ca 2021-12-15 17:39 ` aburgess at redhat dot com 2021-12-23 12:15 ` cvs-commit at gcc dot gnu.org 2021-12-23 12:16 ` aburgess at redhat dot com 2021-12-23 13:05 ` simon.marchi at polymtl dot ca 2022-03-14 10:39 ` cvs-commit at gcc dot gnu.org [this message] 2022-11-14 21:23 ` cvs-commit 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-28681-4717-LdWyYAcpnI@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).