public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: felix.willgerodt@intel.com
To: gdb-patches@sourceware.org
Cc: markus.t.metzger@intel.com,
	Felix Willgerodt <felix.willgerodt@intel.com>
Subject: [PATCH 02/10] btrace: Enable auxiliary instructions in record instruction-history.
Date: Wed, 29 May 2019 08:48:00 -0000	[thread overview]
Message-ID: <1559119673-30516-3-git-send-email-felix.willgerodt@intel.com> (raw)
In-Reply-To: <1559119673-30516-1-git-send-email-felix.willgerodt@intel.com>

From: Felix Willgerodt <felix.willgerodt@intel.com>

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(+)

diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 21085d5c62c..5fb967c40f0 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -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",
+			    it.btinfo->aux_data[insn->aux_data_index].c_str ());
+	  uiout->text ("]\n");
+	}
       else
 	{
 	  struct disasm_insn dinsn;
-- 
2.20.1

  parent reply	other threads:[~2019-05-29  8:48 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  8:48 [PATCH 00/10] Extensions for PTWRITE felix.willgerodt
2019-05-29  8:48 ` [PATCH 09/10] btrace, python: Enable calling the ptwrite listener felix.willgerodt
2019-06-04 12:37   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 03/10] btrace: Enable auxiliary instructions in record function-call-history felix.willgerodt
2019-05-29 14:40   ` Eli Zaretskii
2019-06-04 12:35   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2021-06-16  9:13       ` Metzger, Markus T
2021-06-16 10:03         ` Willgerodt, Felix
2021-06-16 10:16           ` Metzger, Markus T
2019-05-29  8:48 ` [PATCH 08/10] btrace, python: Enable ptwrite listener registration felix.willgerodt
2019-06-04 12:36   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 07/10] btrace, linux: Enable ptwrite packets felix.willgerodt
2019-06-04 12:36   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 06/10] python: Add clear_trace() to gdb.Record felix.willgerodt
2019-05-29 14:41   ` Eli Zaretskii
2019-06-04 12:36   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 04/10] btrace: Handle stepping and goto for auxiliary instructions felix.willgerodt
2019-06-04 12:35   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 01/10] btrace: Introduce " felix.willgerodt
2019-05-29 14:39   ` Eli Zaretskii
2019-06-04 12:35   ` Metzger, Markus T
2019-05-29  8:48 ` [PATCH 05/10] python: Introduce gdb.RecordAuxiliary class felix.willgerodt
2019-05-29 14:42   ` Eli Zaretskii
2019-06-04 12:36   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` [PATCH 10/10] btrace: Extend event decoding for ptwrite felix.willgerodt
2019-05-29 14:53   ` Eli Zaretskii
2019-06-04 12:37   ` Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix
2019-05-29  8:48 ` felix.willgerodt [this message]
2019-06-04 12:35   ` [PATCH 02/10] btrace: Enable auxiliary instructions in record instruction-history Metzger, Markus T
2021-06-14 14:53     ` Willgerodt, Felix

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=1559119673-30516-3-git-send-email-felix.willgerodt@intel.com \
    --to=felix.willgerodt@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).