aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-07-24 15:35:45 +0100
committerGary Benson <gbenson@redhat.com>2014-07-30 09:22:49 +0100
commit976411d6b6aa5cae05259eb92b87a04262052e09 (patch)
tree680cd8fa567bb21cba7ce135f49f3e609740d36a /gdb/common
parent5d4848a4bda0cb79d61dcb9987ef6116cf1e6f67 (diff)
downloadfsf-binutils-gdb-976411d6b6aa5cae05259eb92b87a04262052e09.zip
fsf-binutils-gdb-976411d6b6aa5cae05259eb92b87a04262052e09.tar.gz
fsf-binutils-gdb-976411d6b6aa5cae05259eb92b87a04262052e09.tar.bz2
Introduce common/common-defs.h
This commit creates a new header, common/common-defs.h, to hold definitions common to all code under gdb/. Both gdb/defs.h and gdb/gdbserver/server.h are modified to include common-defs.h as their first non-comment line; all code under gdb/ includes either defs.h or server.h as appropriate, so common-defs.h will be the first actual code the compiler sees. For this initial commit common-defs.h includes only the two config.h files. Future commits will move more code currently duplicated across defs.h and server.h such that shared code in gdb/{common,target,nat} can be modified to include common-defs.h rather than defs.h or server.h. gdb/ 2014-07-30 Gary Benson <gbenson@redhat.com> * common/common-defs.h: New file. * Makefile.in (HFILES_NO_SRCDIR): Add common/common-defs.h. * defs.h: Include common-defs.h. Do not include config.h or build-gnulib/config.h. gdb/gdbserver/ 2014-07-30 Gary Benson <gbenson@redhat.com> * server.h: Include common-defs.h. Do not include config.h or build-gnulib-gdbserver/config.h.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/common-defs.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h
new file mode 100644
index 0000000..9e397d9
--- /dev/null
+++ b/gdb/common/common-defs.h
@@ -0,0 +1,30 @@
+/* Common definitions.
+
+ Copyright (C) 1986-2014 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef COMMON_DEFS_H
+#define COMMON_DEFS_H
+
+#include "config.h"
+#ifdef GDBSERVER
+#include "build-gnulib-gdbserver/config.h"
+#else
+#include "build-gnulib/config.h"
+#endif
+
+#endif /* COMMON_DEFS_H */