[PATCH] Improve clear command's documentation

Pedro Alves pedro@palves.net
Tue May 31 13:04:00 GMT 2022


On 2022-05-31 13:36, Eli Zaretskii wrote:
>> Date: Tue, 31 May 2022 12:05:53 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>> How about this, basically a complete rewrite of the clear command's
>> documentation:
> 
> Thanks, the idea to rewrite it is indeed a good one.  But the actual
> text IMO came out highly repetitive, and has several markup issues.
> Rather than commenting on each issue, I suggest the following reworded
> text:
> 
>  @item clear @var{locspec}
>  Delete any breakpoint whose code location corresponds to
>  @var{locspec}.  @xref{Location Specifications}, for the various forms
>  of  @var{locspec}.  Which code locations correspond to @var{locspec}
>  depends on the form used in the location specifications @var{locspec}:
> 
>  @table @code
>  @item @var{linenum}
>  @itemx @var{filename}:@var{linenum}
>  @itemx -line @var{linenum}
>  @itemx -source @var{filename} -line @var{linenum}
>  If @var{locspec} specifies a line number, with or without a file
>  name, the command deletes any breakpoint whose code location is
>  at or within the specified line @var{linenum} in files that match the
>  specified @var{filename}.  If @var{filename} is omitted, it defaults
>  to the current source file.
> 
>  @item *@var{address}
>  If @var{locspec} specifies an address, the command deletes any
>  breakpoint whose code location is at the given @var{address}.
> 
>  @item @var{function}
>  @itemx -function @var{function}
>  If @var{locspec} specifies a function, the command deletes any
>  breakpoint whose code location is at the entry to any function whose
>  name matches @var{function}.
>  @end table
> 
>  Ambiguity in names of files and functions can be resolved as
>  described in @ref{Location Specifications}.
> 
> WDYT?
> 

I like this a lot.  Will you merge it, or shall I?


More information about the Gdb-patches mailing list