This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>, "dje at google dot com" <dje at google dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 12 Oct 2015 08:44:17 +0000
- Subject: RE: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction
- Authentication-results: sourceware.org; auth=none
- References: <1442847283-10200-1-git-send-email-markus dot t dot metzger at intel dot com> <1442847283-10200-3-git-send-email-markus dot t dot metzger at intel dot com> <5617B840 dot 7040504 at redhat dot com>
> -----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.
> 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.
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.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928