This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdbarch.h: include regcache.h


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8a526fa69afd8ea7d2e303f80c03f9eb46211390

commit 8a526fa69afd8ea7d2e303f80c03f9eb46211390
Author: Pedro Alves <palves@redhat.com>
Date:   Wed Oct 22 12:16:56 2014 +0100

    gdbarch.h: include regcache.h
    
    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:
    2015-02-27  Pedro Alves  <palves@redhat.com>
    
    	* gdbarch.sh: Include regcache.h.
    	* gdbarch.h: Regenerate.

Diff:
---
 gdb/ChangeLog  | 5 +++++
 gdb/gdbarch.h  | 2 ++
 gdb/gdbarch.sh | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3319194..110c80b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2015-02-27  Pedro Alves  <palves@redhat.com>
 
+	* gdbarch.sh: Include regcache.h.
+	* gdbarch.h: Regenerate.
+
+2015-02-27  Pedro Alves  <palves@redhat.com>
+
 	* arm-tdep.c (decode_insn) <arm_handle_insn, thumb_handle_insn>:
 	Remove duplicate const.
 	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Remove
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 0b4dc06..c94c19c 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -65,6 +65,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 19be5a0..0f303a4 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -1234,6 +1234,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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]