From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [ob/pushed] Fix gdb C++ build when libipt is available
Date: Fri, 15 Apr 2016 23:31:00 -0000 [thread overview]
Message-ID: <1460763108-24964-1-git-send-email-palves@redhat.com> (raw)
With libipt's headers installed, a build with --enable-build-with-cxx
fails with:
.../src/gdb/btrace.c: In function âbtrace_insn_flag pt_btrace_insn_flags(const pt_insn*)â:
.../src/gdb/btrace.c:734:33: error: invalid conversion from âintâ to âbtrace_insn_flagâ [-fpermissive]
enum btrace_insn_flag flags = 0;
^
.../src/gdb/btrace.c:737:11: error: invalid conversion from âintâ to âbtrace_insn_flagâ [-fpermissive]
flags |= BTRACE_INSN_FLAG_SPECULATIVE;
^
gdb/ChangeLog:
2016-04-15 Pedro Alves <palves@redhat.com>
* btrace.c (pt_btrace_insn_flags): Change return type to
btrace_insn_flags. Use btrace_insn_flags for local.
---
gdb/ChangeLog | 5 +++++
gdb/btrace.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d628bc1..f879b8a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2016-04-15 Pedro Alves <palves@redhat.com>
+ * btrace.c (pt_btrace_insn_flags): Change return type to
+ btrace_insn_flags. Use btrace_insn_flags for local.
+
+2016-04-15 Pedro Alves <palves@redhat.com>
+
* nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also
accept TRAP_BRKPT.
[__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
diff --git a/gdb/btrace.c b/gdb/btrace.c
index 7c4da09..f2cb750 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -728,10 +728,10 @@ pt_reclassify_insn (enum pt_insn_class iclass)
/* Return the btrace instruction flags for INSN. */
-static enum btrace_insn_flag
+static btrace_insn_flags
pt_btrace_insn_flags (const struct pt_insn *insn)
{
- enum btrace_insn_flag flags = 0;
+ btrace_insn_flags flags = 0;
if (insn->speculative)
flags |= BTRACE_INSN_FLAG_SPECULATIVE;
--
2.5.5
reply other threads:[~2016-04-15 23:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460763108-24964-1-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).