From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 61C2F38582A3 for ; Thu, 23 Jun 2022 16:34:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 61C2F38582A3 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Pmc-00033F-Vh; Thu, 23 Jun 2022 12:34:18 -0400 Received: from [87.69.77.57] (port=1551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Pmb-0002ON-GZ; Thu, 23 Jun 2022 12:34:18 -0400 Date: Thu, 23 Jun 2022 19:34:09 +0300 Message-Id: <8335fve3um.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org 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) Subject: Re: [PATCH 9/9] gdb/mi: new options for -data-disassemble command References: <7e451914de0fc57677e73bf48d66a70b23276f7f.1655999715.git.aburgess@redhat.com> X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2022 16:34:20 -0000 > Date: Thu, 23 Jun 2022 17:05:16 +0100 > From: Andrew Burgess via Gdb-patches > Cc: Andrew Burgess > > @@ -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.