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 96d65ae92f5ce8dac1fa2cba7e25183091e6574a..2e18116704dc22fb0606f7b7935698e83f5654b7 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 433ae2a2d5a070c3ab1b8cd80929b56c36021bf3..854a9975683768f3f1c3cf6ab7967dc947cbf828 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 4a213b33272d61995eee722e6c7ac20334e35667..d6afb6a39ee34491fede878d5768fc8927e66176 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 5cac3bf81ae877071c4cff0ae84cc0f8a8b4e4db..933d4363742d14ab6a663122d40c02c8066151e9 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 a905d1dfc05ce463b766f77244d7ad7aeb48603e..3b8237e9fe14278161796109a591fa0817398b2f 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 d6e17a88b54cc90401fe6e362e54366b14b28e03..089c64b0de76c710c5d1bf151c4701a7a16c2685 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 a31ecd78feae7e4c9e2a03dc1ea43c6befd318b1..7ee9c5a823d464545a9c39b4902aa974738c90d7 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 247aaffd09b3dc9b0a80a72070647388b4924fd8..b989dc784a608812f433273473903b47b1180ac4 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 4a3330f596959322e3cc2751eac4a9790f74e152..ae11cc6d6fad48543aee248849c84e373c872e11 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 f5bef0a610471d05dc08b87775cba532599b133a..820ade01fa0c77545eea0ef148ed9e56f5c4c086 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 04fd118855c52108214a52863213dab503f56487..84e4aa744bbf4ee3de0e1cf0f9437873a1c2d586 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 02630054c8298787663f462143416699d754ecd2..e88799a67428458253c025699c7fb3f693bd500c 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 13d1e2c8c8127f392bd9632444fa2af0a241331e..ebe2761220fcb43e05298dd5f9c869d0f99d8d0a 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 4611e5f8db0809e2583b9d4833b93d25fd82ef38..9fc691504c3274b7f5a102a50b08c1cdb729544e 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 0f813907c1055800e5747e6994a12dc40359b202..b90dd21d1044bbe63ee8ea422c032c8c8a2669ff 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 887e518d3167fe47aee5961e01a62c46fe16e5ab..3f72883c8af5f0bfaddb7d39e25d8712dea2655c 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 84fc890c7cc3535afd877999888158429873cfa8..30797da343834df232862a8b743fc1b4b8ed6339 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 b4db86249a641b8a145bfd9a4836d843d2d8befd..627551646ab5ca88ab5d1ece1284900644046ab3 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 ea6e02de37831dbb8f8e01bb92f3c4cfd4ed3d62..afa3d78e3908b4de3db814745743e05395940f31 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 4493555d52c7bcc0778ec1c4475e487bb83c5ede..717f47ae88e22cfd6555c24323f5192b88e98763 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.