This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 40/40] Document breakpoints / linespec & co improvements (manual + NEWS)
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 21 Jun 2017 14:32:54 +0100
- Subject: Re: [PATCH 40/40] Document breakpoints / linespec & co improvements (manual + NEWS)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0A03540F09
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0A03540F09
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-41-git-send-email-palves@redhat.com> <83a85qczmo.fsf@gnu.org>
Hi Eli,
On 06/02/2017 02:01 PM, Eli Zaretskii wrote:
>> From: Pedro Alves <palves@redhat.com>
>> > Date: Fri, 2 Jun 2017 13:22:38 +0100
>> >
>> > +For example, assuming a program with symbols named @code{A::B::func}
>> > +and @code{B::func}, both commands @code{break -function func} and
>> > +@code{break -function B::func} set a breakpoint on both symbols.
> The 2 commands are long and include whitespace, so I'd suggest
> enclosing each one in @w{..}, to avoid a line break in the middle of a
> command.
>
> Also, I think @kbd is more appropriate here than @code, since you mean
> commands the user will type, not just command names.
I was addressing this comment, and found myself a bit confused
on the distinction between kbd vs code, and what you mean by
"commands the user will type, not just command names". Here I'm
referring to how the commands with those names behave, not explicitly
discussing typing. E.g., the commands behave the same way
when found in a script too. Doesn't that suggest @code instead?
If not, what would be an example of "just command names", ones that
the user will NOT type? I.e., when should we use @code instead?
>From here:
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040kbd.html
I got the impression that a use of @kbd would be when describing
the completion machinery. Or then the text clearly says something around
"type @kbd{....}". What specifically confused me was this example
in that page that uses @code for a command name not unlike one of GDB's:
~~~
To give the @code{logout} command,
type the characters @kbd{l o g o u t @key{RET}}.
~~~
We seemingly use @code throughout in GDB's manual to refer to
command names, which adds to my confusion. They may all be
incorrect, and I'm not trying to justify adding more wrong usages
at all. I'd just like to understand better the distinction you have
in mind, so I can follow it consistently too.
Thanks,
Pedro Alves