Re: [PATCH v6] Change message when reaching end of reverse history.

Guinevere Larsen
2024-08-27T11:08:21Z

On 8/27/24 7:17 AM, Tom de Vries wrote:
> On 8/26/24 15:41, Guinevere Larsen wrote:
>> Pushed :)
>
> Hi Gwen,
>
> After this patch got pushed, I ran into:
> ...
> (gdb) PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply
> all continue: prompt
> ^M
> Reached end of recorded history; stopping.^M
> Following forward execution will be added to history.^M
> test (arg=0x0) at
> /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M
> 30        return arg; /* bp.2 */^M
> ^M
> Reached end of recorded history; stopping.^M
> Following forward execution will be added to history.^M
> test (arg=0x0) at
> /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M
> 30        return arg; /* bp.2 */^M
> PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply all
> continue: thread 0
> FAIL: gdb.btrace/non-stop.exp: no progress: all: thread apply all
> continue: thread 1 (timeout)
> ...
>
> I suppose the test-case needs to be updated.

The test case is updated. I think the regexes need to be fixed instead.
Right now, the test uses:

multi_line "reached end of recorded.*Following forward.*"
"\[^\\\r\\\n\]*" "\[^\\\r\\\n\]*"

the '.*' in the first line must be consuming all of the first output
(thread 0) and the next bits are finishing consuming the second input
(thread 1), so when expect tries to find the second stop message, it has
already been consumed.

I'll try to write a more exact version that doesn't do that, but my
machine doesn't support btrace so I'll need someone to double check me.

--
Cheers,
Guinevere Larsen
She/Her/Hers

>
> Thanks,
> - Tom
>