This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 23/36] gdbarch.h: include regcache.h
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 9 Feb 2015 23:20:33 +0000
- Subject: [PATCH 23/36] gdbarch.h: include regcache.h
- Authentication-results: sourceware.org; auth=none
- References: <1423524046-20605-1-git-send-email-palves at redhat dot com>
Building GDB in C++ mode, I got:
src/gdb/gdbarch.h:240:149: error: invalid type in declaration before â;â token
src/gdb/gdbarch.h:240:14: error: use of enum âregister_statusâ without previous declaration
src/gdb/gdbarch.h:241:13: error: use of enum âregister_statusâ without previous declaration
src/gdb/gdbarch.h:241:140: error: invalid type in declaration before â;â token
That's because 'enum register_status' has not been declared (and we can't
forward declare enums in C++).
gdb/ChangeLog:
2014-10-22 Pedro Alves <palves@redhat.com>
* gdbarch.sh: Include regcache.h.
* gdbarch.h: Regenerate.
---
gdb/gdbarch.h | 2 ++
gdb/gdbarch.sh | 2 ++
2 files changed, 4 insertions(+)
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b67d9f6..28d11c5 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -64,6 +64,8 @@ struct elf_internal_linux_prpsinfo;
struct mem_range;
struct syscalls_info;
+#include "regcache.h"
+
/* The architecture associated with the inferior through the
connection to the target.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index dde976a..b668360 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1218,6 +1218,8 @@ struct elf_internal_linux_prpsinfo;
struct mem_range;
struct syscalls_info;
+#include "regcache.h"
+
/* The architecture associated with the inferior through the
connection to the target.
--
1.9.3