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

Bruno Larsen via Gdb-patches
2023-01-19T08:05:15Z

On 18/01/2023 23:26, Carl Love wrote:
> Not sure what more I can do at this point. If you have some time, can
> you take a look at the failures on your machine and let me know what
> you are seeing. Maybe we can figure out what is going on.
>
> Perhaps Bruno can also check to see if the two tests were ran on his
> machine. If not, hopefully the info above will help Bruno to get the
> tests to run on his machine and we can see if they fail there as well.

I just tried running the gdb.btrace/rn-dl-bind.exp and also got 9
passes, so I cant help there, but I did miss the 2 failures in
tailcall.exp; here's the relevant log:

Breakpoint 1, main () at tailcall.c:37
38        answer += 1;
(gdb) PASS: gdb.btrace/tailcall.exp: next.1
reverse-next
foo () at tailcall.c:29
29        return bar ();
(gdb) FAIL: gdb.btrace/tailcall.exp: reverse-next.1
step
bar () at tailcall.c:24
24      }
(gdb) FAIL: gdb.btrace/tailcall.exp: step.1
finish

Some extra context, line 37 (the line that is being "undone" by
reverse-next) has a call to foo, which calls bar. Whats going on here is
that we're hitting the step-resume breakpoint when exiting the bar call,
instead of when exiting the foo call.Has a very similar smell to the
type of bug I fixed in commit 1f3e37e057e876b37db49dbd8ed5ca22c33f6772,
but that fix itself might not work because of tailcall optimizations.

If you have the test compiled, you can trigger the bug using regular
record, no need to use btrace specifically.

--
Cheers,
Bruno