This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction


> -----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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]