From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>,
"dje@google.com" <dje@google.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction
Date: Tue, 20 Oct 2015 11:29:00 -0000 [thread overview]
Message-ID: <5626258B.9070607@redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B23331E6065@IRSMSX104.ger.corp.intel.com>
(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
next prev parent reply other threads:[~2015-10-20 11:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 14:55 [PATCH 0/6] disasm, record: fix "record instruction-history /m" Markus Metzger
2015-09-21 14:54 ` [PATCH 1/6] disasm: change dump_insns to print a single instruction Markus Metzger
2015-09-21 14:54 ` [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction Markus Metzger
2015-10-09 12:51 ` Pedro Alves
2015-10-12 8:44 ` Metzger, Markus T
2015-10-20 11:29 ` Pedro Alves [this message]
2015-09-21 14:54 ` [PATCH 6/6] btrace: use gdb_disassembly_vec and new source interleaving method Markus Metzger
2015-09-21 21:48 ` Andrew Burgess
2015-09-22 6:18 ` Metzger, Markus T
2015-09-21 14:55 ` [PATCH 4/6] disasm: use entire line table in line_has_code_p Markus Metzger
2015-09-21 14:55 ` [PATCH 3/6] disas: add gdb_disassembly_vec Markus Metzger
2015-10-09 12:49 ` Pedro Alves
2015-10-09 13:17 ` Metzger, Markus T
2015-10-12 8:59 ` Andrew Burgess
2015-10-18 20:39 ` Doug Evans
2015-09-21 14:55 ` [PATCH 5/6] disasm: determine preceding lines independent of last_line Markus Metzger
2015-10-12 14:19 ` [PATCH 0/6] disasm, record: fix "record instruction-history /m" Metzger, Markus T
2015-10-18 21:17 ` Doug Evans
2015-10-19 9:35 ` Metzger, Markus T
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=5626258B.9070607@redhat.com \
--to=palves@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.com \
/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