From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id p2CPFiCWtGLCowQAWB0awg (envelope-from ) for ; Thu, 23 Jun 2022 12:34:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 415321E225; Thu, 23 Jun 2022 12:34:40 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=EMxqTRCn; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B149E1E15D for ; Thu, 23 Jun 2022 12:34:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64BD7385AE61 for ; Thu, 23 Jun 2022 16:34:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64BD7385AE61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656002078; bh=NUS2lTSnOvO9NNmURTUKrib8nKS7b9bjE5Uw20z7NZA=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=EMxqTRCnhb5wspnDIk63upHrdAJR1B9VnQ3vmsg36lBBzKHzNaxkmrbk0XME2P59t Fj9KsnIHNDiy5E9elHdPfn2gRt89cXtwghapLUxmRE7yQq4m3rlrPABmcijj53yjrY vhM7f3wJKEta/DOQoHDWnVuhhEKJzsPgh343DNNg= 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> To: Andrew Burgess 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > 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.