Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Fix unwinding when restoring a register from one of a greater size
Date: Wed, 10 Sep 2025 19:46:42 -0700	[thread overview]
Message-ID: <20250910194642.29b1e64f@f41-zbm-amd> (raw)
In-Reply-To: <87ecsnptst.fsf@redhat.com>

On Wed, 03 Sep 2025 14:08:50 +0100
Andrew Burgess <aburgess@redhat.com> wrote:

> > diff --git a/gdb/testsuite/gdb.arch/aarch64-frameptr-vecreg-unwind.exp
> > b/gdb/testsuite/gdb.arch/aarch64-frameptr-vecreg-unwind.exp new file
> > mode 100644 index 00000000000..32db95fa4fe
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.arch/aarch64-frameptr-vecreg-unwind.exp
> > @@ -0,0 +1,45 @@
> > +# Copyright 2025 Free Software Foundation, Inc.
> > +
> > +# This program is free software; you can redistribute it and/or modify
> > +# it under the terms of the GNU General Public License as published by
> > +# the Free Software Foundation; either version 3 of the License, or
> > +# (at your option) any later version.
> > +#
> > +# This program is distributed in the hope that it will be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> > +
> > +require is_aarch64_target
> > +
> > +standard_testfile .c  
> 
> .c is the default, so this is usually dropped.
> 
> > +
> > +if { [prepare_for_testing "failed to prepare" ${testfile} \
> > +	"${srcfile}" {debug}] } {
> > +    return -1  
> 
> The '-1' return value here is meaningless, could you remove it please.
> 
> > +}
> > +
> > +clean_restart ${binfile}  
> 
> prepare_for_testing already includes a call to clean_restart passing in
> binfile, so this line should be removed.
> 
> > +
> > +if {![runto_main]} {
> > +    return
> > +}
> > +
> > +gdb_breakpoint [gdb_get_line_number "break-here"]
> > +gdb_continue_to_breakpoint "break-here"
> > +
> > +gdb_test_multiple "return -1" "return value -1" {
> > +    -re "Make .* return now.*y or n. $" {
> > +	send_gdb "y\n"
> > +	exp_continue
> > +    }
> > +    -re ".*result = test_function.*$gdb_prompt $" {
> > +	# pass without comment
> > +    }
> > +}  
> 
> Optionally, you could simplify this test to:
> 
>   gdb_test "with confirm off -- return -1" "result = test_function
> \\(\\);"
> 
> If you don't like the use of 'with', then you should consider using:
> 
>   -re -wrap ".*result = test_function \\(\\);" {
>     ...
>   }
> 
> But I do prefer the 'with' approach myself.
> 
> I believe that all these comments also apply to the x86 version of the
> test too.
> 
> But with these fixed:
> 
> Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks, Andrew.

I've made those changes (to both files) and have pushed this commit.

Kevin


      reply	other threads:[~2025-09-11  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-10  4:34 Kevin Buettner
2025-09-03 13:08 ` Andrew Burgess
2025-09-11  2:46   ` Kevin Buettner [this message]

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=20250910194642.29b1e64f@f41-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@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