Re: [PATCH 1/2] fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp

Bruno Larsen via Gdb-patches
2023-01-13T17:05:07Z

On 13/01/2023 17:43, Carl Love wrote:
> Bruno:
>
> On Fri, 2023-01-13 at 14:33 +0100, Bruno Larsen wrote:
>>> +# This file is part of the GDB testsuite. It tests reverse
>>> stepping.
>>> +# Lots of code borrowed from "step-test.exp".
>>> +
>>> +# The reverse finish command should return from a function and
>>> stop on
>>> +# the first instruction of the source line where the function call
>>> is made.
>>> +# Specifically, the behavior should match doing a reverse next
>>> from the
>>> +# first instruction in the function. GDB should only take one
>>> reverse step
>>> +# or next statement to reach the previous source code line.
>>> +
>>> +# This testcase verifies the reverse-finish command stops at the
>>> first
>>> +# instruction in the source code line where the function was
>>> called. There
>>> +# are two scenarios that must be checked:
>>> +# 1) gdb is at the entry point instruction for the function
>>> +# 2) gdb is in the body of the function.
>> While testing locally, I ran into a bug with reverse finish at the
>> epilogue of the function, that your patch also fixed. It would be
>> nice
>> if the test extended that. And since the bug was that GDB stopped
>> responding and even ctrl+c did nothing, I would suggest adding it as
>> the
>> last test.
> I haven't run into the issue that mentioned about GDB not responding in
> the epilogue. I will have to go play with that to see if I can
> reproduce it. If you have any specific instructions on how you ran
> into it that would be interesting and helpful.

I manually ran gdb.reverse/finish-precsave (setting recording, of
course), set a temporary breakpoint on void_func, nexted once to be in
the epilogue and tried to reverse finish. I'm not sure if it was some
stale file before I recompiled the test, though.

Anyway, sorry if I was unclear, but that is not a regression of your
patch. Rather, you patch fixed that issue, I just want that test to
confirm that we don't accidentally regress it.

--
Cheers,
Bruno

>
> I have read thru the other comments and will work on them and update
> you on those fixes later. Thanks for the feedback.
>
> Carl
>