From 9239eeabe340e1662c5df8f816785477309e1c0b Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Wed, 30 Jul 2014 15:31:10 +0100 Subject: Introduce common-types.h This introduces common-types.h. This file defines various standard types used by gdb and gdbserver. Currently these types are conditionally defined based on GDBSERVER. The long term goal is to remove all such tests; however, this is difficult as currently gdb uses definitions from BFD. In the meantime this is still a step in the right direction. gdb/ChangeLog: * common/common-types.h: New file. * Makefile.in (HFILES_NO_SRCDIR): Add common/common-types.h. * common/common-defs.h: Include common-types.h. * defs.h (gdb_byte, CORE_ADDR, CORE_ADDR_MAX, LONGEST) (ULONGEST): Remove. gdb/gdbserver/ChangeLog: * server.h: Add static assertion. (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove. --- gdb/gdbserver/server.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'gdb/gdbserver/server.h') diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index db6ddde..e6b2277 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -21,6 +21,8 @@ #include "common-defs.h" +gdb_static_assert (sizeof (CORE_ADDR) >= sizeof (void *)); + #ifdef __MINGW32CE__ #include "wincecompat.h" #endif @@ -63,19 +65,8 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap); # define PROG "gdbserver" #endif -/* A type used for binary buffers. */ -typedef unsigned char gdb_byte; - #include "buffer.h" #include "xml-utils.h" - -/* FIXME: This should probably be autoconf'd for. It's an integer type at - least the size of a (void *). */ -typedef unsigned long long CORE_ADDR; - -typedef long long LONGEST; -typedef unsigned long long ULONGEST; - #include "regcache.h" #include "gdb_signals.h" #include "target.h" -- cgit v1.1