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 02/10] btrace: Enable auxiliary instructions in record instruction-history.


Hello Felix,

> Print the auxiliary data when a btrace_insn of type BTRACE_INSN_AUX
> is encountered in the instruction-history.
> 
> This patch is in preparation for the ptwrite feature, which is based on
> auxiliary instructions.
> 
> 2019-05-29  Felix Willgerodt  <felix.willgerodt@intel.com>
> 
> gdb/ChangeLog:
> 	* record-btrace.c (btrace_insn_history): Handle BTRACE_INSN_AUX.
> 
> ---
>  gdb/record-btrace.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

LGTM with one tiny nit below.

> @@ -811,6 +811,16 @@ btrace_insn_history (struct ui_out *uiout,
>  	  btrace_ui_out_decode_error (uiout, btrace_insn_get_error (&it),
>  				      conf->format);
>  	}
> +      else if (insn->iclass == BTRACE_INSN_AUX)
> +	{
> +	  uiout->field_fmt ("insn-number", "%u", btrace_insn_number (&it));
> +	  uiout->text ("\t");
> +	  uiout->spaces (3);
> +	  uiout->text ("[");
> +	  uiout->field_fmt ("aux-insn", "%s",

The field is called aux_data.   Should they be aligned?

> +			    it.btinfo->aux_data[insn->aux_data_index].c_str ());
> +	  uiout->text ("]\n");
> +	}
>        else
>  	{
>  	  struct disasm_insn dinsn;
> --
> 2.20.1

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, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
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]