[PATCH 3/3] gdb: don't show deprecated aliases

Simon Marchi simon.marchi@polymtl.ca
Fri Dec 3 21:48:10 GMT 2021



On 2021-12-03 11:16, Pedro Alves wrote:
> On 2021-12-01 16:41, Simon Marchi via Gdb-patches wrote:
>> I don't think it's very useful to show deprecated aliases to the
>> user.  It encourages the user to use them, when the goal is the
>> opposite.
>>
>> For example, before:
>>
>>     (gdb) help set index-cache enabled
>>     set index-cache enabled, set index-cache off, set index-cache on
>>       alias set index-cache off = set index-cache enabled off
>>       alias set index-cache on = set index-cache enabled on
>>     Enable the index cache.
>>     When on, enable the use of the index cache.
>>
>>     (gdb) help set index-cache on
>>     Warning: 'set index-cache on', an alias for the command 'set index-cache enabled', is deprecated.
>>     Use 'set index-cache enabled on'.
>>
>>     set index-cache enabled, set index-cache off, set index-cache on
>>       alias set index-cache off = set index-cache enabled off
>>       alias set index-cache on = set index-cache enabled on
>>     Enable the index cache.
>>     When on, enable the use of the index cache.
>>
> 
> I agree, this looks crowded, unclear and confusing.
> 
>> After:
>>
>>     (gdb) help set index-cache enabled
>>     Enable the index cache.
>>     When on, enable the use of the index cache.
>>     (gdb) help set index-cache on
>>     Warning: 'set index-cache on', an alias for the command 'set index-cache enabled', is deprecated.
>>     Use 'set index-cache enabled on'.
>>
>>     Enable the index cache.
>>     When on, enable the use of the index cache.
>>
>> Change-Id: I989b618a5ad96ba975367e9d16db95523cd57a4c
> 
> LGTM.

Thanks.

Philippe, do you have an opinion on this change of behavior?

Simon


More information about the Gdb-patches mailing list