From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24020 invoked by alias); 9 May 2017 07:00:58 -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 16080 invoked by uid 89); 9 May 2017 07:00:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 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:1633 X-HELO: mga07.intel.com Received: from mga07.intel.com (HELO mga07.intel.com) (134.134.136.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 May 2017 07:00:16 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 09 May 2017 00:00:16 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 09 May 2017 00:00:15 -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 v4970Eab016629; Tue, 9 May 2017 08:00:14 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id v4970Dk2023917; Tue, 9 May 2017 09:00:13 +0200 Received: (from twiederh@localhost) by ulvlx001.iul.intel.com with œ id v4970DCo023913; Tue, 9 May 2017 09:00:13 +0200 From: Tim Wiederhake To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com Subject: [PATCH v3 03/12] btrace: Add btinfo to instruction interator. Date: Tue, 09 May 2017 07:01:00 -0000 Message-Id: <1494312929-22749-4-git-send-email-tim.wiederhake@intel.com> In-Reply-To: <1494312929-22749-1-git-send-email-tim.wiederhake@intel.com> References: <1494312929-22749-1-git-send-email-tim.wiederhake@intel.com> X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00196.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-09 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 57788ac..c2d3730 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -2291,6 +2291,7 @@ btrace_insn_begin (struct btrace_insn_iterator *it, if (bfun == NULL) error (_("No trace.")); + it->btinfo = btinfo; it->function = bfun; it->index = 0; } @@ -2316,6 +2317,7 @@ btrace_insn_end (struct btrace_insn_iterator *it, if (length > 0) length -= 1; + it->btinfo = btinfo; it->function = bfun; it->index = length; } @@ -2519,6 +2521,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 ab739ec..e567ef7 100644 --- a/gdb/btrace.h +++ b/gdb/btrace.h @@ -192,6 +192,9 @@ struct btrace_function /* 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