Re: [PATCH v2 3/3] gdb: introduce scoped debug prints

Simon Marchi via Gdb-patches
2021-01-05T15:33:20Z

On 2021-01-05 4:23 a.m., Tom de Vries wrote:
> On 1/5/21 10:01 AM, Tom de Vries wrote:
>> [ I first tried to override $gdb_prompt for the duration of
>> gdb_test_sequence using save_vars, but there's the invariant that the
>> gdb_prompt variable has an implicit " " after it, which
>> gdb_test_sequence adds, so that didn't work. ]
>
> So, if we introduce a variable gdb_prompt_full which does contain the
> space, and use it in gdb_test_sequence, we can override it.
>
> Thanks,
> - Tom
>

Thanks for reporting. The test passes here 90% of the time, but when I
run it in a loop it eventually fails like the others I fixed.

I'd rather add a -prompt flag to gdb_test_sequence, what do you think?
I'll start working on that and give it a try.

Simon