This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] partial fix PR 14777: Add abbrev cmd 'fo' for 'forward-search'.
On 11/07/2012 03:13 PM, Joel Brobecker wrote:
>> We can fix this problem in two ways, either remove this line above
>> from the doc or define "fo" as the abbreviated command of
>> 'forward-search'. IMO, latter is better, so this is what this patch
>> does.
>
> I tend to agree.
>
>> gdb/doc:
>> 2012-11-07 Yao Qi <yao@codesourcery.com>
>>
>> * gdb.texinfo (Search): Add kindex for 'fo'.
>
> Needs approval from Eli.
>
>> gdb:
>> 2012-11-07 Yao Qi <yao@codesourcery.com>
>>
>> PR gdb/14777.
>> * source.c (_initialize_source): Call add_com_alias to abbreviate
>> 'forward-search' as 'fo'.
>
> OK.
>
> I should also add that we should make sure that we do not approve
> updates to the manual that document command abbreviations without
> specifically defining the abbreviation in our code. As demonstrated
> in this case, implicit abbreviations may become ambiguous over time.
Yeah. It just looks like an oversight of early development. I see the
forward-search command as early as GDB 2.5.1 (1988), and the "fo"
abbreviation was already documented in gdb-3.3 (1989), the first
release we have that includes the manual. I don't see an explicit
abbreviation implemented anywhere in between those releases.
--
Pedro Alves