From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1085 invoked by alias); 17 Feb 2017 13:27:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 584 invoked by uid 89); 17 Feb 2017 13:27:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1497, 1936 X-HELO: mga01.intel.com Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Feb 2017 13:27:12 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2017 05:27:11 -0800 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 17 Feb 2017 05:27:09 -0800 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 v1HDR8Sa001604; Fri, 17 Feb 2017 13:27:08 GMT Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id v1HDR83W006644; Fri, 17 Feb 2017 14:27:08 +0100 Received: (from twiederh@localhost) by ulvlx001.iul.intel.com with œ id v1HDR8K3006640; Fri, 17 Feb 2017 14:27:08 +0100 From: Tim Wiederhake To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com Subject: [PATCH 03/11] btrace: Add btinfo to instruction interator. Date: Fri, 17 Feb 2017 13:27:00 -0000 Message-Id: <1487337989-6367-4-git-send-email-tim.wiederhake@intel.com> In-Reply-To: <1487337989-6367-1-git-send-email-tim.wiederhake@intel.com> References: <1487337989-6367-1-git-send-email-tim.wiederhake@intel.com> X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00485.txt.bz2 2017-02-17 Tim Wiederhake gdb/ChangeLog: * btrace.c (btrace_insn_begin, btrace_insn_end, btrace_find_insn_by_number): Added btinfo to iterator. * btrace.h (struct btrace_insn_iterator): Added btinfo. --- gdb/btrace.c | 3 +++ gdb/btrace.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gdb/btrace.c b/gdb/btrace.c index da8e0f7..5f0eb7a 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -2279,6 +2279,7 @@ btrace_insn_begin (struct btrace_insn_iterator *it, if (bfun == NULL) error (_("No trace.")); + it->btinfo = btinfo; it->function = bfun; it->index = 0; } @@ -2304,6 +2305,7 @@ btrace_insn_end (struct btrace_insn_iterator *it, if (length > 0) length -= 1; + it->btinfo = btinfo; it->function = bfun; it->index = length; } @@ -2507,6 +2509,7 @@ btrace_find_insn_by_number (struct btrace_insn_iterator *it, break; } + it->btinfo = btinfo; it->function = bfun; it->index = number - bfun->insn_offset; return 1; diff --git a/gdb/btrace.h b/gdb/btrace.h index 07ed10c..f912b04 100644 --- a/gdb/btrace.h +++ b/gdb/btrace.h @@ -193,6 +193,9 @@ DEF_VEC_P (btrace_fun_p); /* A branch trace instruction iterator. */ struct btrace_insn_iterator { + /* The branch trace information for this thread. Will never be NULL. */ + const struct btrace_thread_info *btinfo; + /* The branch trace function segment containing the instruction. Will never be NULL. */ const struct btrace_function *function; -- 2.7.4