Re: [PATCH v2 2/5] Further cleanup/modernization of gdb.base/commands.exp

Pedro Alves
2016-11-09T18:51:32Z

On 11/09/2016 04:24 PM, Simon Marchi wrote:
> On 2016-11-09 11:16, Pedro Alves wrote:
>> On 11/09/2016 04:09 PM, Simon Marchi wrote:
>>> On 2016-11-09 10:59, Pedro Alves wrote:
>>>> And I'm wondering whether this below as well would be a good idea,
>>>> or whether it'd obfuscate? If a good idea, maybe we'd put the new
>>>> variable in gdb.exp.
>>>
>>> ...
>>>
>>>> @@ -45,7 +50,7 @@ proc_with_prefix gdbvar_simple_if_test {} {
>>>> "else" \
>>>> " p/x 0xdeadbeef" \
>>>> "end"] \
>>>> - "\\\$\[0-9\]* = 0xdeadbeef" \
>>>> + "$valnum_re = 0xdeadbeef" \
>>>> "#1"
>>>
>>>
>>> That's not bad. I was going to suggest using {} instead of "" to get
>>> rid of most backslashes (untested):
>>>
>>> -"\\\$\[0-9\]* = 0xdeadbeef"
>>> +{\$[0-9]* = 0xdeadbeef}
>>>
>>> but with the variable it looks good as well.
>>>
>>
>> Here's the resulting squashed patch then. WDYT?
>
> LGTM.
>

Thanks for all the review and bouncing off ideas. I've pushed in
the version using {} throughout.