From patchwork Wed May 29 08:47:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Willgerodt, Felix" X-Patchwork-Id: 32883 Received: (qmail 10997 invoked by alias); 29 May 2019 08:48:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10880 invoked by uid 89); 29 May 2019 08:48:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=H*r:LOCAL, H*RU:134.134.136.20, HX-HELO:mga02.intel.com, H*RU:mga02.intel.com X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 08:48:14 +0000 Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 01:48:12 -0700 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga008.fm.intel.com with ESMTP; 29 May 2019 01:48:11 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x4T8mAdi007652; Wed, 29 May 2019 09:48:10 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id x4T8mAXZ030777; Wed, 29 May 2019 10:48:10 +0200 Received: (from fwillger@localhost) by ulvlx001.iul.intel.com with LOCAL id x4T8mAm2030773; Wed, 29 May 2019 10:48:10 +0200 From: felix.willgerodt@intel.com To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com, Felix Willgerodt Subject: [PATCH 02/10] btrace: Enable auxiliary instructions in record instruction-history. Date: Wed, 29 May 2019 10:47:45 +0200 Message-Id: <1559119673-30516-3-git-send-email-felix.willgerodt@intel.com> In-Reply-To: <1559119673-30516-1-git-send-email-felix.willgerodt@intel.com> References: <1559119673-30516-1-git-send-email-felix.willgerodt@intel.com> X-IsSubscribed: yes From: Felix Willgerodt 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 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;