From patchwork Mon Sep 4 15:11:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 22602 Received: (qmail 95329 invoked by alias); 4 Sep 2017 15:11:35 -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 95317 invoked by uid 89); 4 Sep 2017 15:11:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Sep 2017 15:11:29 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 65F3E2ADC for ; Mon, 4 Sep 2017 15:11:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 65F3E2ADC Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB05F820AE for ; Mon, 4 Sep 2017 15:11:27 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed/ob] Fix build breakage when libipt is available Date: Mon, 4 Sep 2017 16:11:27 +0100 Message-Id: <1504537887-24966-1-git-send-email-palves@redhat.com> MIME-Version: 1.0 Fix build regression introduced by 0860c437cbe4 ("btrace: Store btrace_insn in an std::vector"): src/gdb/btrace.c: In function ‘void ftrace_add_pt(btrace_thread_info*, pt_insn_decoder*, int*, std::vector&)’: src/gdb/btrace.c:1329:38: error: invalid initialization of reference of type ‘const btrace_insn&’ from expression of type ‘btrace_insn*’ ftrace_update_insns (bfun, &btinsn); ^ src/gdb/btrace.c:648:1: note: in passing argument 2 of ‘void ftrace_update_insns(btrace_function*, const btrace_insn&)’ ftrace_update_insns (struct btrace_function *bfun, const btrace_insn &insn) ^ gdb/ChangeLog: 2017-09-04 Pedro Alves * btrace.c (ftrace_add_pt): Pass btrace_insn to ftrace_update_insns by reference instead of pointer. --- gdb/ChangeLog | 5 +++++ gdb/btrace.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3068050..a70fb7b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-09-04 Pedro Alves + + * btrace.c (ftrace_add_pt): Pass btrace_insn to + ftrace_update_insns by reference instead of pointer. + 2017-09-04 Yao Qi * i386-go32-tdep.c: Include x86-xstate.h. diff --git a/gdb/btrace.c b/gdb/btrace.c index 6d2a9c4..d9810f3 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -1325,8 +1325,7 @@ ftrace_add_pt (struct btrace_thread_info *btinfo, /* Maintain the function level offset. */ *plevel = std::min (*plevel, bfun->level); - btrace_insn btinsn = pt_btrace_insn (insn); - ftrace_update_insns (bfun, &btinsn); + ftrace_update_insns (bfun, pt_btrace_insn (insn)); } if (status == -pte_eos)