Include common-defs.h instead of defs.h/server.h in shared code
authorGary Benson <gbenson@redhat.com>
Fri, 12 Sep 2014 09:11:42 +0000 (10:11 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 12 Sep 2014 09:11:42 +0000 (10:11 +0100)
This commit makes 19 of the 22 shared .c files in common, nat and
target include common-defs.h instead of defs.h/server.h.  The
remaining three files need slight extra work and are dealt with
in separate commits.

gdb/ChangeLog:

* common/agent.c: Include common-defs.h.
Don't include defs.h or server.h.
* common/buffer.c: Likewise.
* common/common-debug.c: Likewise.
* common/common-utils.c: Likewise.
* common/errors.c: Likewise.
* common/filestuff.c: Likewise.
* common/format.c: Likewise.
* common/gdb_vecs.c: Likewise.
* common/print-utils.c: Likewise.
* common/ptid.c: Likewise.
* common/rsp-low.c: Likewise.
* common/signals.c: Likewise.
* common/vec.c: Likewise.
* common/xml-utils.c: Likewise.
* nat/linux-osdata.c: Likewise.
* nat/linux-procfs.c: Likewise.
* nat/linux-ptrace.c: Likewise.
* nat/mips-linux-watch.c: Likewise.
* target/waitstatus.c: Likewise.

20 files changed:
gdb/ChangeLog
gdb/common/agent.c
gdb/common/buffer.c
gdb/common/common-debug.c
gdb/common/common-utils.c
gdb/common/errors.c
gdb/common/filestuff.c
gdb/common/format.c
gdb/common/gdb_vecs.c
gdb/common/print-utils.c
gdb/common/ptid.c
gdb/common/rsp-low.c
gdb/common/signals.c
gdb/common/vec.c
gdb/common/xml-utils.c
gdb/nat/linux-osdata.c
gdb/nat/linux-procfs.c
gdb/nat/linux-ptrace.c
gdb/nat/mips-linux-watch.c
gdb/target/waitstatus.c

index 96d65ae..2e18116 100644 (file)
@@ -1,3 +1,26 @@
+2014-09-12  Gary Benson  <gbenson@redhat.com>
+
+       * common/agent.c: Include common-defs.h.
+       Don't include defs.h or server.h.
+       * common/buffer.c: Likewise.
+       * common/common-debug.c: Likewise.
+       * common/common-utils.c: Likewise.
+       * common/errors.c: Likewise.
+       * common/filestuff.c: Likewise.
+       * common/format.c: Likewise.
+       * common/gdb_vecs.c: Likewise.
+       * common/print-utils.c: Likewise.
+       * common/ptid.c: Likewise.
+       * common/rsp-low.c: Likewise.
+       * common/signals.c: Likewise.
+       * common/vec.c: Likewise.
+       * common/xml-utils.c: Likewise.
+       * nat/linux-osdata.c: Likewise.
+       * nat/linux-procfs.c: Likewise.
+       * nat/linux-ptrace.c: Likewise.
+       * nat/mips-linux-watch.c: Likewise.
+       * target/waitstatus.c: Likewise.
+
 2014-09-12  Tom Tromey  <tromey@redhat.com>
            Gary Benson  <gbenson@redhat.com>
 
index 433ae2a..854a997 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include "target/target.h"
 #include "common/symbol.h"
 #include <unistd.h>
index 4a213b3..d6afb6a 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "xml-utils.h"
 #include "buffer.h"
 #include "inttypes.h"
index 5cac3bf..933d436 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include "common-debug.h"
 
 /* See common/common-debug.h.  */
index a905d1d..3b8237e 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 
 /* The xmalloc() (libiberty.h) family of memory management routines.
 
index d6e17a8..089c64b 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include "errors.h"
 
 /* See common/errors.h.  */
index a31ecd7..7ee9c5a 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include "filestuff.h"
 #include "gdb_vecs.h"
 #include <fcntl.h>
index 247aaff..b989dc7 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "format.h"
 
 struct format_piece *
index 4a3330f..ae11cc6 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "gdb_vecs.h"
 #include "host-defs.h"
 
index f5bef0a..820ade0 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "print-utils.h"
 #include <stdint.h>
 
index 04fd118..84e4aa7 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include "ptid.h"
 
 /* See ptid.h for these.  */
index 0263005..e88799a 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "rsp-low.h"
 
 /* See rsp-low.h.  */
index 13d1e2c..ebe2761 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
index 4611e5f..9fc6915 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "vec.h"
 
 struct vec_prefix
index 0f81390..b90dd21 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "xml-utils.h"
 
 /* Return a malloc allocated string with special characters from TEXT
index 887e518..3f72883 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "linux-osdata.h"
 
 #include <sys/types.h>
index 84fc890..30797da 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "linux-procfs.h"
 #include "filestuff.h"
 
index b4db862..6275516 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "linux-ptrace.h"
 #include "linux-procfs.h"
 #include "linux-waitpid.h"
index ea6e02d..afa3d78 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
+#include "common-defs.h"
 #include <sys/ptrace.h>
 #include "mips-linux-watch.h"
 
index 4493555..717f47a 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#endif
-
+#include "common-defs.h"
 #include "waitstatus.h"
 
 /* Return a pretty printed form of target_waitstatus.