From: Pedro Alves <palves@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>, dje@google.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction
Date: Fri, 09 Oct 2015 12:51:00 -0000 [thread overview]
Message-ID: <5617B840.7040504@redhat.com> (raw)
In-Reply-To: <1442847283-10200-3-git-send-email-markus.t.metzger@intel.com>
On 09/21/2015 03:54 PM, Markus Metzger wrote:
> Add a new struct disas_insn to add additional fields describing the
> to-be-disassembled instruction. The additional fields are:
>
> number an optional instruction number, zero if omitted.
> is_speculative a predicate saying whether the instruction was
> executed speculatively.
>
> Replace the PC parameter of dump_insn with a pointer to the above struct.
>
> 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.
>
> If is_speculative is set, speculative execution will be indicated by a "?"
> following the new instruction number field. Unless the PC is omitted, it
> will overwrite the first byte of the PC prefix. It will appear as a new
> optional field "is-speculative" in MI. The field will contain "?" and will
> be present if is_speculative is set.
>
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.
Also, being a user/frontend visible change, shouldn't these new
fields be documented and mentioned in NEWS?
> --- a/gdb/disasm.h
> +++ b/gdb/disasm.h
> @@ -27,11 +27,25 @@
> #define DISASSEMBLY_FILENAME (0x1 << 3)
> #define DISASSEMBLY_OMIT_PC (0x1 << 4)
> #define DISASSEMBLY_SOURCE (0x1 << 5)
> +#define DISASSEMBLY_SPECULATIVE (0x1 << 6)
>
> struct gdbarch;
> struct ui_out;
> struct ui_file;
>
> +/* An instruction to be disassembled. */
> +
> +struct disas_insn {
{ goes on the next line.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-10-09 12:51 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 [this message]
2015-10-12 8:44 ` Metzger, Markus T
2015-10-20 11:29 ` Pedro Alves
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=5617B840.7040504@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