Include common-defs.h instead of defs.h/server.h in shared code

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.
This commit is contained in:
Gary Benson 2014-09-12 10:11:42 +01:00
parent 361c8ade9c
commit 727605ca75
20 changed files with 42 additions and 106 deletions

View 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> 2014-09-12 Tom Tromey <tromey@redhat.com>
Gary Benson <gbenson@redhat.com> Gary Benson <gbenson@redhat.com>

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "target/target.h" #include "target/target.h"
#include "common/symbol.h" #include "common/symbol.h"
#include <unistd.h> #include <unistd.h>

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "xml-utils.h" #include "xml-utils.h"
#include "buffer.h" #include "buffer.h"
#include "inttypes.h" #include "inttypes.h"

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "common-debug.h" #include "common-debug.h"
/* See common/common-debug.h. */ /* See common/common-debug.h. */

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
/* The xmalloc() (libiberty.h) family of memory management routines. /* The xmalloc() (libiberty.h) family of memory management routines.

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "errors.h" #include "errors.h"
/* See common/errors.h. */ /* See common/errors.h. */

View file

@ -16,11 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "filestuff.h" #include "filestuff.h"
#include "gdb_vecs.h" #include "gdb_vecs.h"
#include <fcntl.h> #include <fcntl.h>

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "format.h" #include "format.h"
struct format_piece * struct format_piece *

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "gdb_vecs.h" #include "gdb_vecs.h"
#include "host-defs.h" #include "host-defs.h"

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "print-utils.h" #include "print-utils.h"
#include <stdint.h> #include <stdint.h>

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "ptid.h" #include "ptid.h"
/* See ptid.h for these. */ /* See ptid.h for these. */

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "rsp-low.h" #include "rsp-low.h"
/* See rsp-low.h. */ /* See rsp-low.h. */

View file

@ -17,11 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#ifdef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H
#include <signal.h> #include <signal.h>

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "vec.h" #include "vec.h"
struct vec_prefix struct vec_prefix

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "xml-utils.h" #include "xml-utils.h"
/* Return a malloc allocated string with special characters from TEXT /* Return a malloc allocated string with special characters from TEXT

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "linux-osdata.h" #include "linux-osdata.h"
#include <sys/types.h> #include <sys/types.h>

View file

@ -16,12 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "linux-procfs.h" #include "linux-procfs.h"
#include "filestuff.h" #include "filestuff.h"

View file

@ -16,12 +16,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "linux-ptrace.h" #include "linux-ptrace.h"
#include "linux-procfs.h" #include "linux-procfs.h"
#include "linux-waitpid.h" #include "linux-waitpid.h"

View file

@ -15,11 +15,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include <sys/ptrace.h> #include <sys/ptrace.h>
#include "mips-linux-watch.h" #include "mips-linux-watch.h"

View file

@ -17,12 +17,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifdef GDBSERVER #include "common-defs.h"
#include "server.h"
#else
#include "defs.h"
#endif
#include "waitstatus.h" #include "waitstatus.h"
/* Return a pretty printed form of target_waitstatus. /* Return a pretty printed form of target_waitstatus.