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] Include header for enum target_stop_reason


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

commit 2465e12e99c4ffd3e56e4725729cd3016d4e2c3d
Author: Pedro Alves <palves@redhat.com>
Date:   Fri May 15 16:00:40 2015 +0100

    Include header for enum target_stop_reason
    
    Building in C++ mode errors with:
    
     ~~~
     g++ -fpermissive (...) /home/pedro/gdb/mygit/src/gdb/gdbserver/../nat/x86-linux.c
     In file included from /home/pedro/gdb/mygit/src/gdb/gdbserver/../nat/x86-linux.h:23:0,
    		  from /home/pedro/gdb/mygit/src/gdb/gdbserver/../nat/x86-linux.c:21:
     /home/pedro/gdb/mygit/src/gdb/gdbserver/../nat/linux-nat.h:74:13: error: use of enum â??target_stop_reasonâ?? without previous declaration
      extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
    	      ^
     /home/pedro/gdb/mygit/src/gdb/gdbserver/../nat/linux-nat.h:74:70: error: invalid type in declaration before â??;â?? token
      extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
    								       ^
     ~~~
    
    gdb/ChangeLog:
    2015-05-15  Pedro Alves  <palves@redhat.com>
    
    	* nat/linux-nat.h: Include "target/waitstatus.h".

Diff:
---
 gdb/ChangeLog       | 4 ++++
 gdb/nat/linux-nat.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1fdc4f4..63c015f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-15  Pedro Alves  <palves@redhat.com>
+
+	* nat/linux-nat.h: Include "target/waitstatus.h".
+
 2015-05-15  Yuanhui Zhang  <asmwarrior@gmail.com>
 
 	* python/py-unwind.c (struct reg_info): Move out of ...
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index 7cdaf40..0633fa9 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -20,6 +20,8 @@
 #ifndef LINUX_NAT_H
 #define LINUX_NAT_H
 
+#include "target/waitstatus.h"
+
 struct lwp_info;
 struct arch_lwp_info;


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