public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 9/9] gdb/mi: new options for -data-disassemble command
Date: Thu, 23 Jun 2022 19:34:09 +0300	[thread overview]
Message-ID: <8335fve3um.fsf@gnu.org> (raw)
In-Reply-To: <7e451914de0fc57677e73bf48d66a70b23276f7f.1655999715.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Thu, 23 Jun 2022 17:05:16 +0100)

> Date: Thu, 23 Jun 2022 17:05:16 +0100
> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Andrew Burgess <aburgess@redhat.com>
> 
> @@ -34416,31 +34418,56 @@
>  displayed; if @var{lines} is higher than the number of lines between
>  @var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
>  are displayed.
> +@item @var{opcodes-mode}
> +is one of @samp{none}, @samp{bytes}, or @samp{display}.  This setting
> +can only be used with @var{mode} 0.  Passing @samp{none} here will
> +prevent opcodes being included in the result; passing @samp{bytes} here
> +will include opcodes in the result, the opcodes will be formatted as for
> +@kbd{disassemble /b}; and passing @samp{display} here will include the
> +opcodes in the result, the opcodes will be formatted as for
> +@kbd{disassemble /r}.

This begs for an inner @table or @itemize, describing each of the 3
options separately.  It would be also more correct, English-wise,
since starting an @item with a lowercase letter and then writing
several sentences there is not really correct.

>  @item @var{mode}
> -is one of:
> +the use of @var{mode} is deprecated in favour of using the
> +@code{--opcodes} and @code{--source} options.  When no @var{mode} is
> +given, @var{mode} 0 will be assumed.  However, the @var{mode} is still
> +available for backward compatibility.  The @var{mode} should be one of:
>  @itemize @bullet
> -@item 0 disassembly only
> -@item 1 mixed source and disassembly (deprecated)
> -@item 2 disassembly with raw opcodes
> -@item 3 mixed source and disassembly with raw opcodes (deprecated)
> -@item 4 mixed source and disassembly
> -@item 5 mixed source and disassembly with raw opcodes
> +@item 0 disassembly only:
> +This is the default mode if no mode is specified.

This is in @itemize, so @items should appear alone on their lines, and
the text on the line below it.  But the style in which you wrote this
is better suited fore @table, so maybe just replace @itemize by @table.

> +@item 1 mixed source and disassembly (deprecated):
> +It is not possible to recreate this mode using @code{--opcodes} and
> +@code{--source} options.

Then why are we deprecating it (and the MODE argument itself)?

> -For modes 0 and 2 the @samp{asm_insns} list contains tuples with the
> -following fields:
> +For modes 0 and 2, and when the @code{--source} option is not used the
                                                                     ^^
Comma missing there.

> +When the @samp{--opcodes} option is not passed to
> +@code{-data-disassemble}, or the @samp{bytes} value is passed to
> +@samp{--opcodes}, then the bytes are formatted as a series of single
> +bytes, in hex, in ascending address order, with a single space between
> +each byte.  This format is equivalent to the @samp{/b} option being used
> +with the @kbd{disassemble} command.

A cross-reference to the description of 'disassemble' would be good
here.

  reply	other threads:[~2022-06-23 16:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 16:05 [PATCH 0/9] Disassembler opcode display and text alignment Andrew Burgess
2022-06-23 16:05 ` [PATCH 1/9] gdb/doc: improve description of --data-disassemble opcodes output Andrew Burgess
2022-06-23 16:09   ` Eli Zaretskii
2022-06-29 12:54     ` Andrew Burgess
2022-06-23 16:05 ` [PATCH 2/9] gdb/testsuite: new test for -data-disassemble opcodes format Andrew Burgess
2022-06-23 16:05 ` [PATCH 3/9] gdb/disasm: read opcodes bytes with a single read_code call Andrew Burgess
2022-06-23 16:05 ` [PATCH 4/9] gdb: disassembler opcode display formatting Andrew Burgess
2022-06-23 16:14   ` Eli Zaretskii
2022-06-23 16:05 ` [PATCH 5/9] gdb: make gdb_disassembly_flag unsigned Andrew Burgess
2022-06-23 16:05 ` [PATCH 6/9] gdb/doc: fix column widths in MI compatibility table Andrew Burgess
2022-06-23 16:22   ` Eli Zaretskii
2022-06-30  9:39     ` Andrew Burgess
2022-06-23 16:05 ` [PATCH 7/9] gdb/doc: update syntax of -data-disassemble command arguments Andrew Burgess
2022-06-23 16:21   ` Eli Zaretskii
2022-06-30 10:18     ` Andrew Burgess
2022-06-30 10:46       ` Eli Zaretskii
2022-06-23 16:05 ` [PATCH 8/9] gdb/mi: some int to bool conversion Andrew Burgess
2022-06-23 16:05 ` [PATCH 9/9] gdb/mi: new options for -data-disassemble command Andrew Burgess
2022-06-23 16:34   ` Eli Zaretskii [this message]
2022-06-30 11:22     ` Andrew Burgess
2022-06-30 13:36       ` Eli Zaretskii
2022-07-25 18:28 ` [PATCH 0/9] Disassembler opcode display and text alignment Andrew Burgess
2022-09-05 14:11   ` Andrew Burgess
2022-09-21 16:41 ` Tom Tromey
2022-10-02 13:15   ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8335fve3um.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).