From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25417 invoked by alias); 20 Oct 2015 11:29:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24477 invoked by uid 89); 20 Oct 2015 11:29:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 20 Oct 2015 11:29:19 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id AC7823B3C2; Tue, 20 Oct 2015 11:29:17 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9KBTGoU009308; Tue, 20 Oct 2015 07:29:16 -0400 Message-ID: <5626258B.9070607@redhat.com> Date: Tue, 20 Oct 2015 11:29:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Metzger, Markus T" , "dje@google.com" CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction References: <1442847283-10200-1-git-send-email-markus.t.metzger@intel.com> <1442847283-10200-3-git-send-email-markus.t.metzger@intel.com> <5617B840.7040504@redhat.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00350.txt.bz2 (Closing the loop on v1... Sorry for the delay.) On 10/12/2015 09:44 AM, Metzger, Markus T wrote: >> -----Original Message----- >> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- >> owner@sourceware.org] On Behalf Of Pedro Alves >> Sent: Friday, October 9, 2015 2:51 PM >> To: Metzger, Markus T; dje@google.com >> Cc: gdb-patches@sourceware.org >> Subject: Re: [PATCH 2/6] disasm: add struct disas_insn to describe to-be- >> disassembled instruction > > >> I think the log would be much clearer if the rationale was specified in >> terms of why this is necessary, and if we saw a before/after example. > > I added the following to the beginning of the commit message to motivate > the patch: > > The "record instruction-history" command prints for each instruction, in > addition to the instruction's disassembly: > > - the instruction number in the recorded execution trace > - a '?' before the instruction if it was executed speculatively > > To allow the "record instruction-history" command to use GDB's disassembly > infrastructure, we extend dump_insn to optionally print those additional > fields. Ah, that's clears things, thanks. > > >> Also, being a user/frontend visible change, shouldn't these new >> fields be documented and mentioned in NEWS? > > There is no UI change and thus also no before/after example. > > The new optional fields are currently not used. They will be used by the > "record instruction-history" command in the last patch of this series. > Even then, there is no UI change. Both the "record instruction-history" > and the "disassemble" command behave as they did before. > OK. > There is a change to the MI output of "record instruction-history". > As I didn't do any conscious MI support for record btrace, I don't expect > it to be working. I'm using the ui_out_* functions so there might be some > form of MI support. AFAIK it is not being used. I see. Note that when an MI frontend invokes a CLI command (through -interpreter-exec console ..."), the output it gets is still CLI output. The fields passed to ui_out_* functions only get converted to MI attributes if the command entered was a real MI command. IOW, if there's no MI command equivalent of "record instruction-history", then there's no such thing as 'MI output of "record instruction-history"'. This sentence: "If non-zero, the instruction number is printed first. It will also appear as a new optional field "insn-number" in MI. The field will be present if insn_num is non-zero." was what made me believe there was some MI command that would now output that field. But it now sounds to me that e.g., -data-disassemble output does not really change. (If it does change, then we need to extend the manual where it documents the "Result" of that command (see "GDB/MI Data Manipulation").) Thanks, Pedro Alves