This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix build breakage when libipt is available
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 4 Sep 2017 15:10:36 -0000
- Subject: [binutils-gdb] Fix build breakage when libipt is available
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7525b645dfaa302091591d0f87d9682ce988ed13
commit 7525b645dfaa302091591d0f87d9682ce988ed13
Author: Pedro Alves <palves@redhat.com>
Date: Mon Sep 4 16:01:17 2017 +0100
Fix build breakage when libipt is available
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<unsigned int>&)â??:
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 <palves@redhat.com>
* btrace.c (ftrace_add_pt): Pass btrace_insn to
ftrace_update_insns by reference instead of pointer.
Diff:
---
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 <palves@redhat.com>
+
+ * btrace.c (ftrace_add_pt): Pass btrace_insn to
+ ftrace_update_insns by reference instead of pointer.
+
2017-09-04 Yao Qi <yao.qi@linaro.org>
* 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)