From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36186 invoked by alias); 8 May 2017 08:13:35 -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 36015 invoked by uid 89); 8 May 2017 08:13:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 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= X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 May 2017 08:13:32 +0000 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2017 01:13:33 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga005.jf.intel.com with ESMTP; 08 May 2017 01:13:32 -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 v488DVRB018478; Mon, 8 May 2017 09:13:31 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id v488DVIc004978; Mon, 8 May 2017 10:13:31 +0200 Received: (from twiederh@localhost) by ulvlx001.iul.intel.com with œ id v488DU1I004974; Mon, 8 May 2017 10:13:30 +0200 From: Tim Wiederhake To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com Subject: [PATCH v2 02/11] btrace: Add btinfo to instruction interator. Date: Mon, 08 May 2017 08:13:00 -0000 Message-Id: <1494231185-4709-3-git-send-email-tim.wiederhake@intel.com> In-Reply-To: <1494231185-4709-1-git-send-email-tim.wiederhake@intel.com> References: <1494231185-4709-1-git-send-email-tim.wiederhake@intel.com> X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00169.txt.bz2 This will serve as the access path to the vector of function segments once the FUNCTION pointer in struct btrace_insn_iterator is removed. 2017-05-08 Tim Wiederhake gdb/ChangeLog: * btrace.c (btrace_insn_begin, btrace_insn_end, btrace_find_insn_by_number): Add btinfo to iterator. * btrace.h (struct btrace_insn_iterator): Add 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 b316344..d701f54 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -2295,6 +2295,7 @@ btrace_insn_begin (struct btrace_insn_iterator *it, if (bfun == NULL) error (_("No trace.")); + it->btinfo = btinfo; it->function = bfun; it->index = 0; } @@ -2320,6 +2321,7 @@ btrace_insn_end (struct btrace_insn_iterator *it, if (length > 0) length -= 1; + it->btinfo = btinfo; it->function = bfun; it->index = length; } @@ -2523,6 +2525,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