aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-25 12:18:00 +0100
committerGary Benson <gbenson@redhat.com>2014-07-30 09:22:48 +0100
commitd41f6d8ea2868ed247c149c252741d02293c6659 (patch)
tree072c9ea4577403a530ecb6c9056c7b17b4351f63 /gdb/gdbserver
parentf2120acddc665a9adbd90e2dd32a3f589d9230c4 (diff)
downloadgdb-d41f6d8ea2868ed247c149c252741d02293c6659.zip
gdb-d41f6d8ea2868ed247c149c252741d02293c6659.tar.gz
gdb-d41f6d8ea2868ed247c149c252741d02293c6659.tar.bz2
Make all source files include defs.h or server.h first
This commit makes all source files under gdb/ that include headers from gdb/ include either defs.h or server.h before any other code. This ensures that definitions and macros from the two config.h files are always in place for our code. An exception has been made for gdb/gdbserver/gdbreplay.c which seems to be a special case. gdb/ 2014-07-30 Gary Benson <gbenson@redhat.com> * btrace.c: Include defs.h. * common/ptid.c: Include defs.h or server.h as appropriate. * nat/mips-linux-watch.c: Likewise. gdb/gdbserver/ 2014-07-30 Gary Benson <gbenson@redhat.com> * hostio-errno.c: Move server.h to top of includes list. * inferiors.c: Likewise. * linux-x86-low.c: Likewise. * notif.c: Include server.h.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/hostio-errno.c2
-rw-r--r--gdb/gdbserver/inferiors.c3
-rw-r--r--gdb/gdbserver/linux-x86-low.c2
-rw-r--r--gdb/gdbserver/notif.c1
5 files changed, 11 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 60d2430..df20e8c 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2014-07-30 Gary Benson <gbenson@redhat.com>
+
+ * hostio-errno.c: Move server.h to top of includes list.
+ * inferiors.c: Likewise.
+ * linux-x86-low.c: Likewise.
+ * notif.c: Include server.h.
+
2014-07-24 Tom Tromey <tromey@redhat.com>
Gary Benson <gbenson@redhat.com>
diff --git a/gdb/gdbserver/hostio-errno.c b/gdb/gdbserver/hostio-errno.c
index afe3c36..8817096 100644
--- a/gdb/gdbserver/hostio-errno.c
+++ b/gdb/gdbserver/hostio-errno.c
@@ -21,8 +21,8 @@
/* This file implements the hostio_last_error target callback
on top of errno. */
-#include <errno.h>
#include "server.h"
+#include <errno.h>
#include "gdb/fileio.h"
static int
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index 8c1375f..48d7700 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -18,9 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <stdlib.h>
-
#include "server.h"
+#include <stdlib.h>
#include "gdbthread.h"
#include "dll.h"
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 9ba71e5..850ed7c 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -17,11 +17,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "server.h"
#include <stddef.h>
#include <signal.h>
#include <limits.h>
#include <inttypes.h>
-#include "server.h"
#include "linux-low.h"
#include "i387-fp.h"
#include "i386-low.h"
diff --git a/gdb/gdbserver/notif.c b/gdb/gdbserver/notif.c
index 8bc66dc..d69b2ed 100644
--- a/gdb/gdbserver/notif.c
+++ b/gdb/gdbserver/notif.c
@@ -47,6 +47,7 @@
# 3 is done by function 'handle_notif_ack'. */
+#include "server.h"
#include "notif.h"
static struct notif_server *notifs[] =